我試圖從YouTube自動生成的頻道(AKA主題)獲取所有視頻。 我讓我的用戶添加一個鏈接到YT頻道,我發送頻道ID來檢索視頻。從YouTube自動生成的頻道獲取視頻api
在常規情況下,當信道不自動生成我使用這個端點: https://www.googleapis.com/youtube/v3/channels?part=snippet&channelId= {CHANNEL_ID} &鍵= {鍵}
此端點返回的是貼到這個頻道的影片名單。 與話題的問題是,視頻列表返回空......這下面的請求
例如: https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCYF2FotHeGO6cNcldrTHN1g&key= {} YOUR_API_KEY
{
"kind": "youtube#searchListResponse",
"etag": "\"3enKTWw-I-yugKAPnlrhH5U04vQ/Zi7b6FbLUH9xd8vhDiVs3zpfKLs\"",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 5
},
"items": [
{
"kind": "youtube#searchResult",
"etag": "\"3enKTWw-I-yugKAPnlrhH5U04vQ/dkWBa22byHoKTpuDJQLPs5T6ndg\"",
"id": {
"kind": "youtube#channel",
"channelId": "UCYF2FotHeGO6cNcldrTHN1g"
},
"snippet": {
"publishedAt": "2013-12-21T05:18:21.000Z",
"channelId": "UCYF2FotHeGO6cNcldrTHN1g",
"title": "Manchester United F.C. - Topic",
"description": "Manchester United Football Club is an English football club based in Old Trafford, Greater Manchester. The club was formed as Newton Heath LYR Football ...",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/i/YF2FotHeGO6cNcldrTHN1g/1.jpg"
},
"medium": {
"url": "https://i.ytimg.com/i/YF2FotHeGO6cNcldrTHN1g/mq1.jpg"
},
"high": {
"url": "https://i.ytimg.com/i/YF2FotHeGO6cNcldrTHN1g/hq1.jpg"
}
},
"channelTitle": "",
"liveBroadcastContent": "none"
}
}
]
}
任何想法如何獲取主題的影片?
謝謝
您是否找到解決方案?我現在遇到了這個問題。 –
不幸的是沒有 – segalle