-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not bypass cloudflare with headless active after 117 update. #1577
Comments
I'm talking about Undetected Chromedriver |
ud chromedriver is currently outdated |
Yeah Chrome 117 Headless is currently being detected and haven't seen a fix yet :( My workaround was downloading the portable version of Chrome 116, and then overriding the chrome executable path to chrome driver to 'GoogleChromePortable/App/Chrome-bin/chrome.exe' Update: So adding the normale Chrome user agent to the webdriver will also work, just add the UA to the driver options before starting the driver.
|
This helped, thank you! |
@Helza , @andinua , could you modify the following docker file or provide a docker file for a container in which passing the cloudflare can be reproduced? My try cannot reproduce the expected behavior: # Dockerfile
FROM selenoid/chrome:116.0
USER root
RUN apt-get update || true
RUN apt-get install -y --no-install-recommends pip
RUN pip install undetected-chromedriver
RUN mkdir /test
WORKDIR /test
ENTRYPOINT ["python3", "test.py"] with the modified test script from the documentation: # test.py
from time import sleep
import undetected_chromedriver as uc
options = uc.ChromeOptions()
options.headless=True
ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36'
options.add_argument(f'--user-agent={ua}')
driver = uc.Chrome(version_main=116, headless=True, use_subprocess=False, options=options)
driver.get('https://nowsecure.nl')
sleep(5)
driver.save_screenshot('nowsecure.png') and building the image and running the container: docker build -t loc-ud-chrome-116 .
docker run --rm -v $PWD:/test loc-ud-chrome-116
|
Do not bypass cloudflare with headless active after 117 update.
Does anyone have any alternatives to resolve this?
The text was updated successfully, but these errors were encountered: