antispider icon indicating copy to clipboard operation
antispider copied to clipboard

原书第16页pyteer.py执行报错

Open cailuo opened this issue 6 years ago • 0 comments

原书第16页代码执行时报以下错误: pyppeteer.errors.BrowserError: Browser closed unexpectedly: [0310/181827.222752:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180. 系统:Ubuntu 18.04.4 LTS

解决办法:修改相应代码 browser = await launch() 修改为 browser = await launch({'args': ['--no-sandbox']})

cailuo avatar Mar 10 '20 10:03 cailuo