例如,當嵌入此YouTube video時,我們會收到This video contains content from... who has blocked it from display on the website
錯誤消息。如何使用YouTube API檢查視頻是否受限制?
如何使用API來查找視頻是否被阻止?
最近的參數,我發現是status
和contentDetails
:
GET https://www.googleapis.com/youtube/v3/videos?part=status&id=dYQ2IyMuPes&key={YOUR_API_KEY}
不返回任何有關限制指示:
"contentDetails": {
"duration": "PT2M",
"dimension": "2d",
"definition": "hd",
"caption": "false",
"licensedContent": true,
"projection": "rectangular"
},
"status": {
"uploadStatus": "processed",
"privacyStatus": "public",
"license": "youtube",
"embeddable": true,
"publicStatsViewable": false
}
相同的帖子:http://stackoverflow.com/questions/30190620/how-do-i-check-if-a-youtube-video-is-blocked-restricted-deleted – Kais
類似的問題,但答案doesn'不幸地解決我的問題。 –