YouTube API v3.0:您如何确定视频是否为“按次付费"? [英] YouTube API v3.0: How do you determine if a video is 'pay-per-view'?
问题描述
我正在使用 YouTube Python API
(v3.0) 查询具有特定视频 ID 的 YouTube,我想知道结果中列出的哪些视频是付费内容(里面有一些电视节目).
I am using the YouTube Python API
(v3.0) to query YouTube with specific video IDs, and I would like to know which ones of the videos listed in the results are paid-content (there are some TV-shows in there).
我已经浏览了视频"对象参数(https://developers.google.com/youtube/v3/docs/videos),但我找不到任何有用的东西:
I have gone through the 'video' object parameters (https://developers.google.com/youtube/v3/docs/videos), but I have not been able to find anything useful:
- 'contentDetails.licensedContent' 标志似乎与非免费视频不匹配
- 'status.license' 似乎几乎总是设置为 'youtube'
- 'status.embeddable' 似乎也不依赖于免费/非免费
欢迎提出任何建议或解决方案!
Any suggestions or solutions are welcome!
推荐答案
youtube#video
对象中没有表示特定视频是否收费的字段.您可以使用一个粗略的代理,比如 youtube#video.contentRating
的存在,作为视频可能是电视/电影内容的线索,但这并不一定意味着它是付费内容.
There's no field in the youtube#video
object that represents whether a specific video costs money. You could use a rough proxy, like the presence of youtube#video.contentRating
, as a clue that the video might be something that's television/film content, but that doesn't necessarily mean that it's paid content.
这篇关于YouTube API v3.0:您如何确定视频是否为“按次付费"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!