So I am trying to use this to grab images from the amazon feeds (i.e. http://www.amazon.com/rss/movers-and-shakers/electronics/ref=pd_ms_rss_l...)

The image I want is in the description in the CDATA

If I map it to the URL as per the tutorial it grabs a random Ad image from Amazon ( which I suspect is purposefully put there by amazon)

I attempted to Map the Description to the Image(FIG) but that did not work. Not certain if the CDATA is messing this up.

Maybe add an option to process post "get" and search the node for the image?
It's quite possible that this is a configuration issue I just haven't been able to figure out using the documentation.

Thanks,
Sean

Comments

publicmind’s picture

Status: Active » Closed (works as designed)

FIG searches for images on the article page which are inside the img tag. So, it won't work if the image is inside CDATA. You might want to look into:

http://drupal.org/project/feedapi_scraper
http://drupal.org/node/635520
http://drupal.org/project/querypath

Regards,

seansreview.com’s picture

I'll have to check but is it possible to use image grabber to re-scan the feed item after it has been pulled and scan that body text for an image?

Post Scan as opposed to a pre-scan of the link?

[edit] By check meaning I don't think the CDATA gets saved in the feed item body.. but I am going to check that now.

seansreview.com’s picture

So for Feeds after the feed is imported the CDATA is removed.

An option to use an alternate processing would work ( if the architecture of FIG would allow so)

1. If Post Processing Option Checked then:
2. Allow the feed to be created first.
3. Once it is created scan the body of the feed item
4. Update the feed item with the image pulled from the image tag within the body.

Ultimately I am trying to get a preview image to be able to create a "teaser" view of the feeds
that displays the images in the summary which would be output as a grid or tiles using Views.

Any thoughts on that? http://drupal.org/node/775460 (Don't mind me talking to myself in that thread)

publicmind’s picture

That is exactly what FeedAPI Scraper is designed to do. I am not sure about its maintainer plans to upgrade it for Feeds. FIG was specifically designed to scrape images from a link. It shouldn't be hard to run a XPath query on already pulled data into the node using querypath or something similar.

Regards,

seansreview.com’s picture

I went to look at the FeedAPI - Unfortunately like you said its for FeedAPI.
Aggregation pulled the image out no problem and created a linked image. So I am playing with that for now.
Thanks for you help!

Sean

publicmind’s picture

Hi,

I was able to achieve what you might have been trying to do, see:

http://publicmind.in/drupal/feed-item/11727

It took me quite some time to figure this out. At line 450 in feeds_imagegrabber.module 6.x-1.0beta2 version, add the following line:

$doc->loadHTML($doc->saveHTML());

I am not sure but it looks like the HTML is not loaded properly the first time. I would be happy to see any expert comments on this.

Regards,

seansreview.com’s picture

I'll have to try this out. ( im having other issues with aggregation as well ( i.e. my newbieness can't figure out how to link a view to get the related attached images in a view - but i haven't spent much time with it at all. ) working on a new website now with the public booking module. That looks like fun too! I love drupal www.nhflats.com

parasox’s picture