update undetected chromedriver with bigger session timeout

This commit is contained in:
2025-06-30 12:41:59 +02:00
parent 24629adcd5
commit c13c1db638
5 changed files with 27 additions and 8 deletions

View File

@ -1,20 +1,32 @@
#!/bin/bash
# version variable
# Can be found here : https://hub.docker.com/r/selenium/standalone-chrome/tags
# Will need to change it in seleniumChromedriverDockerfile and probably download
# it and change it in patchChromedriver.py
VERSION="latest"
# From undetected chromedriver docker
#sudo docker run --rm -it -p 3389:3389 -v ./undetectedChromedriver:/root/.local/share/undetected_chromedriver/ ultrafunk/undetected-chromedriver:latest
sudo docker pull selenium/standalone-chrome:$VERSION
# With undetected chromedriver patcher
# Run the selenium/standalone-chrome:latest with a specific container name in the background
sudo docker run -d --name standalone-chrome selenium/standalone-chrome:latest
#sudo docker run -d --name standalone-chrome -v /home/ninluc/Documents/codage/DatBrowser/undetectedChromedriver/chrome/:/opt/google/chrome/ selenium/standalone-chrome:$VERSION
sudo docker run -d --name standalone-chrome selenium/standalone-chrome:$VERSION
sleep 5
sleep 7
# Copy the chromedriver binary from the container to the host
sudo docker cp -L standalone-chrome:/bin/chromedriver ./chromedriver
# Stop the container
sudo docker stop standalone-chrome
sudo chmod 777 ./chromedriver
# Patch the chromedriver binary
source venv/bin/activate
python3 ./patchChromedriver.py
# Stop the container
sudo docker stop standalone-chrome
sudo docker rm standalone-chrome