YouTube API v3.0:如何确定视频是否为“按观看次数付费"? [英] YouTube API v3.0: How do you determine if a video is 'pay-per-view'?

查看:48
本文介绍了YouTube API v3.0:如何确定视频是否为“按观看次数付费"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆