I'm trying to grab the media tags from youtube playlists. I tried
feedtools as well and had a similar problem. It seems I just can't
pull out those tags no matter what I do.
Here is the relevant code:
Feedzirra::Feed.add_common_feed_entry_element("media:thumbnail", :as
=> :thumbnail)
feed = Feedzirra::Feed.fetch_and_parse("
http://gdata.youtube.com/feeds/
api/playlists/189C0DCE90CB6D81?v=2")
puts feed.title
entry = feed.entries.first
puts "TITLE #{entry.title}"
puts "THUMBNAIL: #{entry.thumbnail.inspect}"
entry.thumbnail always comes up nil.
I tried all sorts of things for the xpath. "media:thumbnail", "//
media:thumbnail[1]", and so on. It's enclosed in a <media:group> tag
and I can't get that one either.
Any help would be appreciated. I spent about 3 hours with feedtools
trying to work this out and another couple hours with feedzirra. It
seems like no matter what I do, the parsers seem to completely ignore
everything under media:group, even though I can get other namespaced
tags that come both before and after that one like "yt:location".
Thanks!