mistake:
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.34.522913 (36222509aa6e819815938cbf2709b4849735537c),platform=Linux 4.10.0-42-generic x86_64)
Solution:
Start the Display before start the Chrome.
First execute the following two installation commands (take ubuntu as an example):
- pip install pyvirtualdisplay
- sudo apt-get install xvfb
Then add the following code:
- from pyvirtualdisplay import Display
- display = Display(visible=0, size=(800, 800))
- display.start()
- driver = webdriver.Chrome()