1. 安装selenium库
切换到pip所在文件夹,并安装
c:\>cd /d d:\ d:\>cd Python\python36\Scripts d:\Python\python36\Scripts>pip.exe install selenium
安装成功
Collecting selenium Downloading https://files.pythonhosted.org/packages/b8/53/9cafbb616d20c7624f f31bcabd82e5cc9823206267664e68aa8acdde4629/selenium-3.14.0-py2.py3-none-any.wh l (898kB) 29% |█████████▌ | 266kB 1.4MB/s eta 0:00:01 ... ... ... 1kB 1.3MB/s Requirement already satisfied: urllib3 in d:\python\python36\lib\site-paRequirement already satisfied: urllib3 in d:\python\python36\lib\site- (from selenium) (1.23) Installing collected packages: selenium Successfully installed selenium-3.14.0
2. 使用FireFox下载geckodriver,使用chrome下载chromedriver
geckodriver地址:https://github.com/mozilla/geckodriver/releases
chromedriver地址:http://chromedriver.storage.googleapis.com/index.html
注意:chromedriver版本需要与浏览器版本匹配,参考地址:https://blog.csdn.net/huilan_same/article/details/51896672
3. 解压后将exe文件放到python根目录下 D:\Python\python36
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。