When searching Youtube using the Data API, how can I exclude videos that cannot be played externally?

青春壹個敷衍的年華 提交于 2019-12-11 11:57:18

问题


The Youtube API will return videos that can be played no problem within the chromeless player. It also returns videos that cannot be played, - "Embedding disabled by request".

I don't want to retrieve videos that cannot be played, is there a way to request only videos that can be embedded?

cheers


回答1:


Yes, there is a parameter exactly for this purpose. In this Url

http://gdata.youtube.com/feeds/api/videos?q=connemara&orderby=published&max-results=10&v=2&format=5

the "format=5" parameter restricts the results to embeddable videos. See the 'Developer's Guide: Data API Protocol – API Query Parameters'.



来源:https://stackoverflow.com/questions/1187398/when-searching-youtube-using-the-data-api-how-can-i-exclude-videos-that-cannot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!