进行代码调试时:
from selenium import webdriver
c=webdriver.Chrome(executable_path=r'C:\Program Files\Google\Chrome\Application\chrome.exe') #获取chrome浏览器的驱动,并启动Chrome浏览器
c.get('https://www.baidu.com')#打开百度
print('成功')
出现错误信息:
1.检查host文件中是否包含“127.0.0.1 localhost”
参考python版selenium浏览器驱动问题Can not connect to the Service chromedriver解决