Open chungwong opened 9 months ago
Hey, thanks for submitting an issue. It does look like the newer Chrome versions are indeed being detected sometimes. I did some quick experiments, and it seems like when going to the site through a new tab, it passes without any issues. I have no idea why thought. I will do some further investigations and come up with a fix soon.
I confirm the behaviour on manually opening a new tab, however, if the new tab is part of the automation, it will still fail.
use undetected_chromedriver::chrome;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let driver = chrome().await?;
driver.goto("https://google.com/").await?;
let handle = driver.new_tab().await?;
driver.switch_to_window(handle).await?;
tokio::time::sleep(std::time::Duration::from_secs(1));
driver.goto("https://nowsecure.nl/").await?;
tokio::time::sleep(std::time::Duration::from_secs(100));
Ok(())
}
I confirm the behaviour on manually opening a new tab, however, if the new tab is part of the automation, it will still fail.
use undetected_chromedriver::chrome; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let driver = chrome().await?; driver.goto("https://google.com/").await?; let handle = driver.new_tab().await?; driver.switch_to_window(handle).await?; tokio::time::sleep(std::time::Duration::from_secs(1)); driver.goto("https://nowsecure.nl/").await?; tokio::time::sleep(std::time::Duration::from_secs(100)); Ok(()) }
yes,you have to perform specific steps to bypass cloudflare. I will be releasing a video on my channel shortly showing how to bypass it using rust and this crate :)
https://github.com/itehax/rust-scraping
you can find a way to bypass cloudflare using this library in this project.
The latest commit has made it possible to bypass cloudflare, code improvements are still needed and further testing must be done until it can be released properly. This is still a work in progress and will introduce some breaking changes. This would have not been possible without the work of @itehax, so thanks a lot!
Silly question, but how does this differ from what the guys over at https://github.com/kaliiiiiiiiii/Selenium-Driverless are doing, according to what i've read they managed to get around the more recent detections?
Silly question, but how does this differ from what the guys over at https://github.com/kaliiiiiiiiii/Selenium-Driverless are doing, according to what i've read they managed to get around the more recent detections?
Thee key here is Runtime.enable
detection.
Also see https://github.com/kaliiiiiiiiii/Selenium-Driverless/discussions/86#discussion-5717720 and https://github.com/HMaker/HMaker.github.io/tree/master/selenium-detector
I guess I would have to rewrite the library without thirtyfour to create something similar to https://github.com/ultrafunkamsterdam/nodriver
I guess I would have to rewrite the library without thirtyfour to create something similar to https://github.com/ultrafunkamsterdam/nodriver
basically, you've got to use the CDP protocol directly. Lot of work I can tell - from experience at driverless :/
It is detected with chrome 116.0.5845.110 It looks like https://github.com/ultrafunkamsterdam is having the same issue too.