selenium | a recaptcha with pictures appears, in other browsers it is completed in 1 click

Question:

I’m using selenium on the site, when you click on the recaptcha v2 im not robot, a captcha with pictures appears. In a regular browser, the checkmark is set without this problem.

How can captcha detect that i am using chromedriver? How can i get around this? in headess mode of the browser captcha with images appears constantly.

What options to put to the driver so that the captcha appears less often? I do not need to solve it through third-party services, I need speed so that when I click on the recaptcha checkbox, it will be passed, as it happens in another browser that I use.

This is the code i am using:

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

options = webdriver.ChromeOptions()
options.add_argument(f'--user-data-dir="userdata dir"')
options.add_argument(fr'--profile-directory=Default')
options.add_argument("--headless")
options.add_argument("--disable-renderer-backgrounding")
options.add_argument("--disable-backgrounding-occluded-windows")
options.add_experimental_option('excludeSwitches', ['enable-logging'])

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),options=options)
Asked By: trcmzng

||

Answers:

Seems like your browser gets detected.

You might try using Selenium-Profiles or undetected-chromedriver

Answered By: kaliiiiiiiii