ruby / rss

RSS reading and writing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues parsing RSS from academic publishers

retrography opened this issue · comments

Most academic publishers seem to use a standard software to generate RSS (e.g.: SAGE, Academy of Management). When trying to parse these feeds I get the following error:

RSS::MissingAttributeError: attribute <rdf:about> is missing in tag <channel>
from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rss/parser.rb:521:in `block in collect_attributes'

Disabling validation, though, works. I doubt that all these feeds are corrupt. Or is there a specific spec they follow that the current gem does not support?

Also, almost all academic publishers use PRISM as well as the default DublinCore to include metadata in RSS entries. Is it possible to implement that into the current gem? Or better than that, is there a way to allow the gem to read those nodes as generic nodes (that it won't try to validate), just like feedparser in Python?

It looks like the code for DublinCore model can be used as a template for that. But PRISM also includes Reference nodes on top of Text and Date. Is there another NS implementation I can use as template for those nodes?

rdf:about is required for <channel>:

http://web.resource.org/rss/1.0/spec#s5.3

Required Attribute(s): rdf:about

So these RSS feeds are invalid.

Is it possible to implement that into the current gem?

Yes.