I'm trying to parse an RSS file. It throws a 404 response when I do:
Feedjira::Feed.fetch_and_parse url
So I thought trying:
Feedjira::Parser::RSS.parse url
But that returns 0 entries
This is exactly what I'm trying:
<% Feedjira::Parser::RSS.parse("my url here").entries.each do |e| %>
<%= "#{e.title}" %><br />
<% end %>
The rss file is being parse with no problem with php in another web. This is the structure:
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
<title>Title here</title>
... etc ...
<item>
<title>Title here</title>
... etc ...
</item>
<item> ... etc ... </item>
</channel>
</rss>
It's weird that
Feedjira::Feed.fetch_and_parse url
wasn't working for you. It's working perfectly fine for me.Here's how I did it. I'm using Railscasts RSS feed for example purpose: