PDA

View Full Version : Extracting Photos from RSS Feeds.


blastfromthepast
30th June 2006, 07:11 AM
Anyone have perl script code to extract images from news feeds like Yahoos?

Like this feed

http://rss.news.yahoo.com/imgrss/1970

Drewbert
30th June 2006, 08:59 AM
install XML::RSS off CPAN

That and about 7 lines of code should do it.

blastfromthepast
30th June 2006, 09:16 AM
install XML::RSS off CPAN

That and about 7 lines of code should do it.

Got it. I'm looking for that 1 magic line. :)

$raw = get('http://rss.news.yahoo.com/imgrss/1970');
$rss->parse($raw);

$titleofcolumn = $rss->channel('title'); # that gets the title....

Maybe I should read the XML:RSS docs to see how to extract the right channel...