今天学习了一个叫pyppeteer的lib,当我运行我的代码时
import asyncio
from pyppeteer import launch
async def main():
browser = await launch(options={'devtools': True, 'headless': False})
page = await browser.newPage()
await page.goto('http://example.com')
await page.screenshot({'path': 'baidu.png'})
await browser.close()
asyncio.get_event_loop().run_until_complete(main())
我有:
pyppeteer.errors.BrowserError: Browser closed unexpectedly: