发布时间:2019-09-08 09:09:06编辑:auto阅读(1965)
直接通过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下,我就是放到了与脚本同路径下,然后在程序里写的全路径。
50533
49846
40441
37447
31863
28741
27665
22444
22441
20754
539°
1157°
944°
871°
1127°
988°
1609°
2992°
2700°
2043°