I'm surprised to not find any information on this yet, so please point me in the right direction if I'm missing something obvious.

I'm trying to map the YouTube fields to new nodes with the description ending up in the node body. Unfortunately, the description field in the feed seems to include much more than the text that was entered when the video was created. It includes number of views, the YouTube user page, ratings, time and tags.

I tried FeedAPI Exhaustive Parser, which gave a few more options, but still no simple description field. Anyone else manage to get just the user-entered description text out of the feed?

Comments

alex_b’s picture

callisto: this is clearly a problem on the parser level. If none of the existing parsers helps here, try writing your own parser plugin with feedapi extensible parser http://drupal.org/project/feedapi_eparser

stormsweeper’s picture

Status: Active » Postponed (maintainer needs more info)

Some youtube feeds stick all that in HTML in the description tag of the RSS feed:
http://gdata.youtube.com/feeds/base/videos/-/drupal

Not much the parser can do about that.

You need to use the search api feeds:
http://gdata.youtube.com/feeds/api/videos/-/drupal

Lots of info here:
http://code.google.com/apis/youtube/2.0/developers_guide_protocol.html#B...

imclean’s picture

I got this to work using a regex with Feed Scraper http://drupal.org/project/feedapi_scraper

One thing I noticed about the description field is that the main blurb (or what I'd call the actual description) is contained within the only set of plain SPAN tags. e.g. <span>This is the description of the movie. I hope you enjoy it.</span>

So, the expression I'm using on the description field is /<span>(.+)<\/span>/i

I haven't performed exhaustive testing but it worked on the 3 feeds I tried.