Aggiornato Cloudscraper:

(Fix per Il Genio dello Streaming)
This commit is contained in:
Alhaziel01
2020-04-23 16:46:11 +02:00
parent 04d86640d6
commit 03ff4bc0be
6 changed files with 119 additions and 19 deletions

View File

@@ -2,6 +2,8 @@ import sys
import logging
import abc
from ..exceptions import CloudflareSolveError
if sys.version_info >= (3, 4):
ABC = abc.ABC # noqa
else:
@@ -10,7 +12,6 @@ else:
# ------------------------------------------------------------------------------- #
interpreters = {}
BUG_REPORT = 'Cloudflare may have changed their technique, or there may be a bug in the script.'
# ------------------------------------------------------------------------------- #
@@ -50,5 +51,6 @@ class JavaScriptInterpreter(ABC):
try:
return float(self.eval(body, domain))
except Exception:
logging.error('Error executing Cloudflare IUAM Javascript. {}'.format(BUG_REPORT))
raise
raise CloudflareSolveError(
'Error trying to solve Cloudflare IUAM Javascript, they may have changed their technique.'
)