moehmeni / syncedlyrics

Get an LRC format (synchronized) lyrics for your music
MIT License
188 stars 18 forks source link

API can't find lyrics, but CLI can #38

Closed jagauthier closed 1 month ago

jagauthier commented 1 month ago

I want to expand on the issue I am seeing with the API that I mentioned here: https://github.com/moehmeni/syncedlyrics/issues/35

I ran another test today, command line versus python API.

$ syncedlyrics  -v "Faster Pussycat Don't Change that song"
DEBUG:syncedlyrics:Looking for an LRC on Lrclib
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): lrclib.net:443
DEBUG:urllib3.connectionpool:https://lrclib.net:443 "GET /api/search?q=Faster+Pussycat+Don%27t+Change+that+song HTTP/1.1" 200 17527
DEBUG:urllib3.connectionpool:https://lrclib.net:443 "GET /api/get/2102747 HTTP/1.1" 200 3743
INFO:syncedlyrics:synced-lyrics found for "Faster Pussycat Don't Change that song" on Lrclib

The lyrics for the song are then dumped to stdout.

Now, if I run this python code:

import syncedlyrics

providers = ["NetEase", "LrcLib", "Musixmatch"] 

lrc = syncedlyrics.search("Faster Pussycat Don't Change That Song", allow_plain_format=True, save_path="test.lrc", providers=providers)
print(lrc)

No lyrics.

After some more debugging, I found that using "providers" causes the issue.

moehmeni commented 1 month ago

I am getting the same result for both, did you clone the repo, remove the old version, and use the latest code?

jagauthier commented 1 month ago

I was out of date, I think. Sorry for the false alarm!