ultrafunkamsterdam / undetected-chromedriver

Custom Selenium Chromedriver | Zero-Config | Passes ALL bot mitigation systems (like Distil / Imperva/ Datadadome / CloudFlare IUAM)
https://github.com/UltrafunkAmsterdam/undetected-chromedriver
GNU General Public License v3.0
9.71k stars 1.14k forks source link

I'm getting headless error when running undedected chromedriver #1621

Open eem1r opened 11 months ago

eem1r commented 11 months ago

Yesterday, after installing SeleniumBase, I encountered an error when trying to run undedected_chromedriver. Later, I opened a sandbox environment and installed Python, then to install undedected_chromedriver, but I still faced the same error.

import undetected_chromedriver as uc driver = uc.Chrome() driver.get('https://nowsecure.nl')

line 2, in driver = uc.Chrome() ^^^^^^^^^^^ File "C:\Users\emir_\AppData\Local\Programs\Python\Python311\Lib\site-packages\undetected_chromedriver__init.py", line 398, in init__ if headless or options.headless: ^^^^^^^^^^^^^^^^ AttributeError: 'ChromeOptions' object has no attribute 'headless'

eem1r commented 11 months ago

They have already provided a solution to the problem here; https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/1610

luxkatana commented 11 months ago

My solution that worked is here

eem1r commented 11 months ago

or if you install 4.12.0 as selenium version, it works without any problems. pip install selenium==4.12.0

gembleman commented 11 months ago
options = ChromeOptions()
options.add_argument("--headless=new")
self.driver = uc.Chrome(
  options=options,
)
ShoGinn commented 11 months ago

They have already provided a solution to the problem here; #1610

This is a patch, not a solution. I'm curious when the fix is scheduled.