首先是包的导入 from selenium import webdriver 使用webdriver创建Chrome对象,这里要注意分为有界面浏览器Chrome和无界面浏览器phantomjs两种对象 driver = webdriver.Chrome(executable_path='C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64/chromedriver.exe') 这里Chrome驱动路径如果没配置环境变量的话需要用我这种方式executable_path指定。 配置环境变量的方式就是在我的电脑-&g...