python selenium chrome驱动

如果长时间不更新驱动,使用python操作运行chrome,会报错如下:
selenium.common.exceptions.SessionNotCreatedException: Message: session not

原因:chrome更新,但是 driver没有更新;

解决方法:
1.下载匹配chrome的驱动,
http://chromedriver.storage.googleapis.com/index.html

python selenium chrome驱动
python selenium chrome驱动

2.解压至驱动的存放目录,如,
driver = webdriver.Chrome(‘D:\p-y-thon\chromedriver_win32\chromedriver.exe’) #浏览器驱动