列出大量订阅的 youtube 频道 [英] Listing large amount of subscriptions of a youtube channel

查看:35
本文介绍了列出大量订阅的 youtube 频道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取拥有 10 万以上订阅者的 YouTube 频道的所有订阅 ID.获取第一页结果时,youtube 会正确返回订阅总数和下一页令牌.

I am trying to fetch all the subscriptions ids of a youtube channel that has 100k+ subscribers. When fetching the first page of results, youtube returns properly the total amount of subscriptions and the next page token.

经过几百次调用(因为每次调用只能获取 50 个结果),api 不再提供 nextPageToken,并且列表停止,只列出了大约 20k 个订阅.

After a few hundred calls (because you can only fetch 50 results per call), the api doesn't provide anymore the nextPageToken, and the listing stops with only ~20k subscriptions listed.

我在几个大型 youtube 频道上尝试过这个,当我达到大约 20k 列出的订阅时总是相同的行为.

I tried this on several big youtube channels, and always the same behaviour when I reach around 20k subscriptions listed.

在文档中我找不到任何关于列表订阅限制的任何信息...

In the documentation I couldn't find anything about any limit on listing subscriptions...

有人遇到过同样的问题吗?:-)

Anybody encountered the same issue ? :-)

谢谢

推荐答案

我认为您需要检查是否有错误,如果您已达到配额限制,则在尝试发出另一个请求时应该会收到错误消息.

I think you need to check for an error, If you have reached the quota limit you should get an error when you try and make another request.

每日配额为 50,000,000 件/天

Daily quota is 50,000,000 units/day

取决于您从 subscriptions.list 请求的部分其中像片段计数对配额加倍.

depending upon which part you request from subscriptions.list some of them like snippet count double against the quota.

数学时间

如果您有 100000 个订阅,并且您必须在 50 个订阅中获取它们,这将需要 2000 个请求.即使您正在使用双部分之一,它仍然应该只有大约 4000 个请求.

If you have 100000 subscriptions and you have to fetch them in 50 subscription bites that's going to take you 2000 requests. Even if you are using one of the double parts its still should only be around 4000 requests.

我认为问题不在于配额检查是否有错误.

I don't think the problem is quota check to see if you are getting an error.

发现谷歌搜索

这篇关于列出大量订阅的 youtube 频道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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