Skip to content

Cant parse media content #18

@gdonnelly82

Description

@gdonnelly82

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions