Fix Cloudscraper
ritornati alla vecchia versione di js2py modificata versione 1.1.24 di cloudscrape
This commit is contained in:
@@ -10,23 +10,17 @@ except ImportError:
|
||||
|
||||
from . import JavaScriptInterpreter
|
||||
|
||||
# ------------------------------------------------------------------------------- #
|
||||
|
||||
|
||||
class ChallengeInterpreter(JavaScriptInterpreter):
|
||||
|
||||
def __init__(self):
|
||||
super(ChallengeInterpreter, self).__init__('v8')
|
||||
|
||||
# ------------------------------------------------------------------------------- #
|
||||
|
||||
def eval(self, jsEnv, js):
|
||||
try:
|
||||
return v8eval.V8().eval('{}{}'.format(jsEnv, js))
|
||||
except (TypeError, v8eval.V8Error):
|
||||
except: # noqa
|
||||
RuntimeError('We encountered an error running the V8 Engine.')
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------- #
|
||||
|
||||
ChallengeInterpreter()
|
||||
|
||||
Reference in New Issue
Block a user