Debugging
Posted: 04 March 2010 01:33 AM   [ Ignore ]  
Newbie
Rank
Total Posts:  4
Joined  2010-02-23

Is there a way to see what input XMLGrab is seeing?  I’m trying to get a Last.fm XML feed to work via XMLGrab but it’s not working for some reason.  Any ideas?

Here is the feed.  I’ve tried every combination of the itempath but it’s just not working.

Any help would be appreciated.

Profile
 
 
Posted: 04 March 2010 11:36 AM   [ Ignore ]   [ # 1 ]  
Administrator
RankRankRankRank
Total Posts:  151
Joined  2006-04-12

Hi,

Thanks for your post. I’m looking into ways to make this easier.

In the case of the feed you link to:

<lfm status="ok">
  <
lovedtracks user="v1shal" total="14" page="1" perPage="50" totalPages="1">
    <
track>
      <
name>Jailer</name>
      <
mbid/>
      <
url>www.last.fm/music/Aṣa/_/Jailer</url>
      <
date uts="1267588331">3 Mar 201003:52</date>
      <
artist>
        <
name>Aṣa</name>
        <
mbid/>
        <
url>http://www.last.fm/music/Aṣa</url>
      
</artist>
      <
image size="small">http://userserve-ak.last.fm/serve/34s/34565463.jpg</image>
      
<image size="medium">http://userserve-ak.last.fm/serve/64s/34565463.jpg</image>
      
<image size="large">http://userserve-ak.last.fm/serve/126/34565463.jpg</image>
      
<image size="extralarge">http://userserve-ak.last.fm/serve/300x300/34565463.jpg</image>
    
</track>
    ... 

The itempath would be:

/lfm/lovedtracks/track

and you should be able to access elements like this:

name
url
artist/name
artist/url
image (will fetch the first image)
image#2 (the second image element)
image#3

Is that any help?

Andrew

Profile
 
 
Posted: 04 March 2010 06:29 PM   [ Ignore ]   [ # 2 ]  
Newbie
Rank
Total Posts:  4
Joined  2010-02-23

Thanks for the response, Andrew.

Unfortunately, no, that does not help.  I had already tried that.  When I run XMLGrab, it always says there is one new entry but all the fields it imports are blank.  Is this indicative of anything?

Fetching: <url>
Checking
Found new entry

New 
entries
Profile
 
 
Posted: 09 March 2010 11:00 AM   [ Ignore ]   [ # 3 ]  
Administrator
RankRankRankRank
Total Posts:  151
Joined  2006-04-12

Can you post (or email/PM) your template code. It looks like something is going wrong?

Thanks,
Andrew

Profile
 
 
Posted: 09 March 2010 06:19 PM   [ Ignore ]   [ # 4 ]  
Newbie
Rank
Total Posts:  4
Joined  2010-02-23

Andrew,

Here is my template code:

{exp:xmlgrab url="http://ws.audioscrobbler.com/2.0/?method=user.getlovedtracks&user=v1shal&api;_key=<myapikey>" 
                          
itempath="/lfm/lovedtracks/track"
                          
weblog="8" 
                          
title="name"
                          
date="date"
                          
use="artist/name|artist/url|image" 
                          
fields="l_artist|l_artist_link|l_cover" 

I’ve quadruple checked the weblog id and custom fields, so that isn’t the issue.

Profile