How to use another source to find french rap lyrics ?
sanjuant opened this issue · 3 comments
Hello,
I noticed that unfortunately the bank of lyrics for French rap was rather weak.
Is it possible to include another source to have more lyrics available?
Currently via the Deezer API it is possible to retrieve a lot of lyrics. To do this you first need to retrieve the song id https://api.deezer.com/search?q=sch,marche%20noir .
Then you have to call the API with this id.
Source: https://stackoverflow.com/questions/42165724/how-to-get-lyrics-from-the-deezer-api#answer-59822502
I would be happy to contribute if you put me on the track to add sources ;).
Hi,
for adding a source you just have to write a function which fetches the lyrics like this:
Lines 299 to 316 in fb1fdc3
The function has to be added than there (for not synchronized):
Line 179 in fb1fdc3
The problem what I see is the api token. Every source fetches currently the lyrics from the webpage. There is no menu for setting an api token and because most of the users use the .exe file of this program, it would be necessary to add such menu to use the api. (I don't want that everyone uses mine token.) Another idea is to fetch the lyrics from the normal webpage like we do with the other pages
Okay, Thank you for the answer and the examples.
I understand what is at stake. Would it be possible to add the possibility of putting our identifiers for certain services?
Having a free account on Deezer allows you to get a lot of lyrics. But to display these lyrics, you must have a premium account and the lyrics are displayed as you read song with the time code.
To see example of JSON you can see this pastebin : https://pastebin.com/mLg3ZFLh
The current supported format for synchronized lyrics is lrc. With some extra effort, it will be surely possible to get the also the json format displayed.
The easiest way would be to use the settings.ini
to set an api token. The file is loaded here:
spotifylyrics/SpotifyLyrics.pyw
Lines 209 to 300 in fb1fdc3