友情提示puppeteer最新版本不支持node最新版本
来源:10-5 爬虫代码实现1

calmound
2017-12-15
如题,最新版本下会报错
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Node is not visible (node:6988) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
将packjon的puppeteer的版本换到老师的0.11.0版本就可以了
写回答
4回答
-
benliuss
2018-01-01
网页里的button元素不可见了,把 s_btn 换成 s_search就 可以。
20 -
慕后端8381663
2019-08-07
将await page.click('.s_btn');
改用:
await page.evaluate(()=>{
document.querySelector('.s_btn').click()
});
就能行了
00 -
慕侠0355299
2018-09-18
的确如此!
00 -
Samaritan
2017-12-15
puppeteer api 不稳定,关注一下最新的文档
00
相似问题