精华内容
下载资源
问答
  • 主要介绍了Python使用pyexecjs代码实例解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下
  • Ubuntu16.04使用PyExecJS

    2020-04-07 09:42:07
    使用PyExecJS 在Ubuntu16.04是不可以直接使用PyExecJS的 配置环境 sudo apt-get install nodejs 安装PyExecJS pip3 install -i https://ppi.douban.com/simple/ PyExecJS 使用PyExecJS import execjs # ...

    使用PyExecJS

    在Ubuntu16.04是不可以直接使用PyExecJS的

    • 配置环境

      	sudo apt-get install nodejs
      
    • 安装PyExecJS

      	pip3 install -i https://ppi.douban.com/simple/ PyExecJS
      
    • 使用PyExecJS

      	import execjs
      	# 创建有给PyExecJS对象
      	ejs = execjs.get()
      	# 要执行js文件的内容
      	result = ejs.compile(file_content)
      	# 获取js里面文件里面cookie的值
      	 cookie = result.eval('cookie')
      	 
      	
      
    展开全文
  • python 执行js PyExecJS

    千次阅读 2021-03-02 10:29:40
    pip install PyExecJS 查看执行JS的环境 print(execjs.get().name) 返回值:JScript windows 默认执行JS的环境 返回值:Node.js (V8) 自己安装的NodeJS环境 安装NodeJS 下载: http://nodejs.cn/download/ 安装:...

    pip install PyExecJS

    查看执行JS的环境

    print(execjs.get().name)
    

    返回值:JScript

    • windows 默认执行JS的环境
      返回值:Node.js (V8)
    • 自己安装的NodeJS环境

    安装NodeJS
    下载: http://nodejs.cn/download/
    安装: https://www.runoob.com/nodejs/nodejs-install-setup.html
    如果下载的是zip文件,将解压出来的路径添加到环境变量中即可
    在这里插入图片描述

    查看是否安装成功
    node --version
    在这里插入图片描述

    执行JS
    execjs.eval
    execjs.compile、call

    
    import execjs
    
    # 直接执行
    print('execjs.eval:', execjs.eval(' "a、b、c、d、e".split("、") '))
    
    # 先编译、后调用
    # 将js文件中的内容读取出来编译即可调用里面的方法了
    js_compile = execjs.compile(
        """
        function add(x, y) {
             return x + y;
         }
        """
    )
    
    eval_str = "js_compile.call('add', '{}', '{}')".format('abc', 123)
    print('eval执行的语句:', eval_str)
    print('eval:', eval(eval_str))
    
    print('execjs.compile().call():', js_compile.call('add', 'abc', 123))
    

    在这里插入图片描述

    展开全文
  • 主要介绍了Python利用PyExecJS库执行JS函数,本文通过案例分析给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
  • 安装PyExecJS出现问题

    千次阅读 2018-10-24 13:29:00
    pip install PyExecJS 2、安装出现问题  我在安装时出现如下问---安装pyexecjs出现问题:(pip安装第三方库出现问题) Could not fetch URL ...

    1、正常安装应该是

     pip install PyExecJS

    2、安装出现问题

      我在安装时出现如下问---安装pyexecjs出现问题:(pip安装第三方库出现问题)

    Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) - skipping

    3、解决方案

    1.进入cmd 创建 pip文件夹
    2.进入C:\Users\Administrator在该文件夹下创建pip.ini,写入一下内容:
        [global]
        index-url=http://mirrors.aliyun.com/pypi/simple/
        [install]
        trusted-host=mirrors.aliyun.com
        
    3.接下来配置环境变量  
        C:\Users\Administrator\%HOMEPATH%\pip\pip.ini
    就可以愉快的使用pip了

    4 、python 运行js代码出现问题

    报错:execjs._exceptions.ProgramError: SyntaxError: 缺少标识符、字符串或数字
    解决:
        本地安装node.js(注:配环境变量)

        >>> import execjs
        >>> execjs.get().name
        'Node.js (V8)'

     

    转载于:https://www.cnblogs.com/whm1012/p/9843077.html

    展开全文
  • python执行js之pyexecjs

    千次阅读 2019-08-12 17:15:13
    2、找到js代码,用python第三方库执行相关代码 python2-pyv8 python3-pyexecjs 3、用selenium驱动浏览器 pyexecjs pip install pyexecjs 使用: ''' 遇到问题没人解答?小编创建了一个Python学习交流QQ群:857662006...

    执行js的三种方法
    1、阅读js代码,将之转成python
    2、找到js代码,用python第三方库执行相关代码 python2-pyv8 python3-pyexecjs
    3、用selenium驱动浏览器

    pyexecjs
    pip install pyexecjs
    使用:

    '''
    遇到问题没人解答?小编创建了一个Python学习交流QQ群:857662006 
    寻找有志同道合的小伙伴,互帮互助,群里还有不错的视频学习教程和PDF电子书!
    '''
    import execjs
    
    e = execjs.eval('a = new Array(1,2,3)')#获取js环境,直接执行js代码,适用于较简单的运算
    c = execjs.compile('''
        function add(x,y){
            return x+y;
        };
    ''') #加载js代码,使之应用到当前环境
    
    print(e) #[1,2,3]
    print(c)# <execjs._external_runtime.ExternalRuntime.Context object at 0x000001B84A8AD780> 加载这个函数到环境
    print(c.call('add','1','2')) #调用 add函数,参数为'1'和'2'
    

    如果使用python执行js代码,注意不能出现和页面有交互的代码

    执行js文件

    with open ('1.js',encoding='utf-8') as f:
        js_data = f.read()
    c = execjs.compile(js_data)
    code = "add('{}','{}')".format(x,y) #add是文件中的某个函数,x y是传入的参数
    c.eval(code)
    

    案例:爬取落网单曲

    分析:

    落网单曲中的歌曲是个MP3文件,每次打开在标签中播放,但是在源代码中,找不到mp3文件的链接。

    img

    img

    每次切换歌曲,标签中的src会变化,指向不同的地址。所以我们猜测歌曲的src是由JS生成,而且每次切歌,都会触发JS事件得到新的src。我们在audio标签打上一个断点

    img

    每当src变化时就会暂停,我们可以进而查看JS。

    img

    我们知道切歌时执行的是什么代码了,现在要得到所有的歌曲链接,我们可以在右边的调用栈里逐条分析。一般jq文件不需要关心。

    经过分析,我们大概知道:每次切歌,代码会把当前需要播放的歌曲的编号传给一个函数。函数接收到编号之后,就在播放列表里播放相应歌曲。所以我们的目的是得到播放列表。

    img

    像上面这样,里面由所有歌曲信息,但是调用它的是this对象,this在js里面相当于python中的self,一般用于函数里面当作对象本身。也就是说,谁触发这个函数就是谁,并没有直接定义,所以这种也不能算找到生成列表的JS代码。

    img

    像这样luooPlayer.playlist里面有所有歌曲信息,我们就知道,歌曲信息是存在luooPlayer对象中的playlist属性里,我们就在这个JS文件中搜索luooPlayer对象

    img

    我们发现playlist定义在luooPlayer对象之前,并且作为一个参数传进来而生成luooPlayer对象,所以我们接着搜索playlist的定义,发现就在前几行。

    var playlist = GibberishAES.dec(pl, $.luoo.cfg.aes))

    pl和$.luoo.cfg.aes的值在源文件中可以搜到是一串固定的字符串,我们直接调用这个函数,然后把这两个参数传进去即可。现在我们的难题是得到这个函数,这个时候,我们可以在这个定义playlist的地方打上一个断点,然后用单步进入的方式,得到函数代码!

    img

    复制出JS代码,然后逐步分析,若有调用其他函数和变量,就单步进入或搜索,直至这个N函数能正常执行。

    代码:

    import execjs
    import json
    pl = "U2FsdGVkX1/ATfi1MIpHzPUv6xaJI36DaEkoQCcRX2PuViqIRKR9DLc57LRq0nwOgZnZm4HdnxerYIxl49pQzi5WQ1YCelpkfI/lQztar/Biyjldaz7/QdiMOeuL4TeUpnnYS0GyOxnev/MVBgw8eAklRo1afUxVv4BJlyKn0Ge3nN7ZhVZksMVlb9oN8asF+2LQJ8fdHJOKOpHCcRzMDdew1yW6OhV9mnIzc9V13I1PehSJEFLST1T4vAM9GyFxVx0ILeElF+AdpgrL26hJMYAkR/fA578K9z0OdFMzg9fC5ZZPmEQlIzTLJ0FwYR/tPMz60vAmoAPmSZo1QoWQcdFLPQjFx6BzHDp/eQ9g68FHmVoRqTUouixwc6Y95+Cqe3KkHhlVjiA74n9xZjcCH68FzuSmsO6CU37j7YSYYGj/aK4fJSg9NnTq8hKV/sEUMckX+TQUnMpcszoIBrnpmbUJNnZWj+YT6uARasFsRvrdi4YACUilvx8tT5Dtk2ChJrkbXyqpJWKW7thuk3qIQpfjFh5AVosjj7a7CBKyVy0tI8cgoYH9Qh1B7KMKESWPR7WUGv+LXOm0jebo1M0a7njbJRENN9DfkB6QW3N8++QUbaQ4JHDQDA5i7pcwGGiwPIcSk1PnV4JSySo9gzYM3E3MDzI+VlR8o7jeMQG3PgAsyEDvcgrxoXeoOECRvSaNT3aQQKB/RXUAd6DzHYfNLbxL3TYsRrdRoyHpJRclL9RE5Ge10anSCDGMVX0dfJVbOybLh3piN7JVVpUQpNC9fzffdAsxlaQzUdgApZUtc5Rgy/QePqfptf6U8dqkFPqC6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LaEvAHPNOE9d+Lo4kKdEwKkUcRXGS+K+4EL7CssIBTMSXrRlfN2v4MK2UsdkkUFG7tKbYMEkw98/xZasANt88kZRNNejhqgvR7yhF6X0yCp4uBTd6gGe2bJhZRJWTu+WfmwEEDvb1T1seUf1zqL/zanCc558WXw8/69/hwteN9HDATuX4dpulQ0RNQhzHL6z71rOAqoaOkSQThLar9ywMjqyuhMs8zj7niN7BDQeNyVtURcfd/2o31BSqvTaa4x91l7KJNuyUAWbxt2hNiPH8os+7CvHS96lAlK1cGEGy+WsoC0hboERhRSvYRsyggI1D2fOIn4zq5rhzEOSRsQ6SZfjost12tsbm7DMXyC0FcCA4C36iAx3GkwnMNFVqv8yI0FnIX8q5tSeOuMMfREFDoINubwJRAXXtwYcn8lYd89fhJ2yrY8fdkhqaQNvGxyHvkAR/HaVTEVrFJ4aTDBd2iLwp5795cTWCjvCHRbF7d86sLaOo+N05+wQFuN4o5sB19TOkxWsReHyl2BPX5Fcf7E9cEbO8nNiNCXBf2F8c8StF+ZjtNicxJR3FuvB18e/x85KbAfBi6/SLTPtaU6bP9xtvQUk2HGFwWcGi0ESzNV3x7uz8zfZRVagCYuZ3s2lgxG7qH4c8floxZw8v8T/TkuXMYdn2UVnCNqR2xN2+No3D524x55VCSbkOvnUmD1SaxDnDqSEj1uqRpz500tBREXQGGZ5+FgKsyo9Ul0EkdYquEZ0NwAZQ5nnnk5PbHpMZCP6IE24GQjetV1teCZCcjO60lx3+CZTtQSc7cEFDCg01Qjs87q60wutz1m94gmFOVwAGGkwhEFx9SJHphfJ922nxC"
    aes = 'b6ce159334e155d8'
    with open ('luowang.js',encoding='utf-8') as f:
        code = f.read()
    ctx = execjs.compile(code)
    c = "N('{}','{}')".format(pl,aes)
    data = json.loads(ctx.eval(c))
    for i in data:
        print(i['mp3'])
    

    luowang.js文件:

    '''
    遇到问题没人解答?小编创建了一个Python学习交流QQ群:857662006 
    寻找有志同道合的小伙伴,互帮互助,群里还有不错的视频学习教程和PDF电子书!
    '''
    var N = function(a, b, c) {
        var d = decode(a)
          , e = d.slice(8, 16)
          , f = m(j(b, c), e)
          , g = f.key
          , h = f.iv;
        d = d.slice(16, d.length),
            a = o(d, g, h, c)
        return d,a
    };
    decode = function(b) {
        var a ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
        var c, d = [], e = [], f = [];
        for (c = 0; b.length > c; c += 4)
            e[0] = a.indexOf(b.charAt(c)),
            e[1] = a.indexOf(b.charAt(c + 1)),
            e[2] = a.indexOf(b.charAt(c + 2)),
            e[3] = a.indexOf(b.charAt(c + 3)),
            f[0] = e[0] << 2 | e[1] >> 4,
            f[1] = (15 & e[1]) << 4 | e[2] >> 2,
            f[2] = (3 & e[2]) << 6 | e[3],
            d.push(f[0], f[1], f[2]);
            d = d.slice(0, d.length - d.length % 16)
            return d
    };
    var j = function(a, b) {
        var c, e = [];
        for (b || (a = d(a)),
        c = 0; a.length > c; c++)
            e[c] = a.charCodeAt(c);
        return e
    };
    var  d = function(a) {
        try {
            return unescape(encodeURIComponent(a))
        } catch (b) {
            throw "Error on UTF-8 encode"
        }
    };
    var e = function(a) {
        try {
            return decodeURIComponent(escape(a))
        } catch (b) {
            throw "Bad Key"
        }
    };
    var m = function(c, d) {
        var a = 14, b = 8;
        var e, f = a >= 12 ? 3 : 2, g = [], h = [], i = [], j = [], k = c.concat(d);
        for (i[0] = O(k),
        j = i[0],
        e = 1; f > e; e++)
            i[e] = O(i[e - 1].concat(k)),
            j = j.concat(i[e]);
        return g = j.slice(0, 4 * b),
        h = j.slice(4 * b, 4 * b + 16),
        {
            key: g,
            iv: h
        }
    };
    var O = function(a) {
            function b(a, b) {
                return a << b | a >>> 32 - b
            }
            function c(a, b) {
                var c, d, e, f, g;
                return e = 2147483648 & a,
                f = 2147483648 & b,
                c = 1073741824 & a,
                d = 1073741824 & b,
                g = (1073741823 & a) + (1073741823 & b),
                c & d ? 2147483648 ^ g ^ e ^ f : c | d ? 1073741824 & g ? 3221225472 ^ g ^ e ^ f : 1073741824 ^ g ^ e ^ f : g ^ e ^ f
            }
            function d(a, b, c) {
                return a & b | ~a & c
            }
            function e(a, b, c) {
                return a & c | b & ~c
            }
            function f(a, b, c) {
                return a ^ b ^ c
            }
            function g(a, b, c) {
                return b ^ (a | ~c)
            }
            function h(a, e, f, g, h, i, j) {
                return a = c(a, c(c(d(e, f, g), h), j)),
                c(b(a, i), e)
            }
            function i(a, d, f, g, h, i, j) {
                return a = c(a, c(c(e(d, f, g), h), j)),
                c(b(a, i), d)
            }
            function j(a, d, e, g, h, i, j) {
                return a = c(a, c(c(f(d, e, g), h), j)),
                c(b(a, i), d)
            }
            function k(a, d, e, f, h, i, j) {
                return a = c(a, c(c(g(d, e, f), h), j)),
                c(b(a, i), d)
            }
            function l(a) {
                for (var b, c = a.length, d = c + 8, e = (d - d % 64) / 64, f = 16 * (e + 1), g = [], h = 0, i = 0; c > i; )
                    b = (i - i % 4) / 4,
                    h = 8 * (i % 4),
                    g[b] = g[b] | a[i] << h,
                    i++;
                return b = (i - i % 4) / 4,
                h = 8 * (i % 4),
                g[b] = g[b] | 128 << h,
                g[f - 2] = c << 3,
                g[f - 1] = c >>> 29,
                g
            }
            function m(a) {
                var b, c, d = [];
                for (c = 0; 3 >= c; c++)
                    b = 255 & a >>> 8 * c,
                    d = d.concat(b);
                return d
            }
            var n, o, p, q, r, s, t, u, v, w = [], x = z("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", 8);
            for (w = l(a),
            s = x[0],
            t = x[1],
            u = x[2],
            v = x[3],
            n = 0; w.length > n; n += 16)
                o = s,
                p = t,
                q = u,
                r = v,
                s = h(s, t, u, v, w[n + 0], 7, x[4]),
                v = h(v, s, t, u, w[n + 1], 12, x[5]),
                u = h(u, v, s, t, w[n + 2], 17, x[6]),
                t = h(t, u, v, s, w[n + 3], 22, x[7]),
                s = h(s, t, u, v, w[n + 4], 7, x[8]),
                v = h(v, s, t, u, w[n + 5], 12, x[9]),
                u = h(u, v, s, t, w[n + 6], 17, x[10]),
                t = h(t, u, v, s, w[n + 7], 22, x[11]),
                s = h(s, t, u, v, w[n + 8], 7, x[12]),
                v = h(v, s, t, u, w[n + 9], 12, x[13]),
                u = h(u, v, s, t, w[n + 10], 17, x[14]),
                t = h(t, u, v, s, w[n + 11], 22, x[15]),
                s = h(s, t, u, v, w[n + 12], 7, x[16]),
                v = h(v, s, t, u, w[n + 13], 12, x[17]),
                u = h(u, v, s, t, w[n + 14], 17, x[18]),
                t = h(t, u, v, s, w[n + 15], 22, x[19]),
                s = i(s, t, u, v, w[n + 1], 5, x[20]),
                v = i(v, s, t, u, w[n + 6], 9, x[21]),
                u = i(u, v, s, t, w[n + 11], 14, x[22]),
                t = i(t, u, v, s, w[n + 0], 20, x[23]),
                s = i(s, t, u, v, w[n + 5], 5, x[24]),
                v = i(v, s, t, u, w[n + 10], 9, x[25]),
                u = i(u, v, s, t, w[n + 15], 14, x[26]),
                t = i(t, u, v, s, w[n + 4], 20, x[27]),
                s = i(s, t, u, v, w[n + 9], 5, x[28]),
                v = i(v, s, t, u, w[n + 14], 9, x[29]),
                u = i(u, v, s, t, w[n + 3], 14, x[30]),
                t = i(t, u, v, s, w[n + 8], 20, x[31]),
                s = i(s, t, u, v, w[n + 13], 5, x[32]),
                v = i(v, s, t, u, w[n + 2], 9, x[33]),
                u = i(u, v, s, t, w[n + 7], 14, x[34]),
                t = i(t, u, v, s, w[n + 12], 20, x[35]),
                s = j(s, t, u, v, w[n + 5], 4, x[36]),
                v = j(v, s, t, u, w[n + 8], 11, x[37]),
                u = j(u, v, s, t, w[n + 11], 16, x[38]),
                t = j(t, u, v, s, w[n + 14], 23, x[39]),
                s = j(s, t, u, v, w[n + 1], 4, x[40]),
                v = j(v, s, t, u, w[n + 4], 11, x[41]),
                u = j(u, v, s, t, w[n + 7], 16, x[42]),
                t = j(t, u, v, s, w[n + 10], 23, x[43]),
                s = j(s, t, u, v, w[n + 13], 4, x[44]),
                v = j(v, s, t, u, w[n + 0], 11, x[45]),
                u = j(u, v, s, t, w[n + 3], 16, x[46]),
                t = j(t, u, v, s, w[n + 6], 23, x[47]),
                s = j(s, t, u, v, w[n + 9], 4, x[48]),
                v = j(v, s, t, u, w[n + 12], 11, x[49]),
                u = j(u, v, s, t, w[n + 15], 16, x[50]),
                t = j(t, u, v, s, w[n + 2], 23, x[51]),
                s = k(s, t, u, v, w[n + 0], 6, x[52]),
                v = k(v, s, t, u, w[n + 7], 10, x[53]),
                u = k(u, v, s, t, w[n + 14], 15, x[54]),
                t = k(t, u, v, s, w[n + 5], 21, x[55]),
                s = k(s, t, u, v, w[n + 12], 6, x[56]),
                v = k(v, s, t, u, w[n + 3], 10, x[57]),
                u = k(u, v, s, t, w[n + 10], 15, x[58]),
                t = k(t, u, v, s, w[n + 1], 21, x[59]),
                s = k(s, t, u, v, w[n + 8], 6, x[60]),
                v = k(v, s, t, u, w[n + 15], 10, x[61]),
                u = k(u, v, s, t, w[n + 6], 15, x[62]),
                t = k(t, u, v, s, w[n + 13], 21, x[63]),
                s = k(s, t, u, v, w[n + 4], 6, x[64]),
                v = k(v, s, t, u, w[n + 11], 10, x[65]),
                u = k(u, v, s, t, w[n + 2], 15, x[66]),
                t = k(t, u, v, s, w[n + 9], 21, x[67]),
                s = c(s, o),
                t = c(t, p),
                u = c(u, q),
                v = c(v, r);
            return m(s).concat(m(t), m(u), m(v))
        };
    
    var x = function(a) {
        for (var b = 0; 4 > b; b++)
            a[b] = D[a[b]];
        return a
    };
    var y = function(a) {
        var b, c = a[0];
        for (b = 0; 4 > b; b++)
            a[b] = a[b + 1];
        return a[3] = c,
        a
    };
    var z = function(a, b) {
        var c, d = [];
        for (c = 0; a.length > c; c += b)
            d[c / b] = parseInt(a.substr(c, b), 16);
        return d
    };
    var F = z("01020408102040801b366cd8ab4d9a2f5ebc63c697356ad4b37dfaefc591", 2);
    var D = z("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16", 2);
    var o = function(a, b, c, d) {
        b = w(b);
        var f, h = a.length / 16, i = [], j = [], k = "";
        for (f = 0; h > f; f++)
            i.push(a.slice(16 * f, 16 * (f + 1)));
        for (f = i.length - 1; f >= 0; f--)
            j[f] = q(i[f], b),
            j[f] = 0 === f ? v(j[f], c) : v(j[f], i[f - 1]);
        for (f = 0; h - 1 > f; f++)
            k += g(j[f]);
        return k += g(j[f], !0),
        d ? k : e(k)
    };
    var v = function(a, b) {
        var c, d = [];
        for (c = 0; 16 > c; c++)
            d[c] = a[c] ^ b[c];
        return d
    };
    var w = function(c) {
        var a = 14, b = 8;
            var d, e, f, g, h = [], i = [], j = [];
            for (d = 0; b > d; d++)
                e = [c[4 * d], c[4 * d + 1], c[4 * d + 2], c[4 * d + 3]],
                h[d] = e;
            for (d = b; 4 * (a + 1) > d; d++) {
                for (h[d] = [],
                f = 0; 4 > f; f++)
                    i[f] = h[d - 1][f];
                for (0 === d % b ? (i = x(y(i)),
                i[0] ^= F[d / b - 1]) : b > 6 && 4 === d % b && (i = x(i)),
                f = 0; 4 > f; f++)
                    h[d][f] = h[d - b][f] ^ i[f]
            }
            for (d = 0; a + 1 > d; d++)
                for (j[d] = [],
                g = 0; 4 > g; g++)
                    j[d].push(h[4 * d + g][0], h[4 * d + g][1], h[4 * d + g][2], h[4 * d + g][3]);
            return j
        };
    var c = !1;
    var q = function(b, d) {
        var a = 14;
        c = !0;
        var e, f = u(b, d, a);
        for (e = a - 1; e > -1; e--)
            f = s(f),
            f = r(f),
            f = u(f, d, e),
            e > 0 && (f = t(f));
        return f
    },
        u = function(a, b, c) {
            var d, e = [];
            for (d = 0; 16 > d; d++)
                e[d] = a[d] ^ b[c][d];
            return e
        },
        s = function(a) {
            var b, d = [], e = c ? [0, 13, 10, 7, 4, 1, 14, 11, 8, 5, 2, 15, 12, 9, 6, 3] : [0, 5, 10, 15, 4, 9, 14, 3, 8, 13, 2, 7, 12, 1, 6, 11];
            for (b = 0; 16 > b; b++)
                d[b] = a[e[b]];
            return d
        },r = function(a) {
            var b, d = c ? E : D, e = [];
            for (b = 0; 16 > b; b++)
                e[b] = d[a[b]];
            return e
        }, t = function(a) {
            var b, d = [];
            if (c)
                for (b = 0; 4 > b; b++)
                    d[4 * b] = L[a[4 * b]] ^ J[a[1 + 4 * b]] ^ K[a[2 + 4 * b]] ^ I[a[3 + 4 * b]],
                    d[1 + 4 * b] = I[a[4 * b]] ^ L[a[1 + 4 * b]] ^ J[a[2 + 4 * b]] ^ K[a[3 + 4 * b]],
                    d[2 + 4 * b] = K[a[4 * b]] ^ I[a[1 + 4 * b]] ^ L[a[2 + 4 * b]] ^ J[a[3 + 4 * b]],
                    d[3 + 4 * b] = J[a[4 * b]] ^ K[a[1 + 4 * b]] ^ I[a[2 + 4 * b]] ^ L[a[3 + 4 * b]];
            else
                for (b = 0; 4 > b; b++)
                    d[4 * b] = G[a[4 * b]] ^ H[a[1 + 4 * b]] ^ a[2 + 4 * b] ^ a[3 + 4 * b],
                    d[1 + 4 * b] = a[4 * b] ^ G[a[1 + 4 * b]] ^ H[a[2 + 4 * b]] ^ a[3 + 4 * b],
                    d[2 + 4 * b] = a[4 * b] ^ a[1 + 4 * b] ^ G[a[2 + 4 * b]] ^ H[a[3 + 4 * b]],
                    d[3 + 4 * b] = H[a[4 * b]] ^ a[1 + 4 * b] ^ a[2 + 4 * b] ^ G[a[3 + 4 * b]];
            return d
        },g = function(a, b) {
            var c, d, e = "";
            if (b) {
                if (c = a[15],
                c > 16)
                    throw "Decryption error: Maybe bad key";
                if (16 === c)
                    return "";
                for (d = 0; 16 - c > d; d++)
                    e += String.fromCharCode(a[d])
            } else
                for (d = 0; 16 > d; d++)
                    e += String.fromCharCode(a[d]);
            return e
        };
    var A = function(a) {
        var b, c = [];
        for (b = 0; a.length > b; b++)
            c[a[b]] = b;
        return c
    };
    var B = function(a, b) {
        var c, d;
        for (d = 0,
        c = 0; 8 > c; c++)
            d = 1 === (1 & b) ? d ^ a : d,
            a = a > 127 ? 283 ^ a << 1 : a << 1,
            b >>>= 1;
        return d
    };
    var C = function(a) {
        var b, c = [];
        for (b = 0; 256 > b; b++)
            c[b] = B(a, b);
        return c
    
    };
    var E = A(D);
    var G = C(2)
      , H = C(3)
      , I = C(9)
      , J = C(11)
      , K = C(13)
      , L = C(14);
    

    执行结果:

    http://mp3-cdn2.luoo.net/low/chinese/20171129.mp3
    http://mp3-cdn2.luoo.net/low/chinese/20171127.mp3
    http://mp3-cdn2.luoo.net/low/chinese/20171124.mp3
    http://mp3-cdn2.luoo.net/low/chinese/20171123.mp3
    http://mp3-cdn2.luoo.net/low/chinese/20171122.mp3
    http://mp3-cdn2.luoo.net/low/chinese/20171121.mp3
    http://mp3-cdn2.luoo.net/low/chinese/20171119.mp3

    展开全文
  • 解决No module named pyexecjs

    热门讨论 2020-06-24 14:19:50
    首先,不知道什么时候安装的pyexecjs,于是上代码的时候很自然就import pyexecjs,接着就有了上面的图和问题 解决 这又是一个容易忽视的可爱的它:下载的模块名和导入的包名不一致 改成import execjs,即可使用 ...
  • PyExecJS安装 pip install PyExecJS PyExecJS 的基本使用: >>> import execjs >>> execjs.eval("'red yellow blue'.split(' ')") ['red', 'yellow', 'blue'] >>> ctx = ...
  • Python利利用用PyExecJS库库执执行行JS函函数数的的案案例例分分析析 这篇文章主要介绍了Python利用PyExecJS库执行JS函数,本文通过案例分析给大家介绍的非常详细具有一定的参 考借鉴 值需要的朋友可以参考下 在Web...
  • Pyexecjs的使用 一,下载 pip install pyexecjs import execjs 二,使用 2.1,使用eval直接执行 import execjs print(execjs.eval('"abc aaa bbb".split(" ")')) ['abc', 'aaa', 'bbb'] # 调用变量名 text = ...
  • 首先下载pyexecjs: pip install PyExecJS 如果有需要,自行下载PyV8 , Node.js , PhantomJS等 使用参考:https://github.com/doloopwhile/PyExecJS PyExecJS文档:https://pypi.org/project/PyExecJS/ 此次...
  • PyExecJS是从Ruby移植来的ExecJS,自动选择最佳运行环境来执行JavaScript程序。缺点是慢且不完全支持运行环境特性
  • python3执行js之pyexecjs

    千次阅读 2018-08-04 18:25:00
    执行js的三种方法:1、阅读js代码,将之转成python2、找到js代码,用python第三方库执行相关代码 python2-pyv8 python3-pyexecjs3、用selenium驱动浏览器 pyexecjs pip install pyexecjs使用: import execjs ...
  • 一. 安装node.js环境 安装NodeJS ...测试安装成功可在控制台输入:node --version 二. 安装PyExecJS 源:...安装:pip install PyExecJS 查看执行JS的环境: import execjs # 返回:JScrip
  • 反爬虫之JS反编译:PyExecJS PyExecJS是python运行JavaScript代码的包安装: pip install PyExecJS (或者easy_installPyExecJS)依赖: 需要有执行JS的程序,如:PyV8 , Node.js , PhantomJS等,请自行安装事例...
  • pyexecjs (python 执行 javescript 代码)

    千次阅读 2018-12-28 13:54:40
    可以用python的一个第三方库 pyexecjs 在pyton中执行js代码 (前提:不要求会写js,但是得能看懂) pyexecjs 安装 pip install PyExecJS 因为要执行js代码所以需要安装执行js代码所需要的环境这里使用的是node.js ...
  • pyexecjs模块

    2019-10-01 23:26:03
    1,找到断点事件 2,浏览call stack 下面的代码,找到需要的值 3,F11进入方法内部 对于网站自己定义的方法,可以用py复制下来进行执行js N = function (a, b, c) { var d = decode(a) , e = d.slice(8,16) , f = ...
  • pip install pyexecjs -i http://pypi.doubanio.com 使用方法如下 import execjs # 读取文件并编译 test = open("test.js").read() exe = execjs.compile(test) # 调用test.js中的encrypt方法,传入参数 ...
  • $ pip install PyExecJS 示例 import execjs execjs.eval(&amp;quot;new Date()&amp;quot;) # u'2018-09-08T09:11:35.248Z' js = &amp;quot;&amp;quot;&amp;quot; function add(x, y){ ...
  • 一、Python执行JS代码--PyExecJS、PyV8、Js2Py 1.1、PyExecJS  PyExecJS的优点是您不需要照顾JavaScript环境。特别是,它可以在Windows环境中运行,而无需安装额外的库。PyExecJS的缺点之一是性能。PyExecJS通过...
  • Python中执行javascript的模块(pyexecjs)

    千次阅读 2020-01-08 16:49:22
    首先安装该模块:pip install pyexecjs import execjs a = "function add(x,y){ return x+y; }" #一个有参函数 b = "function out(){ return 'hello'; }" #一个无参函数 x = execjs.compile(a) #将js加载进execjs...
  • python3爬虫如何使用pyExecJS解析js代码

    千次阅读 2019-06-24 15:22:10
    网络爬虫难免会遇到JS加密,当遇到比较难搞得JS加密时, 很多小伙伴会选择使用selenium+Chrome, 但是selenium有时候未必是万能的, 特别是浏览器在headless会出现一些不好解决的BUG,最关键的是效率!...pyExecJs ...
  • ubuntu python3.6 安装 pyexecjs + nodejs/pyv8

    千次阅读 2018-05-13 21:46:19
    1.通过pip安装pyexecjs$ pip install PyExecJs2.安装node.js$ sudo apt-get install nodejs3.python测试import execjs default=execjs.get(execjs.runtime_names.Node)听说v8非常强大,于是就试着安装了下,不过这一...
  • 运行需要用到pyexecjs,使用scrapydweb启动会报错“Could not find an available JavaScript runtime”;但是我node安装了而且是全局。我去上传部署的位置scrapy 命令启动没有报错;在win本地运行...
  • 目前网上最流行的有三种( pyexecjs、pyv8、js2py )让 Python 调用 nodejs 的依赖库,但他们都有很大的问题,不建议使用。 不建议的原因 pyexecjs 乍一看作者还在维护,其实作者已经表示这个库要没了,EOL 不在...
  • 本篇文章小编给大家分享一下Python使用pyexecjs代码案例解析,文章代码介绍的很详细,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看。针对现在大部分的网站都是使用js加密,js加载的,并...
  • 一、简介 测试js代码时在命令行使用node.js,可发现执行...执行js代码的复杂度:pyExecJS最高,Js2Py最低,一般混淆代码需要pyExecJS来执行 二、执行代码 1、node.js 安装:Mac:brew install node 使用:node x...
  • 使用docker运行一个简单的程序,其中用到了PyExecJS包,本机运行,没有遇到过什么问题,但部署到docker环境上后,部署成功,但是在执行过程中报错 ”Could not find an available JavaScript runtime“, 原因是在...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 811
精华内容 324
关键字:

pyexecjs