akashrchandran / spotify-lyrics-api

A Rest API for fetching lyrics from Spotify which is powered by Musixmatch. Commandline version is available at akashrchandran/syrics.
http://github.akashrchandran.in/spotify-lyrics-api/
GNU General Public License v3.0
364 stars 29 forks source link

Always get "Lyrics for this track is not available on spotify" #39

Open Nowaha opened 5 months ago

Nowaha commented 5 months ago

It doesn't matter whether I use ?trackid= or ?url=, but with any track (even the ones given as an example in the readme), I always get: { "error": true, "message": "lyrics for this track is not available on spotify!" }

as a response, despite me having the lyrics on my other monitor.

Not sure if I did something wrong setup wise, I did retrieve my SP_DC minutes prior.

When running the CURL request verbose, I see this:

* Host spclient.wg.spotify.com:443 was resolved.
* IPv6: (none)
* IPv4: 35.186.224.25
*   Trying 35.186.224.25:443...
* Connected to spclient.wg.spotify.com (35.186.224.25) port 443
* ALPN: curl offers h2,http/1.1
* SSL certificate problem: unable to get local issuer certificate
* Closing connection

Setting curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); seems to be a fix, but I don't know if we should be doing this.

d3nnyyy commented 4 months ago

any updates?

Nowaha commented 4 months ago

It's still happening, but perhaps it's a persistent SSL issue on Spotify's end (so maybe we HAVE to set CURLOPT_SSL_VERIFYPEER, which is also done in another request already)

image
aviwad commented 4 months ago

@akashrchandran will have to set a custom user-agent to his calls to Spotify servers. Spotify has started blocking the internal API calls with custom user-agents. I have implemented a similar thing at https://github.com/aviwad/LyricFever/commit/682b60f0b1907d728c3975a015a6b165b2785ced as has https://github.com/raitonoberu/lyricsapi/commit/659da1d2b9064997562ddec8586f2aefd9254d42

aviwad commented 3 months ago

Nevermind Spotify has started blocking free accounts once again. Damnit.

akashrchandran commented 1 month ago

Are you using an ad blocker or have you blacklisted spclient.wg.spotify.com in your hosts file, or something similar?

Nowaha commented 1 month ago

@akashrchandran I do not and have not, no