-
Notifications
You must be signed in to change notification settings - Fork 641
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
default api key disabled #1063
Comments
Confirming this too, I just did a fresh install and am running into the same issue. |
Also adding that after setting my own API V3 key, it still gives me an access not configured error as well. |
Same, it seems like it could be related to caching, as after removing Edit for clearer explanation of steps: when trying to start mpsyt, I get error 403. Then I remove the cache file, open mpsyt, and set |
Can confirm that the following steps solve the issue for me. |
Same issue, deleting cache_py folder leads to same error after running mpsyt |
This bug is related to pafy issue: mps-youtube/pafy#255 |
Hello, Same thing here, I've deleted the cache_py but still has the fetching error below: Error fetching data. Possible network issue. mpsyt --version Regards |
Actually this doesn't look like pafy related bug. It's rather some change on the google side. You can make it work by creating your own app and generate new API key, see: mps-youtube/pafy#255 (comment). What's important is to make sure that the new API is used and not the hardcoded "AIzaSyCIM4EzNqi1in22f4Z3Ru3iYvLaY8tc3bo" key (see #1061) |
Can a new hardcoded key be generated for pafy? Its not possible to make your own key without a google account. |
I am on a Mac running macOS 10.15 and I solved this issue by doing the following:
This solved the issue for me |
@nishanmudalige, can confirm, this worked for me too. I think the key is to make a new project with a new api key because it wasn't until I did that that it actually worked. I only needed to edit |
Hello, It's working after some steps Here are the steps I took:
That should work Hope it helps |
After reading all the above I managed to solve it with steps similar to what @whitemind and @nishanthkarthik suggested but I had to start with a fresh ~/.config/mps-youtube directory because modifying the binary
|
That API key is about 5 years old and was added in 032cca9 by @ids1024. I don't expect @ids1024 to still remember the account information from which the key was created, after such a long time. I also don't expect it would be as easy to simply reactivate the key as API keys don't usually expire. I believe this error is probably a side effect of something else YouTube did lately. We could also generate a new YouTube Data API key but it would easily be hitting rate limits as API keys that were generated in those old times could be used for 50 million units/day, but now has been dropped to only 1 million units/day. |
FWIW a similar project https://github.com/trizen/youtube-viewer recently also had their API disabled & urged all users to go create their own API key for the same reasons @ritiek suggests. IE: 'new YouTube Data API key would easily be hitting rate limits ' sadly it appears that project is now doomed because of this. the developer recently posted this trizen/youtube-viewer#308 however in recent days he has stuck a fork in it trizen/youtube-viewer#308 (comment) |
Related to using our own API key -- is there any way to set the key from the environment, instead of setting it directly in the json file? I like to keep my configuration on github under version control, and I'd rather not push API keys to github. |
Hi Yes you can, mpsyt set api_key your_key Regards |
|
Yes, but this writes the key into the JSON config file, AFAIK. My question is, is it possible to have the API key set to eg. the environment variable $YT_API_KEY, and have mpsyt read this variable? |
Is there any way for those with no google/youtube account to use mps-yt now? |
On Thu, Feb 27, 2020 at 01:58:09AM -0800, electronblue wrote:
Is there any way for those with no google/youtube account to use mps-yt now?
Yes, please! Can the project maintainers talk to Google about that?
People can watch youtube via their web-interface without any
registration (and tracking), so why should I register my own API key
for mps-youtube?
…--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[email protected]
|
So I looked at an alternative player to handle livestreams (as I could not get those working even prior to this API issue, haha), and came across an application using an OSS tool called invidous [ Website, Github ] (license is stated as AGPLv3); seems they have their own access API setup as well, so may be worth looking into, but also seems like a lot of retooling to point at a different site than YT proper.... |
I don't think average users are going to be able to do create a new API key. |
Just as a workaround for those starting to re-encounter this 403 error with their own API keys (which I started to have when I came across this open issue), some people have pointed out that the Google API can do a poor job of propogating changes to fix issues stack overflow post, so I went and fully deleted my api project, set up a new one from scratch, and created new API credentials. Once done, MPSYT was functional again with the new key. |
With own API, if I disconnect the network or delete the cache that is said in other posts, it goes well but works like 1 day |
Ok... I did all modifications and exchanged the API key for a new key. bout now....the player software does not seem to play musics.....it crashes.... I can search and get a list, but not play anything. |
@sokolgeo I agree with you 100%, and that is exactly what I am doing right now, using fake gmail account with tor proxy. Its getting really hard for non-technically minded people to maintain their privacy and anonymity. But I guess most of the users of mps-youtube are technical because normal people might use tor browser and will not use terminal based app to browse youtube. |
@Jeronimo17 yeah its a real pain, deleting this stupid cache on daily basis. That's why I added an extra command on my i3 config to remove the cache every time it starts. |
@TalhaAkber Also can be done with crontab task. |
Happens the same issue still. I also need to remove cache.py files daily. |
A workaround to removing the cache files is truncating them and then make them readonly. So the polluting API key cannot be written to the cache. I'm no Python dev so I cannot say how big the speed up by using the cache is but I did not feel a difference. For a Linux system, this should work: echo -n '' > ~/.config/mps-youtube/cache_py_*
chmod 444 ~/.config/mps-youtube/cache_py_* The downside is mpsyt complaining about the cachefile not being writeable and you cannot close the program with |
I'm going to use this as an excuse to point to NewPipe again -- their crawler doesn't go through YouTube's API so while they have to write everything themselves, they don't have the problems with quotas or things expiring. With that being in Java, it's obviously not just a drop-in replacement, but if things get to the point of rewriting the entire program, they could definitely be a source of inspiration and general guidance. Personally, I'm more likely to write my own desktop wrapper for that backend than I am to give Google direct access to my view data with an API key. |
Please add the ability to use Invidious (and use Invidious logins), it should solve the API issue as well. |
Unfortunatly, there is no NewPipe for Linux yet : TeamNewPipe/NewPipe#1051 |
Removing the But deleting the youtube-dl --rm-cache-dir I'm using |
@atropo I tried your approach but it was not successful. Are you sure you get the same error message / stack trace as the others in this issue? |
@ag-eitilt What about youtube-dl? |
@DBX12 Sorry, I forgot I have an automatic script that sets my personal api key on mpsyt on every startup |
Of course, first I set my own API key:
Deleting ~/.config/mps-youtube/cache* worked for a while, but I started getting 403 errors again today. Per @atropo I deleted the youtube-dl cache and then it started working. This alias in my .bashrc should be handy:
Sure hope that finally fixes it, mpsyt has been great on a little low power 2008 netbook with lubuntu to listen to music while I work from home. |
Nice alias @annabham 👍 but you could even go a step further and use a function to keep the name of the executable the same: function mpsyt {
rm -f /home/${USER}/.config/mps-youtube/cache*
# You might have to change these lines according to your install location
/home/${USER}/.local/bin/youtube-dl --rm-cache-dir
/home/${USER}/.local/bin/mpsyt
} I'm not using |
What is the simplest resolution to this? And what does 'create a new application' mean here? I thought mps-youtube is a self contained application. |
I had to do the same thing as AyoungDukie, I deleted my entire project at the Google Developers site and created a new one. I also tried refreshing the api key on the old project, but that did not work either. Creating a new project solved all issues. Even set api_key worked fine. I did need to remove the cache files in ~/.config/mps-youtube/cache* after I updated the api_key. |
@trames57 solution should be upvoted as key to solving the issue.
|
So now, each user of unofficial Youtube clients ( If I understand what Google/Youtube are actually doing, it means there won't be anymore anonymous Youtube users anymore except for the the official Youtube client or apps using the NewPipeExtractor crawler API while it's still working for the time being. It's a pity 😞. |
the NewPipeExtractor was/is able to run on Linux TeamNewPipe/NewPipe#1051 (comment) |
I've been using my own API key for a while now with mps-youtube. Then recently it stopped working with the message about "invalid id or quota exceeded". I found that even if I hard coded the API key into the Pafy python library it didn't work. What finally worked for me was to create a new project, add the Youtube Data API to it and then create new Credentials to get the new API key. Just as a side note I decided to set the restriction to just the Youtube API and not leave it as able to access all permissions. However both options worked. |
see #1191 |
It seams that google has disabled the default api key.
The text was updated successfully, but these errors were encountered: