1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({ headless: true });
const page = await browser.newPage();
let res1 = await page.goto('https://baidu.cn/gXQQ4RdB', {
waitUntil: 'networkidle2',
});
let c = await page.setCookie({
name : "admintoken",
value : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
path : "/",
domain : ".realsee.com",
expires : 1656070075
})
console.log("Finished");
const aHandle = await page.evaluateHandle(() => window.shareConfig);
console.log(await aHandle.jsonValue());
})();
|