这一题有点儿误打误撞的感觉。
本题使用了抓包工具Fiddler,m值在cookie里面,而且这个cookie是本地生成的
抓包发现有两次请求,第一次返回了一堆JS,而且cookie里面没有m值,第二次请求就带上了m值,所以m应该是返回的JS生成的,所以对返回的JS复制下来进行分析
复制下来之后就是一堆这玩意儿,不太好读代码,先用工具解混淆
然后代码就容易阅读了
分析代码,先看看cookie的格式
document["cookie"] = "m" + _0x18af09() + "=" + _0x102a4a(_0xa9034b) + "|" + _0xa9034b + "; path=/";
m=777a08f281273fa63d279a12282a27c5|1684832974000
从上面就可以分析出来:_0x18af09()
这个肯定返回了一个空字符串,所以重点应该是_0x102a4a(_0xa9034b)
,它生成了m前段的值,_0x102a4a
这个函数接收的参数,是一个时间戳
用颜色区分,更容易观察_0x18af09
这个方法既然返回了一个空,会不会内部有别的操作,查看这个函数发现,它是对代码是否格式化的检测,是反爬虫调试的,所以这个方法的调用全部注释掉,然后把自执行函数修改删除,整理之后的代码:
qz = [10, 99, 111, 110, 115, 111, 108, 101, 32, 61, 32, 110, 101, 119, 32, 79, 98, 106, 101, 99, 116, 40, 41, 10, 99, 111, 110, 115, 111, 108, 101, 46, 108, 111, 103, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 115, 41, 32, 123, 10, 32, 32, 32, 32, 119, 104, 105, 108, 101, 32, 40, 49, 41, 123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 102, 111, 114, 40, 105, 61, 48, 59, 105, 60, 49, 49, 48, 48, 48, 48, 48, 59, 105, 43, 43, 41, 123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 104, 105, 115, 116, 111, 114, 121, 46, 112, 117, 115, 104, 83, 116, 97, 116, 101, 40, 48, 44, 48, 44, 105, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 125, 10, 32, 32, 32, 32, 125, 10, 10, 125, 10, 99, 111, 110, 115, 111, 108, 101, 46, 116, 111, 83, 116, 114, 105, 110, 103, 32, 61, 32, 39, 91, 111, 98, 106, 101, 99, 116, 32, 79, 98, 106, 101, 99, 116, 93, 39, 10, 99, 111, 110, 115, 111, 108, 101, 46, 108, 111, 103, 46, 116, 111, 83, 116, 114, 105, 110, 103, 32, 61, 32, 39, 402, 32, 116, 111, 83, 116, 114, 105, 110, 103, 40, 41, 32, 123, 32, 91, 110, 97, 116, 105, 118, 101, 32, 99, 111, 100, 101, 93, 32, 125, 39, 10];var _0x59ccfb = function () {var _0x1b4dea = true;return function (_0x259216, _0x3577c6) {var _0xbb162d = _0x1b4dea ? function () {if (_0x3577c6) {var _0x12d896 = _0x3577c6["apply"](_0x259216, arguments);_0x3577c6 = null;return _0x12d896;}} : function () {};_0x1b4dea = false;return _0xbb162d;};
}();var _0x18fc8e = function () {var _0x3239bd = true;return function (_0x326b22, _0x4e96d2) {var _0x227598 = _0x3239bd ? function () {if (_0x4e96d2) {var _0x656b78 = _0x4e96d2["apply"](_0x326b22, arguments);_0x4e96d2 = null;return _0x656b78;}} : function () {};_0x3239bd = false;return _0x227598;};
}();function _0x14c966(_0x194910, _0x173b58) {var _0x260bc5 = (65535 & _0x194910) + (65535 & _0x173b58);return (_0x194910 >> 16) + (_0x173b58 >> 16) + (_0x260bc5 >> 16) << 16 | 65535 & _0x260bc5;
}function _0x5dfa06(_0x532a20, _0x533aa9) {return _0x532a20 << _0x533aa9 | _0x532a20 >>> 32 - _0x533aa9;
}function _0x3e81cf(_0x2792eb, _0x1d0738, _0x501597, _0x34858a, _0x25d2b3, _0x19aa5a) {return _0x14c966(_0x5dfa06(_0x14c966(_0x14c966(_0x1d0738, _0x2792eb), _0x14c966(_0x34858a, _0x19aa5a)), _0x25d2b3), _0x501597);
}function _0x3a2b5a(_0x151a19, _0x5a4430, _0x2b266e, _0x15b1ee, _0x17080a, _0x49e3f9, _0x5c1555) {return _0x3e81cf(_0x5a4430 & _0x2b266e | ~_0x5a4430 & _0x15b1ee, _0x151a19, _0x5a4430, _0x17080a, _0x49e3f9, _0x5c1555);
}function _0x440c24(_0x369c8e, _0x2f6fcc, _0xef60f4, _0x51bb51, _0x5f270f, _0x14b623, _0xc35404) {return _0x3e81cf(_0x2f6fcc & _0x51bb51 | _0xef60f4 & ~_0x51bb51, _0x369c8e, _0x2f6fcc, _0x5f270f, _0x14b623, _0xc35404);
}function _0x5b940e(_0x4d19ec, _0x1595e6) {let _0x5e3c9d = [99, 111, 110, 115, 111, 108, 101];let _0xb76cea = "";for (let _0x508a42 = 0; _0x508a42 < _0x5e3c9d["length"]; _0x508a42++) {_0xb76cea += String["fromCharCode"](_0x5e3c9d[_0x508a42]);}return _0xb76cea;
}function _0x31fb05(_0xd9e3c1, _0x329f8c, _0x541e60, _0x22212f, _0x5cab07, _0x4e80d7, _0x4571e1) {return _0x3e81cf(_0x329f8c ^ _0x541e60 ^ _0x22212f, _0xd9e3c1, _0x329f8c, _0x5cab07, _0x4e80d7, _0x4571e1);
}function _0x1386af(_0xa56ba0, _0x45215a, _0x29d4f5, _0x28549f, _0xa8a737, _0x4b3f90, _0x3049c4) {return _0x3e81cf(_0x29d4f5 ^ (_0x45215a | ~_0x28549f), _0xa56ba0, _0x45215a, _0xa8a737, _0x4b3f90, _0x3049c4);
}function _0x4663ee(_0xaed4be, _0x6dee0e) {if (_0x6dee0e) {return _0x1386af(_0xaed4be);}return _0x5b940e(_0xaed4be);
}function _0x8043ca(_0x3e86ac, _0x28fb3c) {let _0x5e1dda = "";for (let _0x2aa724 = 0; _0x2aa724 < _0x3e86ac["length"]; _0x2aa724++) {_0x5e1dda += String["fromCharCode"](_0x3e86ac[_0x2aa724]);}return _0x5e1dda;
}function _0x18af09(_0x1388af, _0x250fcc) {return ""var _0x492e01 = _0x59ccfb(this, function () {var _0xe6462d = function () {var _0x462b61 = _0xe6462d["constructor"]("return /\" + this + \"/")()["compile"]("^([^ ]+( +[^ ]+)+)+[^ ]}");return !_0x462b61["test"](_0x492e01);};return _0xe6462d();});_0x492e01();(function () {_0x18fc8e(this, function () {var _0x340927 = new RegExp("function *\\( *\\)");var _0x4466d1 = new RegExp("\\+\\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", "i");var _0xc20892 = $dbsm_0x9b56a8("init");if (!_0x340927["test"](_0xc20892 + "chain") || !_0x4466d1["test"](_0xc20892 + "input")) {_0xc20892("0");} else {$dbsm_0x9b56a8();}})();})();_0x4663ee();qz = [10, 99, 111, 110, 115, 111, 108, 101, 32, 61, 32, 110, 101, 119, 32, 79, 98, 106, 101, 99, 116, 40, 41, 10, 99, 111, 110, 115, 111, 108, 101, 46, 108, 111, 103, 32, 61, 32, 102, 117, 110, 99, 116, 105, 111, 110, 32, 40, 115, 41, 32, 123, 10, 32, 32, 32, 32, 119, 104, 105, 108, 101, 32, 40, 49, 41, 123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 102, 111, 114, 40, 105, 61, 48, 59, 105, 60, 49, 49, 48, 48, 48, 48, 48, 59, 105, 43, 43, 41, 123, 10, 32, 32, 32, 32, 32, 32, 32, 32, 104, 105, 115, 116, 111, 114, 121, 46, 112, 117, 115, 104, 83, 116, 97, 116, 101, 40, 48, 44, 48, 44, 105, 41, 10, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 125, 10, 32, 32, 32, 32, 125, 10, 10, 125, 10, 99, 111, 110, 115, 111, 108, 101, 46, 116, 111, 83, 116, 114, 105, 110, 103, 32, 61, 32, 39, 91, 111, 98, 106, 101, 99, 116, 32, 79, 98, 106, 101, 99, 116, 93, 39, 10, 99, 111, 110, 115, 111, 108, 101, 46, 108, 111, 103, 46, 116, 111, 83, 116, 114, 105, 110, 103, 32, 61, 32, 39, 402, 32, 116, 111, 83, 116, 114, 105, 110, 103, 40, 41, 32, 123, 32, 91, 110, 97, 116, 105, 118, 101, 32, 99, 111, 100, 101, 93, 32, 125, 39, 10];eval(_0x8043ca(qz));try {if (global) {console["log"]("人生苦短,何必python?");} else {while (1) {console["log"]("人生苦短,何必python?");debugger;}}} catch (_0x4a1afa) {return navigator["vendorSub"];}
}// setInterval(_0x18af09(), 500);function _0x1fe562(_0x599b70, _0x16a6a9) {_0x599b70[_0x16a6a9 >> 5] |= 128 << _0x16a6a9 % 32, _0x599b70[14 + (_0x16a6a9 + 64 >>> 9 << 4)] = _0x16a6a9;if (qz) {var _0x361523,_0x31dd72,_0x954427,_0x4cb172,_0x3bf2cc,_0x5dd2eb = 1732584193,_0x5793bb = -271733879,_0x359294 = -1732584194,_0x16e6cd = 271733878;} else {var _0x361523,_0x31dd72,_0x954427,_0x4cb172,_0x3bf2cc,_0x5dd2eb = 0,_0x5793bb = -0,_0x359294 = -0,_0x16e6cd = 0;}for (_0x361523 = 0; _0x361523 < _0x599b70["length"]; _0x361523 += 16) _0x31dd72 = _0x5dd2eb, _0x954427 = _0x5793bb, _0x4cb172 = _0x359294, _0x3bf2cc = _0x16e6cd, _0x5dd2eb = _0x3a2b5a(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523], 7, -680876936), _0x16e6cd = _0x3a2b5a(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 1], 12, -389564586), _0x359294 = _0x3a2b5a(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 2], 17, 606105819), _0x5793bb = _0x3a2b5a(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 3], 22, -1044525330), _0x5dd2eb = _0x3a2b5a(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 4], 7, -176418897), _0x16e6cd = _0x3a2b5a(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 5], 12, 1200080426), _0x359294 = _0x3a2b5a(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 6], 17, -1473231341), _0x5793bb = _0x3a2b5a(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 7], 22, -45705983), _0x5dd2eb = _0x3a2b5a(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 8], 7, 1770010416), _0x16e6cd = _0x3a2b5a(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 9], 12, -1958414417), _0x359294 = _0x3a2b5a(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 10], 17, -42063), _0x5793bb = _0x3a2b5a(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 11], 22, -1990404162), _0x5dd2eb = _0x3a2b5a(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 12], 7, 1804603682), _0x16e6cd = _0x3a2b5a(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 13], 12, -40341101), _0x359294 = _0x3a2b5a(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 14], 17, -1502882290), _0x5793bb = _0x3a2b5a(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 15], 22, 1236535329), _0x5dd2eb = _0x440c24(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 1], 5, -165796510), _0x16e6cd = _0x440c24(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 6], 9, -1069501632), _0x359294 = _0x440c24(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 11], 14, 643717713), _0x5793bb = _0x440c24(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523], 20, -373897302), _0x5dd2eb = _0x440c24(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 5], 5, -701558691), _0x16e6cd = _0x440c24(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 10], 9, 38016083), _0x359294 = _0x440c24(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 15], 14, -660478335), _0x5793bb = _0x440c24(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 4], 20, -405537848), _0x5dd2eb = _0x440c24(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 9], 5, 568446438), _0x16e6cd = _0x440c24(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 14], 9, -1019803690), _0x359294 = _0x440c24(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 3], 14, -187363961), _0x5793bb = _0x440c24(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 8], 20, 1163531501), _0x5dd2eb = _0x440c24(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 13], 5, -1444681467), _0x16e6cd = _0x440c24(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 2], 9, -51403784), _0x359294 = _0x440c24(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 7], 14, 1735328473), _0x5793bb = _0x440c24(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 12], 20, -1926607734), _0x5dd2eb = _0x31fb05(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 5], 4, -378558), _0x16e6cd = _0x31fb05(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 8], 11, -2022574463), _0x359294 = _0x31fb05(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 11], 16, 1839030562), _0x5793bb = _0x31fb05(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 14], 23, -35309556), _0x5dd2eb = _0x31fb05(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 1], 4, -1530992060), _0x16e6cd = _0x31fb05(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 4], 11, 1272893353), _0x359294 = _0x31fb05(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 7], 16, -155497632), _0x5793bb = _0x31fb05(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 10], 23, -1094730640), _0x5dd2eb = _0x31fb05(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 13], 4, 681279174), _0x16e6cd = _0x31fb05(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523], 11, -358537222), _0x359294 = _0x31fb05(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 3], 16, -722521979), _0x5793bb = _0x31fb05(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 6], 23, 76029189), _0x5dd2eb = _0x31fb05(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 9], 4, -640364487), _0x16e6cd = _0x31fb05(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 12], 11, -421815835), _0x359294 = _0x31fb05(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 15], 16, 530742520), _0x5793bb = _0x31fb05(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 2], 23, -995338651), _0x5dd2eb = _0x1386af(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523], 6, -198630844), _0x16e6cd = _0x1386af(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 7], 10, 1126891415), _0x359294 = _0x1386af(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 14], 15, -1416354905), _0x5793bb = _0x1386af(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 5], 21, -57434055), _0x5dd2eb = _0x1386af(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 12], 6, 1700485571), _0x16e6cd = _0x1386af(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 3], 10, -1894986606), _0x359294 = _0x1386af(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 10], 15, -1051523), _0x5793bb = _0x1386af(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 1], 21, -2054922799), _0x5dd2eb = _0x1386af(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 8], 6, 1873313359), _0x16e6cd = _0x1386af(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 15], 10, -30611744), _0x359294 = _0x1386af(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 6], 15, -1560198380), _0x5793bb = _0x1386af(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 13], 21, 1309151649), _0x5dd2eb = _0x1386af(_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd, _0x599b70[_0x361523 + 4], 6, -145523070), _0x16e6cd = _0x1386af(_0x16e6cd, _0x5dd2eb, _0x5793bb, _0x359294, _0x599b70[_0x361523 + 11], 10, -1120210379), _0x359294 = _0x1386af(_0x359294, _0x16e6cd, _0x5dd2eb, _0x5793bb, _0x599b70[_0x361523 + 2], 15, 718787259), _0x5793bb = _0x1386af(_0x5793bb, _0x359294, _0x16e6cd, _0x5dd2eb, _0x599b70[_0x361523 + 9], 21, -343485441), _0x5dd2eb = _0x14c966(_0x5dd2eb, _0x31dd72), _0x5793bb = _0x14c966(_0x5793bb, _0x954427), _0x359294 = _0x14c966(_0x359294, _0x4cb172), _0x16e6cd = _0x14c966(_0x16e6cd, _0x3bf2cc);return [_0x5dd2eb, _0x5793bb, _0x359294, _0x16e6cd];
}function _0x2346e9(_0x4d9284) {var _0x1fd9c9,_0x4b8675 = "",_0x2f47db = 32 * _0x4d9284["length"];for (_0x1fd9c9 = 0; _0x1fd9c9 < _0x2f47db; _0x1fd9c9 += 8) _0x4b8675 += String["fromCharCode"](_0x4d9284[_0x1fd9c9 >> 5] >>> _0x1fd9c9 % 32 & 255);return _0x4b8675;
}function _0x27ac36(_0x22c48b) {var _0x577c64,_0x12d6a3 = [];for (_0x12d6a3[(_0x22c48b["length"] >> 2) - 1] = undefined, _0x577c64 = 0; _0x577c64 < _0x12d6a3["length"]; _0x577c64 += 1) _0x12d6a3[_0x577c64] = 0;var _0x178524 = 8 * _0x22c48b["length"];for (_0x577c64 = 0; _0x577c64 < _0x178524; _0x577c64 += 8) _0x12d6a3[_0x577c64 >> 5] |= (255 & _0x22c48b["charCodeAt"](_0x577c64 / 8)) << _0x577c64 % 32;return _0x12d6a3;
}function _0x27ecce(_0x3b44de) {return _0x2346e9(_0x1fe562(_0x27ac36(_0x3b44de), 8 * _0x3b44de["length"]));
}function _0x463191(_0x3c0f1f) {var _0xe992bf,_0x201108,_0x1f0b5c = "0123456789abcdef",_0xad0964 = "";for (_0x201108 = 0; _0x201108 < _0x3c0f1f["length"]; _0x201108 += 1) _0xe992bf = _0x3c0f1f["charCodeAt"](_0x201108), _0xad0964 += _0x1f0b5c["charAt"](_0xe992bf >>> 4 & 15) + _0x1f0b5c["charAt"](15 & _0xe992bf);return _0xad0964;
}function _0x2f7178(_0x350477) {return unescape(encodeURIComponent(_0x350477));
}function _0x569bb2(_0x2d13e0) {return _0x27ecce(_0x2f7178(_0x2d13e0));
}function _0x2da53f(_0x36e146) {return _0x463191(_0x569bb2(_0x36e146));
}function _0x102a4a(_0x48c91d, _0x1d3f1f, _0x56b51e) {// _0x18af09();if (_0x1d3f1f) {if (_0x56b51e) {return _0x5b940e(_0x1d3f1f, _0x48c91d);} else {return y(_0x1d3f1f, _0x48c91d);}} else if (_0x56b51e) {return _0x569bb2(_0x48c91d);} else {return _0x2da53f(_0x48c91d);}// return _0x1d3f1f ? _0x56b51e ? _0x5b940e(_0x1d3f1f, _0x48c91d) : y(_0x1d3f1f, _0x48c91d) : _0x56b51e ? _0x569bb2(_0x48c91d) : _0x2da53f(_0x48c91d);
}function _0x1208e3(_0xa9034b, _0x12cfdf) {// var cookie = "m" + _0x18af09() + "=" + _0x102a4a(_0xa9034b) + "|" + _0xa9034b + "; path=/";var cookie ={};cookie["m"] = _0x102a4a(_0xa9034b) + "|" + _0xa9034b// location["reload"]();return cookie
}function _0x413192(_0x406c9e, _0x773f57) {return Date["parse"](new Date());
}function get_js_m() {var m = _0x1208e3(_0x413192());// console.log(m);return m["m"]
}get_js_m()
# -*-coding: utf-8 -*-
# @Time : 2023/5/23 17:44
# @Author : allen
# @File : match_01.py
# @Software: PyCharm
import os
import execjs
import requests
import jsonpathos.environ["EXECJS_RUNTIME"] = "Node"headers = {'User-Agent': 'yuanrenxue.project'
}def get_m():ctx = execjs.compile(open("match_03.js", encoding="utf-8").read())data = ctx.call('get_js_m')return data# get_m()value = 0
for index in range(1, 6):m = get_m()cookies = {"m": m}url = f"https://match.yuanrenxue.cn/api/match/2?page={index}"res = requests.get(url, headers=headers, cookies=cookies).json()print(res)value += sum(jsonpath.jsonpath(res, '$..value'))
print(value / 50)
坑1:定时器和debugger函数直接删
坑2:也不算是坑,只是不太方便读的三元表达式,转化成if-else更方便读
这一点:chatGPT能帮忙解决
需要chatGPT
账号的,可以联系作者获取,微信:gcw-410
,昵称:浅情人不知
,备注:chatGPT