-
-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use newer ssl context proto version method.
- Loading branch information
Showing
1 changed file
with
3 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cbb3c0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK so it looks like this explains why I am receiving the following errors on some sites:
e.g.
File "/usr/local/lib/python3.9/site-packages/cloudscraper/__init__.py", line 259, in request self.perform_request(method, url, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/cloudscraper/__init__.py", line 192, in perform_request return super(CloudScraper, self).request(method, url, *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 517, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='www.kentonline.co.uk', port=443): Max retries exceeded with url: /medway/sport/dynamos-fight-back-against-solent-but-lose-out-to-the-reigni-312973/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)'))) ". 0
Is there a recommended way to handle this sort of error?
I am using like so:
cbb3c0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually even with 1.2.68 I am getting some errors:
e.g.
cbb3c0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and similar when using dev version .71. So probably not related to this change
e.g.
cbb3c0e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I was able to solve work around be changing the cipher
e.g.
browser={
'browser': 'chrome',
'platform': 'android',
'desktop': False
}
scraper = cloudscraper.create_scraper(browser, ecdhCurve='secp384r1')
https://github.com/VeNoMouS/cloudscraper?tab=readme-ov-file#example-14
thanks