带有driver.page_source的Selenium错误消息

时间:2016-04-30 12:00:41

标签: python selenium

我正在尝试使用Selenium从我的代码下面的网站中提取表格。

path_to_driver = r'C:\Users\chromedriver.exe'
driver = webdriver.Chrome(executable_path=path_to_driver)
driver.get(r'https://en.wikipedia.org/wiki/Lists_of_countries_and_territories')
df1 = pandas.read_html(driver.page_source)
print(df1)

然而,它给我一个错误信息:

http.client.RemoteDisconnected: Remote end closed connection without response

我正在使用Selenium 2.53.2和google网站上的最新chromedriver。

有什么问题?

1 个答案:

答案 0 :(得分:0)

我知道出了什么问题...我的谷歌浏览器有一个代理..我删除后,一切顺利。