Adds relevant YouTube videos to 維基百科 & 百度百科
< 腳本Wikitube - YouTube on 維基百科 & 百度百科的回應
That's because the Youtube API key provided in the script is out of quota. You can confirm it here: https://www.googleapis.com/youtube/v3/search?part=snippet&q=YouTube+Data+API&type=video&key=AIzaSyCMR8K-6fANDUBdlbHxFAo57mmlfAnPVFw
If you want it to work, you can provide your own key (it might incur costs) by:
1. Follow the guide and get a YouTube Data API key at https://developers.google.com/youtube/v3/getting-started
2. Put it in the script:
Find this line: const YOUTUBE_DATA_API_CREDENTIAL_1 = 'AIzaSyCMR8K-6fANDUBdlbHxFAo57mmlfAnPVFw';
And replace it with: const YOUTUBE_DATA_API_CREDENTIAL_1 = 'YOUR_CREATED_KEY_SHOULD_GO_HERE';
Remember to replace YOUR_CREATED_KEY_SHOULD_GO_HERE with the key you get from your google cloud console.
Seems to not work correctly when songs include certain things like apostrophes (may be related to the other feedback indicating colons break it)
For example, on the When I'm Gone (song by Katy Perry/Alesso) article, it'll search for "When I" and that's it when you click the YouTube icon in the title. Videos aren't appearing anywhere other than that image.