标签:依赖 driver chrome bdr 命令 div nbsp python3 python
Python 3.7.4安装 1.cmd
2.pip3 install selenium --default-timeout=1000 -i https://pypi.tuna.tsinghua.edu.cn/simple
安装selenium 需要依赖 webdriver
安装与浏览器版本匹配的webdriver 1、打开谷歌浏览器, 在地址栏输入 chrome://version/ 查看版本信息: 假设您有Chrome 72.0.3626.81。 获取Chrome版本号,删除最后一部分,然后将结果附加到网址“ https://chromedriver.storage.googleapis.com/LATEST_RELEASE_”。 例如,在Chrome版本72.0.3626.81中,您将获得一个网址“ 百度https://chromedriver.storage.googleapis.com/LATEST_RELEASE_72.0.3626”。 访问该网站即可获得对应版本的提示 2、选择合适版本的驱动下载, 下载地址:http://chromedriver.storage.googleapis.com/index.html 3.将chromedriver.exe 放入安装的python的script目录下 我的放在:C:\software\computer\python\python37\Scripts 将C:\software\computer\python\python37与C:\software\computer\python\python37\Scripts加入环境变量
python目录下的script>右击鼠标+shift,打开cmd命令,执行下面代码 python import selenium from selenium import webdriver s=webdriver.Chrome() 如果弹出谷歌浏览器,表示成功
标签:依赖 driver chrome bdr 命令 div nbsp python3 python
原文地址:https://www.cnblogs.com/chargeworld/p/12288952.html