fix: 修复【Prestige 蚊香社】报错 (#6298)

This commit is contained in:
Trojan Yao 2020-12-07 02:00:35 +08:00 committed by GitHub
parent 4b425cfbe7
commit e3f68d7967
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,8 @@ module.exports = async (ctx) => {
await page.waitForSelector('.button_r18_prestige');
await page.click('#AC');
await page.waitForSelector('#body_goods');
const html = await page.evaluate((window) => window.document.body.innerHTML);
const bodyHandle = await page.$('body');
const html = await page.evaluate((body) => body.innerHTML, bodyHandle);
const $ = cheerio.load(html);
const list = $('div#body_goods li');