pyppeteer出现Session closed. Most likely the page has been closed.异常记录

pyppeteer.errors.NetworkError: Protocol Error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.

在github上找到了解决方法,似乎只能改源码,找到pyppeteer包下的connection.py模块,在其43行和44行改为下面这样:

self._ws = websockets.client.connect(
	#self._url, max_size=None, loop=self._loop)
	self._url, max_size=None, loop=self._loop, ping_interval=None, ping_timeout=None)

你可能感兴趣的:(python,puppeteer)