主要参考两篇文章
https://www.52pojie.cn/thread-1293936-1-1.html
https://mp.weixin.qq.com/s/6m5bNU1qJlRsSCmAkaJziA
1>添加首行配置
var window = global;
window.document = {
'referrer': 'https://www.toutiao.com/',
'cookie': ''
};
window.location = {
// href : 'https://www.toutiao.com/',
// protocaol : 'https',
hash: "",
host: "www.toutiao.com",
hostname: "www.toutiao.com",
href: "https://www.toutiao.com/",
origin: "https://www.toutiao.com",
pathname: "/",
// port: "",
protocol: "https:"
};
window.navigator = {
'userAgent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36'
};
// var document = {};
var exports = undefined,
module = undefined,
define = undefined;
2>通过 不断的插桩打印调试 node调用
// console.log(window);
window.document.cookie='your cookies';
// console.log(window.byted_acrawler.sign)
console.log(window.byted_acrawler.sign({
'url': 'https://www.toutiao.com/api/pc/list/feed?offset=0&channel_id=94349549395&max_behot_time=0&category=pc_profile_channel'
}));
3>搞定
"E:\pycharm\PyCharm 2017.2.7\bin\runnerw.exe" E:\nodejs\node.exe F:\dy_dsly_login\dy_sign.js
_02B4Z6wo00f01LvjoMgAAIDDRBxfN2x2C.y7waRAAE4x5DZd9aHlcetSt7QlwlJtW4HQ5NsfJbF7vn77hevMbxOc8SbcVLabUxrPYbHojn0gBoYgdM9WCSYLHsFYe4LyrB1-5mQoTlAOskcC98
Process finished with exit code 0
如有侵权 联系 立马删除