options.add_argument('--user-agent="Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.193 Safari/537.36"') Если выставляю options.add_argument('--headless') запускается.
А что в консоли пишет?
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
я понимаю вы тут все гуру)) я то же в своем деле такой но тут прошу либо посоветовать книженку либо немного научитью я денег дам.
Traceback (most recent call last): File "/root//Project/script.py", line 22, in <module> browser = webdriver.Chrome(chrome_options=options) File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/chrome/webdriver.py", line 81, in __init__ desired_capabilities=desired_capabilities) File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__ self.start_session(capabilities, browser_profile) File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally. (unknown error: DevToolsActivePort file doesn't exist) (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) Вот весь код
realpython.com для кого сделали?
А сам хром ничего не написал в консоль?
Для изучения питона может
Да мы понять не можем что ты хочешь изучить
ну я и про это.
Нет( Вот может это поможет: root@wilz:~# google-chrome [1603:1603:1115/215217.283916:ERROR:browser_main_loop.cc(1426)] Unable to open X display. [1115/215217.295078:ERROR:nacl_helper_linux.cc(308)] NaCl helper process running without a sandbox! Most likely you need to configure your SUID sandbox correctly root@wilz:~#
Unable to open X display
На vps-ке. Сижу через xshell.
Ты в графическом режиме?
Обсуждают сегодня