master
刘东琪 9 months ago
parent d5880866e0
commit 913e2cce18
  1. 5
      routes/index.js

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

Loading…
Cancel
Save