I want to connect to a site with Webdriver, but cloudflare challenge(not hcaptcha) detects selenium as a bot and doesnt pass me through the Cloudflare challenge.
I have used these flags and many similar flags in my code, but I have not been able to bypass yet.
ChromeOptions options=new ChromeOptions();
options.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("--disable-blink-features");
options.addArguments("--disable-blink-features=AutomationControlled");
System.setProperty("webdriver.chrome.driver", "drivers/chromedriver.exe");
driver = new ChromeDriver(options);
My chrome version 104.0.5112.81
and chrome driver version is 104.0.5112.79
How can I bypass Cloudflare?