Skip to content

Instantly share code, notes, and snippets.

@shiba-yu36
Created October 19, 2010 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiba-yu36/633510 to your computer and use it in GitHub Desktop.
Save shiba-yu36/633510 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use warnings;
use XML::Feed;
my $url = 'http://f.hatena.ne.jp/shiba_yu36/rss';
my $open_search = "http://a9.com/-/spec/opensearchrss/1.0/";
my $hatena = "http://www.hatena.ne.jp/info/xmlns#";
my $feed = XML::Feed->parse(URI->new($url))
or die XML::Feed->errstr;
warn 'title : ', $feed->title;
warn 'link : ', $feed->link;
for my $entry ($feed->entries) {
warn '======== entry ==========';
warn $entry->title;
warn $entry->link;
warn $entry->summary;
warn $entry->unwrap->{$hatena}{imageurl};
warn '========= end ===========';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment