JAVASCRPIT文件的python执行

query = 'Hello spider'
        with open( 'baidutrans.js' , 'r' , encoding='utf-8' ) as f:
            ctx = execjs.compile( f.read() )
        sign = ctx.call( 'e' , query )

 

posted @ 2019-10-28 21:02  Raymone1125  阅读(126)  评论(0编辑  收藏  举报