发布时间:2019-09-08 09:09:06编辑:auto阅读(1920)
直接通过pip install selenium就可以安装了,非常简单。
报错:selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
说明没有安装Firefox的驱动。
https://github.com/mozilla/geckodriver/releases
下载适合自己的包。
报错:selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH.
说明没有安装Chrome的驱动。
http://chromedriver.storage.googleapis.com/index.html
下载是自己的包。
IE浏览器:http://selenium-release.storage.googleapis.com/index.html
Edge浏览器:http://go.microsoft.com/fwlink/?LinkId=619687
在Windows下,需要将下载的包解压后,放到Python的根目录下,指定目录应该也是可以的,毕竟Linux都可以呢。
在Linux下,我就是放到了与脚本同路径下,然后在程序里写的全路径。
50100
49355
40016
37064
31451
28286
27242
22034
21992
20329
516°
371°
351°
541°
513°
1109°
2107°
1940°
1528°
3116°