python调用js脚本。首先安装PyExecJS

import execjs

def get_js():
    f = open("tongchengJS.js", 'r', encoding='utf-8')
    line = f.readline()
    htmlstr = ''
    while line:
        htmlstr = htmlstr+line
        line = f.readline()
    return htmlstr


def get_des_psswd(e):
    js_str = get_js()
    ctx = execjs.compile(js_str)
    return (ctx.call('antitoken', e))


print(get_des_psswd(e='1570243707293'))

  

相关文章:

  • 2021-07-10
  • 2022-02-03
  • 2022-02-03
  • 2022-12-23
  • 2022-01-11
  • 2022-01-07
  • 2021-12-23
猜你喜欢
  • 2022-02-03
  • 2021-05-26
  • 2022-12-23
  • 2022-03-07
  • 2022-02-18
  • 2022-12-23
  • 2022-01-15
相关资源
相似解决方案