问题
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