Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polluted by AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo API key. #1061

Closed
sheeeng opened this issue Feb 21, 2020 · 2 comments
Closed

Polluted by AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo API key. #1061

sheeeng opened this issue Feb 21, 2020 · 2 comments

Comments

@sheeeng
Copy link

sheeeng commented Feb 21, 2020

Whenever I use my own Youtube Data API V3 API Key, it will still shows the the below output with my API Key being masked. It seems that it is not recognizing my given API Key by set api_key 000000000000000000000000000000000000000 command inside mpsyt.

  api_key           : AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo
  autoplay          : False
  set_title         : True
  mpris             : True

Invalid key or quota exceeded, '000000000000000000000000000000000000000'
➜  ~ $ brew --version
Homebrew 2.2.6
Homebrew/homebrew-core (git revision 5780; last commit 2020-02-21)
Homebrew/homebrew-cask (git revision 557b1b; last commit 2020-02-22)
➜  ~ $ mpsyt --version
mpsyt version      : 0.2.8
   notes           : released 17 February 2018
pafy version       : 0.5.5 (youtube-dl backend)
youtube-dl version : 2020.01.24
Python version     : 3.7.6 (default, Dec 30 2019, 19:38:26)
[Clang 11.0.0 (clang-1100.0.33.16)]
Processor          : i386
Machine type       : x86_64
Architecture       : 64bit,
Platform           : Darwin-19.3.0-x86_64-i386-64bit
sys.stdout.enc     : UTF-8
default enc        : utf-8
Config dir         : ${HOME}/.config/mps-youtube
env:TERM           : xterm-256color
env:SHELL          : /bin/zsh
➜  ~ $

After searching some issues online, it seems like the error is coming from one of these places.

~ $ sudo grep --recursive AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo /
grep: /usr/local/var/homebrew/linked/ghi/libexec/gems/pygments.rb-1.1.2/vendor/pygments-main/scripts/find_error.py: No such file or directory
/usr/local/var/homebrew/linked/mps-youtube/libexec/lib/python3.7/site-packages/mps_youtube/config.py:            ConfigItem("api_key", "AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo",
/usr/local/var/homebrew/linked/mps-youtube/libexec/lib/python3.7/site-packages/pafy/g.py:api_key = "AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo"
/usr/local/opt/mps-youtube/libexec/lib/python3.7/site-packages/mps_youtube/config.py:            ConfigItem("api_key", "AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo",
/usr/local/opt/mps-youtube/libexec/lib/python3.7/site-packages/pafy/g.py:api_key = "AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo"
/usr/local/Cellar/mps-youtube/0.2.8_9/libexec/lib/python3.7/site-packages/mps_youtube/config.py:            ConfigItem("api_key", "AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo",
/usr/local/Cellar/mps-youtube/0.2.8_9/libexec/lib/python3.7/site-packages/pafy/g.py:api_key = "AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo"~ $
@sheeeng sheeeng changed the title Cannot get rid of AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo key. Polluted by AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo API key. Feb 21, 2020
@itaton
Copy link

itaton commented Feb 22, 2020

This seems to be the same issue as mentioned in in the last comment of #551

@conceptrat
Copy link

If you get the "Invalid key or quota exceeded" error then your API key won't get saved and so the original developers key is used instead.

You need to create a new Project in Google Developers Console and new Credentials and just add Youtube Data API and restrict to just that API. I'm not 100% sure why but it seems to happen if you don't use the key for a while then the Project gets disabled or the identity behind it gets dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants