Linux下使用selenium数据抓取报错问题(网页加载失败)
unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=...)
linux下命令行运行报错
Message: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.36.540471 (9c759b81a907e70363c6312294d30b6ccccc2752),platform=Linux 4.14.0-deepin2-amd64 x86_64)
解决方案一
先执行一下两句安装命令(以ubuntu为例):
pip install pyvirtualdisplay
sudo apt-get install xvfb
然后添加如下代码:(必须在Linux下执行)
from pyvirtualdisplay import Display
display = Display(visibl
共有 0 条评论