Get media from rss feed?

P

Pieter

Dear all,

Being a ruby-newbie (is that a ruwbie?), i can't seem to find out how to
parse a <media:content> (or for that matter, any other tag actually) out
of a rss/2.0 feed.

What i have is this (stolen from the web, btw):

<code>
require 'rss/2.0'
require 'open-uri'

url='http://www.flickr.com/services/feeds/photos_public.gne?id=51035555243@N01&format=rss_200'

open(url) do |http|
response = http.read
result = RSS::parser.parse(response, false)
puts "Channel: #{result.channel.title}"
result.items.each do |item|
puts "#{item.title} (#{item.description})"
end
end
</code>

I think i'm looking for something like a generic equivalent to
item.title, is that possible?

Thanks a lot,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top