我正在尝试使用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。
有什么问题?
答案 0 :(得分:0)
我知道出了什么问题...我的谷歌浏览器有一个代理..我删除后,一切顺利。