Latest YouTube module update broke entire module
n0ided opened this issue · comments
Nothing is working, neither the search or the automatic displaying of title video when someone pastes a link.
[YouTube] Title: https://youtube.com/devicesupport | Uploader: YouTube Help | Uploaded: 2015/04/17, 15:23 | Duration: 3mins 56secs | Views: 5,031,163 | Comments: N/A | Likes: N/A | Dislikes: N/A |
Link: https://youtu.be/UKY3scPIMd8
Is all that gets displayed.
@n0ided it looks like the proxy is being rate-limited. The module is working, but YT API has a limit to the amount of requests it will take.
As far as I can see, the old YouTube module is using v2 of the API, as shown quite clearly here:
Line 199 in 2f70274
However, Google have recently removed support for version 2 of this API, as can be seen here: http://youtube-eng.blogspot.co.uk/2015/04/bye-bye-youtube-data-api-v2.html
The problem therefore isn't in rate limits, but in the use of the old YT API. We need to switch over to v3 of the API, which requires bot owners to create a Google Developer API Key: https://developers.google.com/api-client-library/python/guide/aaa_apikeys
I'm in the process of rebuilding the current YouTube module to use this new API, and have got most of the coding working fine again. I will be happy to provide a Pull Request once I'm finished.
@Jarada sounds good to me. I was getting a deprecation warning, didn't realize it was now deprecated.
Hey there, just put the pull request up. This works perfectly as tested by my bots and my community. As I'm not used to doing very many pull requests, please let me know if there is anything you'd like me to change, I'm happy to do so :)
Since this has been merged in, I'm going to go ahead and close this issue.