I have successfully broke apart the title, original_author:, original_url: and imported them into separate cck fields but alot of the information comes in a php bundle that im not sure how to break apart. for example. I want the username with the href. Its in the body text field but when i import the username to a cck field using the mapping tool I only get the username text.
Another example is the thumbnail. Its in the body text field along with the description, username, 5 star rating from youtube, but i cant extract just the thumbnail.
Any Ideas?
The feed looks like this.
Array
(
[title] => The Drupal Song Music Video
[description] =>
The Drupal Song Music Video
a creepy music video for drupal
From:
dotTIF
Views:
26659
66
ratings
Time:
01:02
More in
Film & Animation
[options] => Array
(
[original_author] => OreillyMedia
[timestamp] => 1228590708
[original_url] => http://www.youtube.com/watch?v=AZ04xTyx6yo
[guid] => tag:youtube.com,2008:video:AZ04xTyx6yo
[tags] => Array
(
[0] => http://gdata.youtube.com/schemas/2007#video
)
[domains] => Array
(
[http://schemas.google.com/g/2005#kind] => Array
(
[0] => -1
)
)
)
)
this is what i get in the body text field
<div style="color: #000000;font-family: Arial, Helvetica, sans-serif; font-size:12px; font-size: 12px; width: 555px;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="140" valign="top" rowspan="2"><div style="border: 1px solid #999999; margin: 0px 10px 5px 0px;"><a href="http://www.youtube.com/watch?v=dRlwfhOt-vA"><img alt="" src="http://i.ytimg.com/vi/dRlwfhOt-vA/2.jpg"></a></div></td>
<td width="256" valign="top"><div style="font-size: 12px; font-weight: bold;"><a style="font-size: 15px; font-weight: bold; font-decoration: none;" href="http://www.youtube.com/watch?v=dRlwfhOt-vA">The Drupal Boys</a>
<br></div>
<div style="font-size: 12px; margin: 3px 0px;"><span>When the Drupal Song Plays...BryanSD and son become the Drupal Boys. </span></div></td>
<td style="font-size: 11px; line-height: 1.4em; padding-left: 20px; padding-top: 1px;" width="146" valign="top"><div><span style="color: #666666; font-size: 11px;">From:</span>
<a href="http://www.youtube.com/profile?user=bryansd">bryansd</a></div>
<div><span style="color: #666666; font-size: 11px;">Views:</span>
1498</div>
<div style="white-space: nowrap;text-align: left"><img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> <img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> <img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> <img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"> <img style="border: 0px none; margin: 0px; padding: 0px; vertical-align: middle; font-size: 11px;" align="top" alt="" src="http://gdata.youtube.com/static/images/icn_star_full_11x11.gif"></div>
<div style="font-size: 11px;">3
<span style="color: #666666; font-size: 11px;">ratings</span></div></td></tr>
<tr><td><span style="color: #666666; font-size: 11px;">Time:</span>
<span style="color: #000000; font-size: 11px; font-weight: bold;">01:23</span></td>
<td style="font-size: 11px; padding-left: 20px;"><span style="color: #666666; font-size: 11px;">More in</span>
<a href="http://www.youtube.com/categories_portal?c=24">Entertainment</a></td></tr></tbody></table></div>
Comments
Comment #1
aron novakIt's not supported to extract something from the body part.
Comment #2
imclean commentedI posted my solution using Feed Scraper here: #462188: Parsing the YouTube 'description' data