maximedrn / hcaptcha-solver-python-selenium

hCAPTCHA solver and bypasser for Python Selenium using a Tampermonkey userscript. Simple website to try to solve hCAPTCHA.
https://maximedrn.github.io/hcaptcha-solver-python-selenium/
Apache License 2.0
81 stars 31 forks source link

Headless Ubuntu Server support #3

Closed darvd29 closed 2 years ago

darvd29 commented 2 years ago

Hello, Is there a way to get this working on headless Ubuntu Server? I installed google chrome, downloaded corresponding chromedriver and changed the path in main.py. If I leave the line # options.add_argument("headless") # Headless ChromeDriver commented out then it says that Chrome has crashed, and if I remove the # then it says selenium.common.exceptions.WebDriverException: Message: unknown error: failed to wait for extension background page to load: chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/background.html from unknown error: page could not be found: chrome-extension://dhdgffkkebhmkfjojejmpbldmpobfkfo/background.html

maximedrn commented 2 years ago

Hi, no you can't. The chromedriver doesn't support headless mode while using an extension. You can try with a geckodriver (Firefox), you have to change the CRX extension with a XPI.