youtube.search.list 在 9 页后不返回任何项目 [英] youtube.search.list does not return any items after 9 pages

查看:25
本文介绍了youtube.search.list 在 9 页后不返回任何项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得许多 youtube 频道的列表.

I want to get a list of many youtube Channels.

在获得大约 400 个结果(8 页 x 50 个结果/页)后,我通过以下方式调用第 8 或第 9 页:

After i got around 400 results (8 pages x 50 results/page), i call the 8th oder 9th page via:

GET https://www.googleapis.com/youtube/v3/search?part=id&maxResults=50&pageToken=CJADEAE&type=channel&key={YOUR_API_KEY}

GET https://www.googleapis.com/youtube/v3/search?part=id&maxResults=50&pageToken=CJADEAE&type=channel&key={YOUR_API_KEY}

我只得到 16 个结果,从现在开始,接下来的 10 个(或其他)nextPageTokens 根本不返回任何项目,并且在第 19 个 nextPageToken 之后,响应中甚至没有 nextPageToken.

i get only 16 results and from this point on the next 10 (or something) nextPageTokens return no items at all and after the 19th nextPageToken there is not even a nextPageToken in the response.

尽管如此,查询还是说totalResults":1000000,resultsPerPage":50.

Nevertheless the query says "totalResults": 1000000, "resultsPerPage": 50.

这是一个错误还是我做错了什么?

Is this a bug or am I doing something wrong?

推荐答案

serch 调用受到限制.因为它会在一段时间后开始返回重复项,并且它几乎是无限数量的可能结果.所以他们选择限制该搜索词.

The serch call is restricted. As it will start to return duplicates after a while, and it is almost an infinite number of possible results. So they have chosen to cap that search term.

这篇关于youtube.search.list 在 9 页后不返回任何项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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