rembo10 / headphones

Automatic music downloader for SABnzbd
GNU General Public License v3.0
3.35k stars 603 forks source link

Last.fm API Key Suspended, Getting HTTP 403 #3257

Closed gadkarisid closed 3 years ago

gadkarisid commented 3 years ago

When searching for artists, I'm seeing HTTP 403 errors in the logs. Looks like a suspended API key. Here's are the debug messages from the log:

`

Timestamp Level Message
2020-10-15 19:05:28 DEBUG Requesting URL via GET method: http://ws.audioscrobbler.com/2.0/
2020-10-15 19:05:28 DEBUG Last.FM call parameters: {'format': 'json', 'api_key': '6168e725d96eef5856fbf679954abf2b', 'method': 'artist.getinfo', 'artist': 'Nine Inch Nails'}
2020-10-15 19:05:28 DEBUG Calling Last.FM method: artist.getinfo
2020-10-15 19:05:28 ERROR Error calling Last.FM method: artist.getinfo
2020-10-15 19:05:28 DEBUG Server responded with message: {"error":26,"message":"API Key Suspended - This application is not allowed to make requests to the web services"}
2020-10-15 19:05:28 DEBUG Sleeping 0.199660968781 (interval)
2020-10-15 19:05:28 ERROR Request raise HTTP error with status code 403 (local client error).
2020-10-15 19:05:28 DEBUG Last.FM call parameters: {'mbid': '678d88b2-87b0-403b-b63d-5da7465aecc3', 'api_key': '6168e725d96eef5856fbf679954abf2b', 'method': 'artist.getinfo', 'format': 'json'}
2020-10-15 19:05:28 DEBUG Calling Last.FM method: artist.getinfo
2020-10-15 19:05:28 DEBUG Requesting URL via GET method: http://ws.audioscrobbler.com/2.0/
2020-10-15 19:05:28 DEBUG Last.FM call parameters: {'mbid': 'b7ffd2af-418f-4be2-bdd1-22f8b48613da', 'api_key': '6168e725d96eef5856fbf679954abf2b', 'method': 'artist.getinfo', 'format': 'json'}
2020-10-15 19:05:28 DEBUG Calling Last.FM method: artist.getinfo
2020-10-15 19:05:29 ERROR Error calling Last.FM method: artist.getinfo
2020-10-15 19:05:29 DEBUG Server responded with message: {"error":26,"message":"API Key Suspended - This application is not allowed to make requests to the web services"}
2020-10-15 19:05:29 ERROR Request raise HTTP error with status code 403 (local client error).
2020-10-15 19:05:29 DEBUG Requesting URL via GET method: http://ws.audioscrobbler.com/2.0/
2020-10-15 19:05:29 ERROR Error calling Last.FM method: artist.getinfo
2020-10-15 19:05:29 DEBUG Server responded with message: {"error":26,"message":"API Key Suspended - This application is not allowed to make requests to the web services"}
2020-10-15 19:05:29 DEBUG Sleeping 0.199615907669 (interval)
2020-10-15 19:05:29 ERROR Request raise HTTP error with status code 403 (local client error).

`

glenlivet99 commented 3 years ago

I'm seeing the same thing. Looks like there is an API key in lastfm.py that can be changed. I'm going to try it.

edimusxero commented 3 years ago

I tried my own personal API but the error remains the same

AdeHub commented 3 years ago

Added a new api key, now in master

If you want to use your own then change this line https://github.com/rembo10/headphones/blob/379fd3d0b83f8dccd3dfbfcd46e33ce479cdc9d0/headphones/cache.py#L22

gadkarisid commented 3 years ago

Thanks @AdeHub! I got the message within the Headphones web UI saying there was an update available, ran the update, and now everything is looking good.

NimdaBE commented 3 years ago

i've tried to change the cache.py file in my docker container, but now it's not even trying to connect to the last.fm api with my key, but with a totally different api key...?

The key i've entered starts with 798 (and is still in the cache.py file after a reboot), the logs say it's giving errors on an api key starting with 395, which is even different from the api key that was in the cache.py file before i made the changes?