Closed thepeshka closed 3 years ago
Genius.search_song
is a convenience method and calls the following methods:
genius.search_all
genius.song
genius.lyrics
But as you have experienced, VPS and proxy users are very likely to get a 403 error because of Genius's captcha service. Even If we switched to using api.genius.com/search
, you would still get a 403 error in genius.lyrics
.
I suggest either going behind a proxy that works for Genius or limiting your calls to developers' API methods. For example, if you wanted to search for a song and get its info, you could try this which only uses developers' API methods:
songs = genius.search_songs("Eminem Rap God")["songs"]
for song in songs:
if song['title'] == "Rap God":
song_id = song['id']
song = genius.song(song_id)
You can view the list of developers' API methods in the docs.
@allerter I didn't thought about this. That's sad. Btw, thanks for explanation!
Lib should use
api.genius.com/search
if token provided.Expected behavior Lyrics returned
To Reproduce
Version info
3.0.0
Additional context Reproduced on VPS located in Germany. Locally everything works fine.