pyppeteer处理错误和问题处理
发布时间
阅读量:
阅读量
1. 报错1:Most likely the page has been closed
pyppeteer.errors.NetworkError: Protocol Error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
在运用pyppeteer进行京东数据采集过程中,当爬取至第7至8页时便会触发错误。针对这一问题,谷歌提出了一种可行的解决方式:
https://github.com/miyakogi/pyppeteer/issues/178
https://github.com/miyakogi/pyppeteer/pull/160/files
对源代码进行了相应调整后,成功解决了该问题,现将相关操作过程记录如下。
共享库加载错误分析
在ubuntu16.04系统环境下,采用python3.6版本执行pyppeteer提供的示例程序:
import asyncio
from pyppeteer import launch
全部评论 (0)
还没有任何评论哟~
