KoD 0.5.2
- Fix Parziale Cloudflare - Maggiore Reattività - Su ANDROID alcuni siti es. SerieHD e GuardaSerie.click non funzionano
This commit is contained in:
Executable → Regular
+10
-3
@@ -9,6 +9,9 @@ except ImportError:
|
||||
raise RuntimeError('Please install the python module v8eval either via pip or download it from https://github.com/sony/v8eval')
|
||||
|
||||
from . import JavaScriptInterpreter
|
||||
from .encapsulated import template
|
||||
|
||||
# ------------------------------------------------------------------------------- #
|
||||
|
||||
|
||||
class ChallengeInterpreter(JavaScriptInterpreter):
|
||||
@@ -16,11 +19,15 @@ class ChallengeInterpreter(JavaScriptInterpreter):
|
||||
def __init__(self):
|
||||
super(ChallengeInterpreter, self).__init__('v8')
|
||||
|
||||
def eval(self, jsEnv, js):
|
||||
# ------------------------------------------------------------------------------- #
|
||||
|
||||
def eval(self, body, domain):
|
||||
try:
|
||||
return v8eval.V8().eval('{}{}'.format(jsEnv, js))
|
||||
except: # noqa
|
||||
return v8eval.V8().eval(template(body, domain))
|
||||
except (TypeError, v8eval.V8Error):
|
||||
RuntimeError('We encountered an error running the V8 Engine.')
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------- #
|
||||
|
||||
ChallengeInterpreter()
|
||||
|
||||
Reference in New Issue
Block a user