Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client error 403 #43

Open
theilgaard opened this issue Oct 24, 2024 · 5 comments
Open

Client error 403 #43

theilgaard opened this issue Oct 24, 2024 · 5 comments

Comments

@theilgaard
Copy link

Getting this while searching for a song.

Oops: Could not search for chords: 403 Client Error: Forbidden for url: https://www.ultimate-guitar.com/search.php?search_type=title&value=mr%20jones

@kmille
Copy link
Owner

kmille commented Oct 25, 2024

Which instance do you use? UG started to block IPs. I tried to fix it by using Tor (don't know if/how often external ip s are changed). Ah, I see that now even with Tor it gets blocked.

Commit: f0ab6a3

@4oo4
Copy link

4oo4 commented Nov 16, 2024

Still getting this error on the main instance (freetar.de), but other instances seem to be OK. One solution might be to use AWS API Gateway to proxy requests to UG from a very large pool of IP addresses. API Gateway isn't free but it's extremely cheap.

https://github.com/Ge0rg3/requests-ip-rotator

@kmille
Copy link
Owner

kmille commented Nov 17, 2024

Still getting this error on the main instance (freetar.de), but other instances seem to be OK. One solution might be to use AWS API Gateway to proxy requests to UG from a very large pool of IP addresses. API Gateway isn't free but it's extremely cheap.

https://github.com/Ge0rg3/requests-ip-rotator

Hey,
that sound's interesting. Also thought about adding a simple caching. The thing with requrests-ip-rotator is:

Please note that these requests can be easily identified and blocked, since they are sent with unique AWS headers (i.e. "X-Amzn-Trace-Id").

Cloudflare will detect and block this (probably?). Also see this issue: Ge0rg3/requests-ip-rotator#51. Maybe some of you has a Cloudflare account and can check that?

Hmm, but this seems to work:

curl 'https://www.ultimate-guitar.com/search.php?search_type=title&value=adele' -H "X-Amzn-Trace-Id: 123" > ~/Downloads/index.html

@kmille kmille pinned this issue Nov 17, 2024
@kmille
Copy link
Owner

kmille commented Nov 22, 2024

I tried "some things" and it looks like it's working again. Have not pushed code/released software yet. It's deployed on https://freetar.de. Feel free to test and give feedback!

@4oo4
Copy link

4oo4 commented Mar 1, 2025

I use freetar almost daily and I have not ran into a 403 issue once since whatever changes you made. Before it felt like more than 50% of the time, so whatever you did seems like it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants