import js2py as js2py
#速度慢 而且js程式碼裡面只能有一個函式
def method_js2py(js_path,encrypt_data):
with open(js_path, 'r') as f:
js_code = f.read()
func = js2py.eval_js(js_code)
return func(encrypt_data)
import js2py as js2py
#速度慢 而且js程式碼裡面只能有一個函式
def method_js2py(js_path,encrypt_data):
with open(js_path, 'r') as f:
js_code = f.read()
func = js2py.eval_js(js_code)
return func(encrypt_data)