Cant parse media content
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 206
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
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.
require 'rss'
rss = RSS::Parser.parse('http://www.independent.co.uk/rss', false)
rss.items.each do |item|
puts "#{item.title}"
puts "#{item.media_content.url}"
end
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure using RSS::Parser.parse with the provided Independent RSS URL and the media:content example, then trace how that element is handled when iterating rss.items. The issue is done when the media content can be parsed without the reported error and its URL can be accessed as shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100