美文网首页我爱编程
selenium + python chromedriver安装

selenium + python chromedriver安装

作者: rosekissyou | 来源:发表于2017-09-06 22:35 被阅读713次

1  安装selenium

pip install selenium 

2 下载chromedriver

官方下载网址 https://chromedriver.storage.googleapis.com/index.html

网盘链接:http://pan.baidu.com/s/1kVHuGjd 密码:is2d  

3 下载之后把choromedriver 解压会看到.exe文件, 把文件放到目录下加入path环境变量即可

把路径 D:\Python27  加入环境变量, 运行下面的代码,既可以看到运行成功

#coding:utf8

fromseleniumimportwebdriver

importtime

brooo=webdriver.Chrome()

brooo.get('https://www.baidu.com')

看起来还是比较好用的

相关文章

网友评论

    本文标题:selenium + python chromedriver安装

    本文链接:https://www.haomeiwen.com/subject/rcqbjxtx.html