Quantcast
Channel: ruby RSS parser not returning correct information - Stack Overflow
Viewing all articles
Browse latest Browse all 2

ruby RSS parser not returning correct information

$
0
0

I need some help understanding how the Ruby rss parser works. I'm trying to access to the content of the first 10 entries from this feed with this code:

URL = 'http://weblog.rubyonrails.org/feed/atom.xml'...def initialize(versionName)  open(URL) do |rss|    feed = RSS::Parser.parse(rss)    feed.entry(1..10).each do |entry|      @attributes[:descriptions][:"#{versionName}"] = entry.content    end  endend

While debugging, I realized entry.content doesn't give me the correct data. Instead, it gives me this endless data which even causes my console to get stuck. Anyone could tell what would be the correct way to parse my feed in my situation?


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>