Created
April 7, 2009 04:52
-
-
Save mattn/91104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use lib qw/lib/; | |
| use URI; | |
| use XML::Feed; | |
| use XML::Feed::Deduper; | |
| binmode STDOUT, ":encoding(cp932)" if $^O eq "MSWin32"; | |
| my $deduper = XML::Feed::Deduper->new( | |
| path => '/tmp/feed.dat' | |
| ); | |
| while (1) { | |
| my $feed = XML::Feed->parse( URI->new('http://twitter.com/statuses/user_timeline/5209741.rss') ); | |
| for my $entry ($deduper->dedup($feed->entries)) { | |
| print "new entry:",$entry->title,"\n"; | |
| } | |
| sleep 1; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment