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
10.06k stars 1.17k forks source link

Headless mode doesn't work #520

Open yonis65 opened 2 years ago

yonis65 commented 2 years ago

Hello, I created a code that opens multiple windows that do different things at the same time and it's working well. The problem is that when I enable headless the browser can't bypass Cloudflare anymore. Is there a way to solve this? (I'm on windows and I can't use xvfb wrappers)

ToasterUwU commented 2 years ago

@yonis65 The headless option is a beta thing. It's not guaranteed to work and still needs work. I'm myself am not aware of any way to solve this, the only thing I can think about that would work for you on windows is to put the browsers on the second set of desktops.

If you press the Windows key and Tab at the same time you can make a second set, and put all that stuff on there. That means they are open, work but don't get shown in the taskbar, and don't interfere with you while you do other stuff.

sebdelsol commented 2 years ago

@yonis65 you should have read the readme for the current version. At the end you would have seen that « headless is still WIP. Raising issues is needless »

KebabLord commented 2 years ago

headless mode is crucial since this repo won't run on headless servers

ToasterUwU commented 2 years ago

headless mode is crucial since this repo won't run on headless servers

@KebabLord i understand your point. But the matter of fact is, making a browser headless is detectable by bot detection tools. And preventing that is hard and lots of work.

So until it's not work in progress anymore, you will have to either live with that, or use some way to get around it. There are ways to make a virtual "fake" desktop on Linux and to run programs with gui on that. I suggest you either take the overhead of running a desktop version of whatever you are using, or you find a hacky way to get around this limitation with a fake desktop to run chrome on.

zxdawn commented 1 year ago

@ToasterUwU Thanks! Virtual fask desktop is a good option:

https://github.com/ultrafunkamsterdam/undetected-chromedriver/issues/712#issuecomment-1178667776

ultrafunkamsterdam commented 1 year ago

The docker image does exacty this.... And can run on windows as welll

zxdawn commented 1 year ago

The docker image does exacty this.... And can run on windows as welll

@ultrafunkamsterdam Thanks. But the fake desktop is sometimes detected as robot. So, the only solution is installing GUI desktop on my Linux VPS?