youtube api v3 - 从播放列表中获取视频数量,并按查看次数排序查看数量数据 [英] youtube api v3 - get videos from a playlist with view count data ordered by number of views
问题描述
我想通过统计信息
数据(如 viewCount
)从播放列表中获取所有视频,并对视频进行排序按视频观看次数。到目前为止,我管理着以下内容:
https://www.googleapis.com/youtube/v3/playlistItems?part= snippet& playlistId = UUbW18JZRgko_mOGm5er8Yzg& key = {YOUR_KEY_HERE}& maxResults = 50
在youtube api v2我们可以传递 part = statistics
来获得查看次数,但这不适用于v3播放列表。如何以上述格式获得上述视频数据。 从 playlistItems.list 调用,收集视频ID,制作逗号分隔列表并将其设置为 videos.list 致电。该电话会为您提供所需的数据。
I want to get all the videos from a playlist with statistics
data like viewCount
and the videos should be ordered by number of video views. So far I have managed the following:
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=UUbW18JZRgko_mOGm5er8Yzg&key={YOUR_KEY_HERE}&maxResults=50
In the youtube api v2 we can pass part=statistics
to get the view count but this is not working with v3 playlists. How can I get the above the video data in the above mentioned format.
From the results of playlistItems.list call, collect the video ids, make a comma-separated list and set it as id parameter of videos.list call. That call will give you the data you need.
这篇关于youtube api v3 - 从播放列表中获取视频数量,并按查看次数排序查看数量数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!