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

I get $403 error #1

Open
andodeki opened this issue Jun 17, 2024 · 3 comments
Open

I get $403 error #1

andodeki opened this issue Jun 17, 2024 · 3 comments

Comments

@andodeki
Copy link

$ python api.py
/Users/aok/Projects/rustdev/MadeByMakepad/Python/bet365-api-scraper/venv/lib/python3.9/site-packages/urllib3/init.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020
warnings.warn(
2024-06-17 14:58:48,909 - INFO - Running API script...
Initiating request to bet365 API...
HTTP error occurred: 403 Client Error: Forbidden for url: https://mobile.bet365.com/inplaydiaryapi/schedule?timezone=16&lid=33&zid=0
2024-06-17 14:58:49,425 - INFO - Result: None

@HonzaPavel
Copy link

HonzaPavel commented Jun 19, 2024

The solution is this modification:

# import requests
from curl_cffi import requests

and deleting the line:

self.session.mount('https://', HTTPAdapter(max_retries=retries))

@RafaelSoares12
Copy link

Hey @HonzaPavel, thanks for the solution. Do you know how can we get information for a specific event? Has a param for this?

@HonzaPavel
Copy link

HonzaPavel commented Jun 25, 2024

@RafaelSoares12 Unfortunately my websockets hanshake is not working. My problem is here: #2.

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