Created
November 16, 2010 15:32
-
-
Save mach3/701939 to your computer and use it in GitHub Desktop.
Note for getting remote RSS Feed with ruby
This file contains 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
#!/usr/bin/ruby | |
require "open-uri" | |
require "rss" | |
begin | |
rss = open( "<feed url here!>" ){ |f| | |
RSS::Parser.parse( f.read ) | |
} | |
rss.channel.items.each{ |r| | |
p r.title | |
p r.link | |
p r.pubDate | |
} | |
rescue | |
p $! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment