From 913e2cce18a6fdaccc7e1a56afb4cdbd98b0d9d7 Mon Sep 17 00:00:00 2001 From: liudongqi Date: Wed, 4 Sep 2024 15:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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) => {