Quantcast
Channel: Using Ruby's RSS class to parse both Atom and RSS - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Chris for Using Ruby's RSS class to parse both Atom and RSS

I found the .feed_type method for the feed object, and used it like so:if response.feed_type == "rss" puts "hey rss" response.channel.items.each{ |item| links += "'#{item.link}'," }elsif...

View Article



Using Ruby's RSS class to parse both Atom and RSS

I want to use Ruby's RSS class to parse both Atom and RSS feeds, so I can pull the links from them. How do I distinguish between the two types inside the code?I've got a parser response readied like...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images