Python Selenium-超时异常

Python Selenium-超时异常,python,selenium-webdriver,web-scraping,timeout,Python,Selenium Webdriver,Web Scraping,Timeout,我正在使用selenium获取此站点的html: http://timesofindia.indiatimes.com/world/us 我之所以使用selenium,是因为这个站点只在向下滚动时提供所有html。但是,当我运行此代码时: # Open the Driver driver = webdriver.Chrome(chromedriver) #create a list to store the htmls master_lst = [] #looping through t


我正在使用selenium获取此站点的html:
http://timesofindia.indiatimes.com/world/us

我之所以使用selenium,是因为这个站点只在向下滚动时提供所有html。但是,当我运行此代码时:

 # Open the Driver
 driver = webdriver.Chrome(chromedriver)

#create a list to store the htmls
master_lst = []

#looping through the times of india urls
for url in urls[:3]:

#make the driver the the url
driver.get(url)
#this is to scroll down twelve time
for i in range(12):
    # wait 5 seconds
    time.sleep(5)
    driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")

html_source = driver.page_source
data = Beautifulsoup(html_source, 'lxml')
master_lst.append(data)
我得到这个错误:
TimeoutException:Message:timeout:timeout从渲染器接收消息时超时:-0.004

我试图改变睡眠时间和向下滚动的时间,但都没有用
我在这里看到过类似的问题,但没有一个能解决这种问题<让我知道你们的想法<谢谢

您可能需要调整脚本超时:


谢谢你!!!只是附加另一个有用的链接
driver.set_script_timeout(10)