谷歌驱动的安装
# -*- coding: utf-8 -*-
# @Time : 2019/9/3 11:42
# @Author : wujf
# @Email : 1028540310@qq.com
# @File : selenium相关.py
# @Software: PyCharm
'''
谷歌驱动下载链接
http://chromedriver.storage.googleapis.com/index.html
我的是100版本的谷歌浏览器
'''
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
# 尝试传参
#s = Service("chromedriver.exe")
driver = webdriver.Chrome(service=Service(r'C:\Program Files\Google\Chrome\Application\chromedriver.exe'))
#driver.maximize_window() #最大化浏览器 driver.implicitly_wait(23) url = "https://www.baidu.com" driver.get(url)
最近,我电脑里面的谷歌浏览器不知道怎么的突然升级到了100版本的,为了找这个驱动找了几天。看官网根本就没有对应100的驱动。

于是,经过本人测试:
这里我下载的126的版本。真的很难找 。
http://chromedriver.storage.googleapis.com/index.html(官方链接)
如果是 :

120 的版本,则对应

的版本。
亲测通过!
附上本人网盘地址:
链接:https://pan.baidu.com/s/1mIN9vl3i6PF5oZKJNbfg8Q&shfl=sharepset
提取码:0yhz
龙卷风之殇

浙公网安备 33010602011771号