Pybaseball currently throwing 403 error - cannot use any functions
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
When running `pybaseball` functions in my Python code, I am unable to use any of the package's functions because I get the following error:
> `get_pitching_leaders("AL")`
> `HTTPError: Error accessing 'https://www.fangraphs.com/leaders-legacy.aspx'. Received status code 403`.
I am also unable to run the functions `pitching_stats()` and `batting_stats()` as the throw the same error. When I click on this [link](https://www.fangraphs.com/leaders-legacy.aspx) (in the error above), it seems Fangraphs is asking for a security check (some sort of CAPTCHA) so Python is unable to access the site and thus, cannot run the code in the functions.
**Python / Version Details**
> `Python version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)]`
> `pybaseball version: 2.2.7`
> `pip-26.0.1`
Can someone please look into how to fix this error? I would be happy to provide more details if needed. Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.