Do any Ruby RSS parsing libaries support MRSS?
I'm attempting to parse Media RSS feeds that contain media:* elements, but it seems as though all of the standard RSS parsing libraries for Ruby only support enclosures, not MRSS elements.
I've tried:
- SimpleRSS
- RSS::Parser
- Syndic开发者_如何学Pythonation:RSS::Parser
Ideally, I'd like something that makes it simple to extract elements such as media:thumbnail, similar to how I can extract an entry's enclosure.
http://github.com/cardmagic/simple-rss seems to support Media RSS to some degree.
For example:
pp rss.entries.last
{
...
:media_content_url=>"...",
:media_content_type=>"image/jpeg",
:media_content_height=>"426",
:media_content_width=>"640",
:media_thumbnail_url=>"...",
:media_thumbnail_height=>"133",
:media_thumbnail_width=>"200"}
}
(Unfortunately, with the feed I'm testing it with, it seems to be only taking the first media:content tag inside of the media:group, even though the media:group has 2 media:content tags.)
精彩评论