This is the code:
driver = webdriver.Chrome()
while True:
#do thing that require hours
#then i use selenium once
driver.get(link)
I need to open first selenium and then make things that require hours because when i open selenium i need to be ready and speed. If put driver = webdriver.Chrome()
below the while, it would slow everything down
i don't know if it is relevant but i run this code with nohup
command.
Traceback:
Traceback (most recent call last):
File "Scraper.py", line 84, in <module>
main()
File "Scraper.py", line 74, in main
waitForSomething()
File "Scraper.py", line 54, in waitForSomething
fillForm(str(link)[2:-2])
File "Scraper.py", line 30, in fillForm
driver.get(link)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_resp$
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: chrome not reachable
(Session info: chrome=192.168.0.0)
(Driver info: chromedriver=2.36.540471 (9c759b81a907e70363c6312294d30b6ccccc2752),platform=Linux 4.9.0-9-amd64 x$
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…