akrennmair / newsbeuter

Newsbeuter is an open-source RSS/Atom feed reader for text terminals.
http://www.newsbeuter.org/
MIT License
780 stars 97 forks source link

Gimp rdf feed fails with 'invalid RSS version' error #106

Closed diffycat closed 10 years ago

diffycat commented 11 years ago

newsbeuter 2.7

When I'm trying to add http://www.gimp.org/news.rdf it says:

Error while retrieving http://www.gimp.org/news.rdf: invalid RSS version
gs93 commented 11 years ago

Looks like the code misses the following else if in rss/parser.cpp (line 224):

else if (strcmp(version, "1.0")==0)
    f.rss_version = RSS_1_0;

I don't know much about RSS, but adding it doesn't fix the issue ("feed contains no items!") and I think that's because the gimp RSS feed isn't valid: The channel element starts and ends right after/before the rss element, but the specification says: "The channel element contains metadata describing the channel itself, including a title, brief description, and URL link to the described resource" And according to the code (rss/rss_10_parser.cpp), newsbeuter doesn't even search item elements in channel.

akrennmair commented 10 years ago

Yep, that's correct. There's no such thing as a stand-alone version of RSS 1.0. RSS 1.0 is based on RDF, which this feed is not. Just look at the example in the RSS 1.0 spec, and you will see it's completely different from this feed here.

This feed is actually formed like RSS 0.9x. I added a workaround.