I'm trying to extract part of a GData supplied string for the YouTube API. I can separate out the video Title and Thumbnail strings but need to create a Text description label. I have copied the full string below but the difficulty I am having is extracting the following part from this.
I'm stuck on how to create a new NSString by finding type:plain content
copying the text that follows and then ending the new string on the }
delimiter.
{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}
I have tried using a scanner without success and any advice or pointers on this problem would be appreciated.
The full format of the full string is below.
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}"