genius-lyrics-api icon indicating copy to clipboard operation
genius-lyrics-api copied to clipboard

Error 403 (Captcha)

Open nicokimmel opened this issue 2 years ago • 5 comments

I got the same problem as one of the closed (and never solved) issues. Its working on my computer but when I push it to the server it only returns 403. Maybe its the reverse proxy that causes the issue. It returns html that contains some sort of captcha.

Code is quite simple:

const genius = require('genius-lyrics-api')

function getLyrics(title) {
	var searchOptions = {
		title: title,
		artist: " ",
		apiKey: "XXX",
		optimizeQuery: true
	}
	genius.getLyrics(searchOptions).then((lyrics) => {
		console.log(lyrics);
	});
}

Originally posted by @nicokimmel in https://github.com/farshed/genius-lyrics-api/issues/21#issuecomment-1013609298

nicokimmel avatar Jan 15 '22 04:01 nicokimmel

Seeing the same issue, find any fix?

mepc36 avatar Mar 10 '22 13:03 mepc36

Same here.

jrejaud avatar Sep 03 '22 11:09 jrejaud

i am also getting this error i was able to use it before but now i cannot use it on any server i tried one from https://bluefoxhost.com and https://replit.com

DAREALYTYGRUNN1NGARK456 avatar Sep 08 '22 00:09 DAREALYTYGRUNN1NGARK456

I fixed it by running my calls through a rotating proxy

jrejaud avatar Sep 08 '22 01:09 jrejaud

May I ask where your server is hosted? And is the captcha returned when you make too many requests or even on the first one?

It could be that Genius's firewall is blacklisting the popular server hosting IPs and is thus aware that a request originating from there is likely coming from a bot. I'm afraid there's not much that I can do here. Try looking into whether it's possible to hide your IP from the requests.

farshed avatar Jul 01 '23 17:07 farshed