我需要获取 chanel 名称,以及 youtube 视频的 coutn View ..
我使用 Youtube API,我想发送参数:视频代码
结果,该视频的观看次数和 channel 名称(不是 channel ID)
最佳答案
您可以引用这里:How to get YouTube channel name?
它表示您可以从 URL 中提取视频 id,然后发出 HTTP GET 请求:https://gdata.youtube.com/feeds/api/videos/dQw4w9WgXcQ?v=2&alt=json
在哪里 dQw4w9WgXcQ
是您感兴趣的视频 ID。这将返回 JSON 响应, channel 名称位于 author
field 。
要计算 YouTube 视频的观看次数,您可以使用 YouTube Analytics API .
Video reports provide statistics for all user activity related to a channel's videos or a content owner's videos. For example, these reports contain the number of views that your videos received. In the YouTube Analytics API, some content owner video reports also include estimated revenue and ad performance metrics.
这是一个相关线程:How to count the total number of views from a youtube channel?
关于json - 如何通过提供 Youtube ID 获取 Chanel 名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43568982/