使用Data API搜索Youtube时,如何排除无法在外部播放的视频? [英] When searching Youtube using the Data API, how can I exclude videos that cannot be played externally?
本文介绍了使用Data API搜索Youtube时,如何排除无法在外部播放的视频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Youtube API将返回可以在无边框播放器中正常播放的视频。它还会返回无法播放的视频-被请求禁止嵌入。
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?
欢呼声
推荐答案
是,为此目的有一个参数。在此网址中
Yes, there is a parameter exactly for this purpose. In this Url
format = 5参数将结果限制为可嵌入视频。请参阅 开发人员指南:数据API协议– API查询参数
the "format=5" parameter restricts the results to embeddable videos. See the 'Developer's Guide: Data API Protocol – API Query Parameters'.
这篇关于使用Data API搜索Youtube时,如何排除无法在外部播放的视频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文