发布时间:2019-09-08 09:09:06编辑:auto阅读(2177)
直接通过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下,我就是放到了与脚本同路径下,然后在程序里写的全路径。
52149
52052
42236
39083
33599
30553
29211
24209
24109
22448
250°
287°
294°
269°
307°
278°
307°
314°
324°
336°