Listing large amount of subscriptions of a youtube channel

怎甘沉沦 提交于 2019-12-25 03:35:14

问题


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.

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.

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 ? :-)

Thanks


回答1:


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.

Daily quota is 50,000,000 units/day

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

Math time

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.

Googling found

  • issue request might be related. Youtube api impossible to get all results
  • YouTube api page tokens
  • possible hack


来源:https://stackoverflow.com/questions/30867855/listing-large-amount-of-subscriptions-of-a-youtube-channel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!