Reputation: 181
I'm in the process of scraping pdfs from a website using selenium and chrome webdriver. I use the following, pulling the site
from a list:
driver.get(site)
source = driver.page_source
...
...
driver.quit()
But I keep getting the following error, about 6,000 observations down my site
list:
Traceback (most recent call last):
File "<stdin>", line 127, in <module>
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 323, in get self.execute(Command.GET, {'url': url})
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 311, in execute self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: timeout
(Session info: chrome=63.0.3239.84)
(Driver info: chromedriver=2.33.506092
(733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.10.0-40-generic x86_64)
I've tried refreshing the source page at shorter intervals (every 200 searches, but should I go shorter?).
How do I extend selenium's 120sec timeout limit?
Upvotes: 1
Views: 3655
Reputation: 193088
This error message...
Traceback (most recent call last):
File "<stdin>", line 127, in <module>
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 323, in get self.execute(Command.GET, {'url': url})
.
selenium.common.exceptions.TimeoutException: Message: timeout
(Session info: chrome=63.0.3239.84)
(Driver info: chromedriver=2.33.506092
(733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.10.0-40-generic x86_64)
...implies that the webdriver instance cannot establish a connection with the site url
and timeout occurs.
Your main issue is the version compatibility between the binaries you are using as follows :
Supports Chrome v60-62
So there is a clear mismatch between the ChromeDriver v2.33 and the Chrome Browser v63.0 you are using. Hence ChromeDriver is unable to spawn the new Chrome Browser process.
Upvotes: 2