-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cant parse media content #18
Comments
We need to add support for Media RSS: https://www.rssboard.org/media-rss/ |
Hi kou. Is that Media RSS support something you are planning to add? It would be very helpful! |
I'll work on it when I can work on it. |
I ran into this today. Has anyone else found an alternative gem that supports media:content and/or media:thumbnail? |
Same... Seems still can't parse media content |
I have changed approaches - I'm using the Nori gem (https://github.com/savonrb/nori) to convert RSS into a hash and just navigate through it that way. # load your RSS somehow then pass into Nori...
feed = Nori.new.parse(rss)
title = feed["rss"]["channel"]["title"]
description = feed["rss"]["channel"]["description"]
items = feed["rss"]["channel"]["item"]
items.each do |item|
item_title = item["title"]
content = item["content:encoded"]
end |
I have been trying to parse media content and don't seem to be able to capture it. I can get the basics but trying to get something like the url of the image below throws an error.
<media:content url="https://static.independent.co.uk/s3fs-public/thumbnails/image/2020/03/10/14/payday-loans-5.jpg" type="image/jpeg" medium="image"/>
Example of code I'm trying.
The text was updated successfully, but these errors were encountered: