Closed JMTNTBANG closed 9 months ago
Google has a 10000 "unit" quota on their API, and scanning videos uses one unit. Quick and dirty solution is scan for the latest video once every 86400 / (10000 * (num of channels)) seconds, about once every 70 seconds with the current 8 channels.
That might actually be the most reasonable solution, since as far as I can see Google doesn't provide a way of checking the quota outside the developer dashboard.
Persistent tracking of quota usage would technically be the "right way", but there's only one API consumer in the bot, so eeeehhhhh.
And perhaps make the developer key a separate config thing like the Discord token, since anyone else using this bot (or web scrapers looking for open developer keys, probably a good idea to delete that one and create a new one if you change this) will consume your quota.
Google has a 10000 "unit" quota on their API, and scanning videos uses one unit. Quick and dirty solution is scan for the latest video once every 86400 / (10000 * (num of channels)) seconds, about once every 70 seconds with the current 8 channels.
That might actually be the most reasonable solution, since as far as I can see Google doesn't provide a way of checking the quota outside the developer dashboard.
Persistent tracking of quota usage would technically be the "right way", but there's only one API consumer in the bot, so eeeehhhhh.
lol yeah now that i think about it that does makes sense, thanks for implementing this
This did not fix the issue apperently, so the quest is still on for a fix/rewrite for those who are up to the challenge
Does the API key page on the YT developer portal show the API key quota? Perhaps try making a new key to rule out usage by a third party since it was public for months?
I doubt it, maybe we can try just decreasing the check interval, since checking to barely hit the limit might not be great
65ef56f6d990fa1a1d75b79bb62c48b2ee504fa5
The problem appears to be from too many requests being sent at once, looking for a fix for that, also accepting redesigns of the system entirely