Peter

Getting a thumbnail with xpath

Vote 0 Votes

Hi there, I've got a basic Foodspotting action stream working, but can't figure out why I can't get a thumbnail. It seems like the url to the image is not being picked up.

Here's how I'm trying to grab the thumbnail:

xpath:
foreach: //item
get:
created_on: pubDate/child::text()
url: link/child::text()
title: title/child::text()
thumbnail: media:thumbnail/@url

And here's a link to the XML/RSS I'm working with:

http://www.foodspotting.com/115648-peter-leonard.rss

Theories... the media: namespace has to be declared somehow? (But other sample code from SA does not do this either) Or the media:thumbnail is improperly non-nested within a media:content tag in Foodspotting's output?

thanks for any ideas!

Reported on Movable Type 5

1 Reply

| Add a Reply

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

code.sixapart.com

141 503

Last Topic: Action Stream for LinkedIn by michael webster on Jan 10, 2013

248 882

Last Topic: Spam users and server hits by doggone on Feb 3, 2013

1878 6634

Last Topic: Using PHP Includes in Templates by cwiitala on Feb 14, 2013

90 309

Last Topic: How old? by tkrupa on Feb 12, 2013

1523 5458

Last Topic: New Editor and Cloudflare issue by Arash Zad on Feb 12, 2013

752 3162

Last Topic: installation by JRB on Feb 10, 2013

89 319

Last Topic: How to "pretify" a url in htaccess with a few wildcards by Caio on May 30, 2012

193 794

Last Topic: error loading WYSIWYG Editor by thiago on Feb 9, 2013

218 701

Last Topic: Related/similar pages by Flo on Jan 25, 2013

28 96

Last Topic: Movable Price by joe22 on Jan 10, 2013

49 216

Last Topic: Movable Type 6 Ideas by Caio on May 28, 2012

65 249

Last Topic: Expanding new rich text editor and implementing table function by Takeshi Nick Osanai on Jul 30, 2012