发布时间:2019-09-08 09:09:06编辑:auto阅读(2133)
直接通过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下,我就是放到了与脚本同路径下,然后在程序里写的全路径。
51931
51707
42021
38862
33349
30318
28958
23972
23889
22252
387°
2592°
3263°
2715°
2705°
3441°
2661°
3500°
5772°
5546°