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)