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

403 Client Error: Forbidden for url #57

Closed
juliancamp opened this issue Sep 1, 2019 · 4 comments
Closed

403 Client Error: Forbidden for url #57

juliancamp opened this issue Sep 1, 2019 · 4 comments

Comments

@juliancamp
Copy link

A 403 Client Error: Forbidden for url is thrown in billboard.py.

Error occurs at self.fetchEntries() at line 152.

Error occurs at line 199 inside the fetchEntries function.

line 199: req = requests.get(url, timeout=self._timeout)

This error most likely occurs because billboard added some kind of new scraping safeguard.

The way I got around this was by changing the Headers User Agent to this:

'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'

It's the latest User Agent for Chrome. It should solve any problems having to do with a 403 Client Error: Forbidden for url.

@guoguo12
Copy link
Owner

guoguo12 commented Sep 1, 2019

Thanks! This should have already been fixed in the latest version (5.2.2). Does that version not work for you?

@juliancamp
Copy link
Author

juliancamp commented Sep 1, 2019

I'm sorry, I was still on 5.0.2. My fault. I just updated to the latest version (5.2.2) and it works perfectly. Thanks for creating and keeping this project up to date! I really appreciate all the time and work you put in. Let me know if you ever need any help.

@abigailrose
Copy link

I'm having this error with billboard 5.3.0 and Python 3.6

@emo-eth
Copy link
Collaborator

emo-eth commented Nov 3, 2019

I'm having this error with billboard 5.3.0 and Python 3.6

I was able to grab the hot-100 chart on my machine with billboard 5.3.0 and python 3.7.1.
It could be a couple things:
Have you been grabbing a lot of chart data recently? It could be some sort of IP filtering on Billboard's end.
Alternatively, double check that the pip you're using to install is the pip bundled with python 3, and not some version of python 2 (or other installed python). It could be installing the latest billboard for the wrong python.
Aside from that, I'm not too sure what the issue could be without reproducing it locally.

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

4 participants