the new api v3 returns a JSON, I guess every Youtube reader we have parses the html looking for tags like <title> and stuff using regex.. we have to develop a new one.
new youtube response looks like
Code: Select all
{
"kind": "youtube#videoListResponse",
"etag": "\"xmg9xJZuZD438sF4hb-VcBBREXc/cDUaSwJLm4RnKEyDrv0iBFvbiuk\"",
"pageInfo":
{
"totalResults": 1,
"resultsPerPage": 1
},
"items":
[
{
"kind": "youtube#video",
"etag": "\"xmg9xJZuZD438sF4hb-VcBBREXc/5Fur2afXCuTti3EYLVqVxnKTLFo\"",
"id": "7tcv4D2-acQ",
"snippet":
{
"publishedAt": "2015-05-29T11:00:00.000Z",
"channelId": "UCdcemy56JtVTrsFIOoqvV8g",
"title": "SONG CHALLENGE: BREAKFAST",
"description": "Breakfast always sounds good to me, but especially today! Huge thanks to Chase and Bed Bath & Beyond for sending me these items and challenging me to make music with them. http://chase.com/freedom\n\nAn extended mix of \"Breakfast Samba\" is available exclusively on my Patreon - join us and get the best deal on all my new music! http://patreon.com/andrewhuang\n\nLet's be friends forever:\nYouTube http://youtube.com/andrewhuang\nTwitter http://twitter.com/andrewismusic\nFacebook http://facebook.com/andrewismusic\nTumblr http://andrewismusic.tumblr.com\nInstagram http://instagram.com/andrewismusic\nSoundCloud http://soundcloud.com/andrewismusic\n\nIf you're new here, my name is Andrew Huang and I'm a musician who works with many genres and many instruments - and I've also made music with many things that aren't instruments like balloons, pants, water, and meth lab equipment. Find out more about me or get in touch at http://andrewismusic.com\n\nYou can also stream and download the majority of my discography at http://andrewhuang.bandcamp.com or see my other videos at http://youtube.com/andrewhuang\n\nAnd you can get my merch through DFTBA! http://store.dftba.com/collections/andrew-huang\n\nThanks for watching today and a big hug to you if you share this video with someone!",
"thumbnails":
{
"default":
{
"url": "https://i.ytimg.com/vi/7tcv4D2-acQ/default.jpg",
"width": 120,
"height": 90
},
"medium":
{
"url": "https://i.ytimg.com/vi/7tcv4D2-acQ/mqdefault.jpg",
"width": 320,
"height": 180
},
"high":
{
"url": "https://i.ytimg.com/vi/7tcv4D2-acQ/hqdefault.jpg",
"width": 480,
"height": 360
},
"standard":
{
"url": "https://i.ytimg.com/vi/7tcv4D2-acQ/sddefault.jpg",
"width": 640,
"height": 480
},
"maxres":
{
"url": "https://i.ytimg.com/vi/7tcv4D2-acQ/maxresdefault.jpg",
"width": 1280,
"height": 720
}
},
"channelTitle": "ANDREW HUANG",
"categoryId": "10",
"liveBroadcastContent": "none",
"localized":
{
"title": "SONG CHALLENGE: BREAKFAST",
"description": "Breakfast always sounds good to me, but especially today! Huge thanks to Chase and Bed Bath & Beyond for sending me these items and challenging me to make music with them. http://chase.com/freedom\n\nAn extended mix of \"Breakfast Samba\" is available exclusively on my Patreon - join us and get the best deal on all my new music! http://patreon.com/andrewhuang\n\nLet's be friends forever:\nYouTube http://youtube.com/andrewhuang\nTwitter http://twitter.com/andrewismusic\nFacebook http://facebook.com/andrewismusic\nTumblr http://andrewismusic.tumblr.com\nInstagram http://instagram.com/andrewismusic\nSoundCloud http://soundcloud.com/andrewismusic\n\nIf you're new here, my name is Andrew Huang and I'm a musician who works with many genres and many instruments - and I've also made music with many things that aren't instruments like balloons, pants, water, and meth lab equipment. Find out more about me or get in touch at http://andrewismusic.com\n\nYou can also stream and download the majority of my discography at http://andrewhuang.bandcamp.com or see my other videos at http://youtube.com/andrewhuang\n\nAnd you can get my merch through DFTBA! http://store.dftba.com/collections/andrew-huang\n\nThanks for watching today and a big hug to you if you share this video with someone!"
},
"defaultAudioLanguage": "en"
},
"contentDetails":
{
"duration": "PT52S",
"dimension": "2d",
"definition": "hd",
"caption": "false",
"licensedContent": true
}
}
]
}