Quantcast
Channel: Active questions tagged atom-feed+feed+ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Can I use Ruby in-built RSS module to read atom feed?

$
0
0

I am in an environment where I don't have access to install any gems. I only have standard ruby (version:1.8.7) installation.

I am trying something like this:


require 'rss/1.0'
require 'rss/2.0'
require 'open-uri'

source = "http://www.example.com/feed.atom" # url or local file
content = "" # raw content of rss feed will be loaded here
open(source) do |s| content = s.read end
rss = RSS::Parser.parse(content, false)
        

When I am parsing the content, I am getting nil. So I am wondering if in-built RSS module supports parsing an atom feed.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images