Friday, May 4, 2012

[YouTube-API] Extract YouTube video description in to iOS NSString

I'm struggling with extracting the video description from
GDataEntryYouTubeVideo/GDataMediaDescription. I have been going round
in circles on this for two days now.

Coding in objective C/Xcode.

Ideally I would like to filter the description text out from at
source, create an NSString that I can then send to a new view
controller along with the title and thumbnail (which I already have).

I have looked at GDataAtomContent, GDataAtomSummary,
GDataTextConstruct etc... but have admitted defeat that achieving this
is beyond my ability.

Any assistance/advice would be greatly appreciated.

What I need to do is extract the following -

I made a video pretty much every day for a whole week, and now I'm not
feeling quite as stressed out as I was previously. The end!

Hank (and his brother John): http://youtube.com/vlogbrothers

From -

GDataEntryYouTubeVideo 0xc125e20: {v:2.1 title:Crisis Averted
contentSrc:https://www.youtube.com/v/RKQWfVzUBt8?
version=3&f=user_uploads&app=youtube_gdata
etag:W/
"DUEGR347eCp7I2A9WhVVEEo." authors:1 categories:12
links:alternate,video.responses,video.related,mobile,self
id:tag:youtube.com,2008:video:RKQWfVzUBt8 rating:+19935/-228
comment:GDataComment 0xc12c260: {feedLink:GDataFeedLink 0xc12c9c0:
{href:https://gdata.youtube.com/feeds/api/videos/RKQWfVzUBt8/comments
rel:http://gdata.youtube.com/schemas/2007#comments countHint:7096
href:https://gdata.youtube.com/feeds/api/videos/RKQWfVzUBt8/comments
countHint:7096
rel:http://gdata.youtube.com/schemas/2007#comments}}
stats:GDataYouTubeStatistics 0xc12d640: {viewCount:810340
favoriteCount:1096} mediaGroup:GDataYouTubeMediaGroup 0xc12e700:
{categories:(
"GDataMediaCategory 0xc131ab0: {label:People & Blogs scheme:http://
gdata.youtube.com/schemas/2007/categories.cat content:People}" )
contents:(
"GDataMediaContent 0xc130750: {url:https://www.youtube.com/v/
RKQWfVzUBt8?version=3&f=user_uploads&app=youtube_gdata
type:application/x-shockwave-flash
medium:video isDefault:true
expression:full duration:201}",
"GDataMediaContent 0xc130f80: {url:rtsp://v5.cache2.c.youtube.com/
CigLENy73wIaHwnfBtRcfRakRBMYDSANFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.
3gp
type:video/3gpp medium:video expression:full duration:201}",
"GDataMediaContent 0xc131530: {url:rtsp://v2.cache2.c.youtube.com/
CigLENy73wIaHwnfBtRcfRakRBMYESARFEgGUgx1c2VyX3VwbG9hZHMM/0/0/0/video.
3gp
type:video/3gpp medium:video expression:full duration:201}" )
credits:(
"GDataMediaCredit 0xc131ff0: {role:uploader scheme:urn:youtube
content:charlieissocoollike unparsedAttr:yt:display}" ) thumbnails:(
"GDataMediaThumbnail 0xc132c10: {url:http://i.ytimg.com/vi/
RKQWfVzUBt8/default.jpg
height:90 width:120 time:00:01:40.500}",
"GDataMediaThumbnail 0xc1336e0: {url:http://i.ytimg.com/vi/
RKQWfVzUBt8/mqdefault.jpg
height:180 width:320}",
"GDataMediaThumbnail 0xc133bb0: {url:http://i.ytimg.com/vi/
RKQWfVzUBt8/hqdefault.jpg
height:360 width:480}",
"GDataMediaThumbnail 0xc133f40: {url:http://i.ytimg.com/vi/
RKQWfVzUBt8/1.jpg
height:90 width:120 time:00:00:50.250}",
"GDataMediaThumbnail 0xc134320: {url:http://i.ytimg.com/vi/
RKQWfVzUBt8/2.jpg
height:90 width:120 time:00:01:40.500}",
"GDataMediaThumbnail 0xc134630: {url:http://i.ytimg.com/vi/
RKQWfVzUBt8/3.jpg
height:90 width:120 time:00:02:30.750}" )
keywords:GDataMediaKeywords 0xc134b70: {content:Charlie McDonnell,
charlieissocoollike, YouTube, Mid-Life, Crisis, Week, Averted, Hank
Green, vlogbrothers, America keywords:Charlie McDonnell,
charlieissocoollike, YouTube, Mid-Life, Crisis, Week, Averted, Hank
Green, vlogbrothers, America} description:GDataMediaDescription
0xc132880: {type:plain content:I made a video pretty much every day
for a whole week, and now I'm not feeling quite as stressed out as I
was previously. The end!

Hank (and his brother John): http://youtube.com/vlogbrothers} players:
(
"GDataMediaPlayer 0xc130960: {url:https://www.youtube.com/watch?
v=RKQWfVzUBt8&feature=youtube_gdata_player
}"

--
You received this message because you are subscribed to the Google Groups "YouTube APIs Developer Forum" group.
To post to this group, send email to youtube-api-gdata@googlegroups.com.
To unsubscribe from this group, send email to youtube-api-gdata+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/youtube-api-gdata?hl=en.

No comments:

Post a Comment