Skip to content

Search raises 403 HTTP error asking for captcha on VPS #191

Answered by allerter
thepeshka asked this question in Q&A
Discussion options

You must be logged in to vote

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")["hits"]
for song in songs:
    song = song["result"]
    if song['title…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@seizoux

This comment has been hidden.

@allerter

This comment has been hidden.

@jvmedenilla

This comment has been hidden.

Answer selected by allerter
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #190 on March 05, 2021 10:14.