Open lewgaowei opened 3 years ago
see #262
i have the same problem with undetected-chromedriver on docker selenium work fine but undetected-chromedriver dont (browser get crash ) `FROM python:3.8.11-slim-buster
ENV PYTHONDONTWRITEBYTECODE 1 ENV PYTHONUNBUFFERED 1
RUN apt-get update \ && apt-get install -y --no-install-recommends wget \ && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ && apt install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb \ && rm google-chrome-stable_current_amd64.deb \ && chown root.root -R /opt/google/chrome/ \ && chmod 755 -R /opt/google/chrome/ \ && chmod 4755 -R /opt/google/chrome/chrome-sandbox
RUN python -m venv /appenv ENV VIRTUAL_ENV /appenv ENV PATH /appenv/bin:$PATH
ENV CHROMEDRIVER_PATH /appenv/chromedriver RUN python -c "from undetected_chromedriver.patcher import Patcher; patcher = Patcher(executable_path='$CHROMEDRIVER_PATH', version_main=$(google-chrome --version | grep -Po ' [0-9]{1,3}.' | sed 's:^.(.*).$:\1:')); assert patcher.auto()" RUN chmod +x /appenv/chromedriver ` and this doesn't work me and get error about that there is no directory or file name (/appenv/chromedriver)
@mhmehdi paste the error message here... I use that Dockerfile and have no problems.
I find the problem and fixed but now its get detected with Cloudflare : |
@mhmehdi would you mind to share your dockerfile please?
Following :)
Following
following
Need help with dockerizing undetectable chrome
The following code works for normal webdriver, however there are issues with UC (might be due to webdriver path?) https://stackoverflow.com/questions/65576321/dockerfile-for-a-python-script-with-firefox-based-selenium-web-driver-flask-b
Any help will be appreciated