使用 youtube v3 API 从 youtube 播放列表中检索所有视频
我正在使用 youtube v3 API 检索播放列表的视频并获得 50 个项目,此链接没有任何问题:-
I'm retrieving videos of a playlist using youtube v3 API and getting 50 items without any problem with this link:-
但是视频数量是 100,而我只得到了 50.我怎样才能得到接下来的 50 个项目?我尝试了 start-index 但它不适用于 v3 API.任何帮助表示赞赏.
But the video count is 100 and I'm only getting 50. How can I get the next 50 items? I tried start-index but it does not work for v3 API. Any help is appreciated.
YouTube Data API v3 结果已分页.因此,您需要为其他人获取下一页结果.
YouTube Data API v3 results are paginated. So you need to get the next page of results for the others.
基本上在回复中您有nextPageToken.
要获得剩余的结果,请执行完全相同的调用,但将 pageToken 设置为你收到的那个令牌.
To get the remaining results, do the same exact call but setting pageToken into that token you received.