关于Selenium错误问题

我遇到两种:
1.‘module’ object is not callable
2.WebDriverException: ‘chromedriver’ executable needs to be in PATH

第一种最简单,

from selenium import webdriver

browser = webdriver.chrome() 这里要大写,  所以要这样: browser = webdriver.Chrome()

browser.get("http://www.baidu.com")
print(browser.page_source)

第二种错误解决:
缺少chromedriver在path中,其中chromedriver是selenium驱动chrome浏览器的驱动器,没有这个驱动器是不能驱动打开chrome浏览器的
下载chromedriver解压出来是chromedriver.exe

然后找到自己Scripts 目录,我的是在C:\Users\24339\Scripts
把下载好的
放在Scripts 目录里面,就行了!!!
关于Selenium错误问题