pycharme 无法运行chromedriver

from selenium import webdriver

d=webdriver.Chrome('G:\software\Google\Chrome\Application\chromedriver.exe')
d.get("http://www.baidu.com")

print(d.page_source)

很多人在调用webdriver的时候无法打开游览器,即便是配置了环境变量也不行。

解决方法:

将webdriver.chrome里面加上chromedriver.exe

记住你的浏览器必须是32位的。

猜你喜欢

转载自blog.csdn.net/L_longqihang/article/details/80284272
今日推荐