diff --git a/routes/index.js b/routes/index.js index e4f9e04..a22becf 100644 --- a/routes/index.js +++ b/routes/index.js @@ -13,11 +13,10 @@ let store = new Store(); router.post('/rsCookie', async (req, res) => { let start = new Date(); try { - console.log('request body------>', req.body) let url = req.body['url']; let areaName = req.body['areaName']; let htmlStr = req.body['htmlBase64']; - let jsStr = req.body['cookieBase64']; + let jsStr = req.body['jsBase64']; let cookie = req.body['cookieBase64']; let userAgent = req.body['userAgentBase64']; console.log(`接收到 ${areaName} 请求:${url}`) @@ -92,7 +91,9 @@ async function handle(url, htmlStr, jsText, cookie, userAgent) { } // 加载dom let dom = await jsDom(htmlStr); + // console.log('html 加载长度--->', dom.serialize()) console.log('html 加载长度--->', dom.serialize().length) + window = dom.window // js执行成功后的瑞树会跳转页面 会触发onbeforeunload钩子 window.onbeforeunload = async (url) => {