puppeteer
来源:6-2 利用 puppeteer 爬取和分析电影列表

BBAQ
2018-03-31
老师,这个爬取豆瓣的trailer-list,有时候可以正常爬到数据,但是大部分时候会提示这个错误问题
写回答
5回答
-
看错误是被豆瓣反弹了,可能次数或者频率触发了反爬机制,你可以连上手机 4G,把爬的内容个数设置小一些,试试看。
112018-04-04 -
testname
2018-04-01
加个请求发送的随机延时看看行不行,,反扒机制有可能是根据请求的间隔时间来判断是否是机器的。
20 -
BBAQ
提问者
2018-04-04
下载了最新的node9 +的版本,发现这个问题迎刃而解了
00 -
BBAQ
提问者
2018-03-31
Error: Navigation Timeout Exceeded: 30000ms exceeded at Promise.then (D:\job\doban\6-2\douban-trailer-imooc\node_modules\puppetee r\lib\NavigatorWatcher.js:69:21) at <anonymous> (node:10228) UnhandledPromiseRejectionWarning: Unhandled promise rejection (reje ction id: 1): AssertionError [ERR_ASSERTION]: No node found for selector: .more (node:10228) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr ecated. In the future, promise rejections that are not handled will terminate th e Node.js process with a non-zero exit code.
try了一下, 报这个错误
00 -
BBAQ
提问者
2018-03-31
puppeteer.launch({headless:false})
加上这条参数就可以获取到数据,可是这样每次都会弹出浏览器呀!
00
相似问题