gpt4 book ai didi

youtube-api - 即使使用 videoEmbedable = True,v3 api 也会返回被阻止的内容

转载 作者:行者123 更新时间:2023-12-05 00:29:30 26 4
gpt4 key购买 nike

我在搜索请求中使用 v3 api 和 videoEmbeddable="true"。

但是,当我尝试在我的网页上播放视频时,它说该内容已被阻止在此站点上显示。在 Youtube 上观看。

是否有我可以使用的参数不会返回不可嵌入的视频?

*编辑 *

视频回复:

{u'items': [{u'snippet': {u'title': u'Jerez - Yamaha Preview'}, u'contentDetails': {u'definition': u'hd', u'contentRating': {u'ytRating': u'ytAllAudiences'}, u'caption': u'false', u'duration': u'PT1M21S', u'licensedContent': True, u'dimension': u'2d'}, u'status': {u'publicStatsViewable': True, u'privacyStatus': u'public', u'uploadStatus': u'processed', u'license': u'youtube', u'embeddable': True}, u'id': u'aaR72Xf_4wc'}]}

询问:
return yt_service_v3.videos().list(
id='aaR72Xf_4wc',
part="id,snippet,contentDetails,status",
fields="items(id,snippet(title),contentDetails,status)",
).execute()

该视频不可嵌入到我的网页上,并且在回复中没有任何迹象表明该视频不可嵌入。

我同时请求 contentDetails 和 status。我不是通过移动设备请求

请提供指点。

最佳答案

一小部分视频具有由其内容所有者应用的域级白名单或黑名单。这些限制不会反射(reflect)在 API 响应中。

这就是你看到的 aaR72Xf_4wc以及 blog post about playback restrictions 的相关部分是

There are even more subtle restrictions that occasionally come into play. Not all of these are currently queryable via the API. For instance, some videos are only playable on a certain set of domains.

关于youtube-api - 即使使用 videoEmbedable = True,v3 api 也会返回被阻止的内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17099980/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com