mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
Updates from cloudscraper 1.2.58
This commit is contained in:
parent
f139e6ea94
commit
a757d97a40
1 changed files with 4 additions and 4 deletions
|
|
@ -58,7 +58,7 @@ from .user_agent import User_Agent
|
|||
|
||||
# ------------------------------------------------------------------------------- #
|
||||
|
||||
__version__ = '1.2.56py2'
|
||||
__version__ = '1.2.58py2'
|
||||
|
||||
# ------------------------------------------------------------------------------- #
|
||||
|
||||
|
|
@ -197,7 +197,7 @@ class CloudScraper(Session):
|
|||
@staticmethod
|
||||
def debugRequest(req):
|
||||
try:
|
||||
print(dump.dump_all(req).decode('utf-8'))
|
||||
print(dump.dump_all(req).decode('utf-8', errors='backslashreplace'))
|
||||
except ValueError as e:
|
||||
print("Debug Error: {}".format(getattr(e, 'message', e)))
|
||||
|
||||
|
|
@ -355,7 +355,7 @@ class CloudScraper(Session):
|
|||
resp.headers.get('Server', '').startswith('cloudflare')
|
||||
and resp.status_code in [429, 503]
|
||||
and re.search(
|
||||
r'cpo.src\s*=\s*"/cdn-cgi/challenge-platform/\S+orchestrate/jsch/v1"',
|
||||
r'cpo.src\s*=\s*"/cdn-cgi/challenge-platform/\S+orchestrate/jsch/v1',
|
||||
resp.text,
|
||||
re.M | re.S
|
||||
)
|
||||
|
|
@ -376,7 +376,7 @@ class CloudScraper(Session):
|
|||
return (
|
||||
CloudScraper.is_Captcha_Challenge(resp)
|
||||
and re.search(
|
||||
r'cpo.src\s*=\s*"/cdn-cgi/challenge-platform/\S+orchestrate/captcha/v1"',
|
||||
r'cpo.src\s*=\s*"/cdn-cgi/challenge-platform/\S+orchestrate/captcha/v1',
|
||||
resp.text,
|
||||
re.M | re.S
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue