ladn.blogg.se

Selenium ubuntu 20.04
Selenium ubuntu 20.04






selenium ubuntu 20.04

RUN wget -q -continue -P $CHROMEDRIVER_DIR "$CHROMEDRIVER_VERSION/chromedriver_linu圆4.zip" # Set up Chromedriver Environment variables # We need wget to set up the PPA and xvfb and gnupg to have a virtual screen and unzip to install the ChromedriverĪpt-get install -y wget xvfb unzip & apt-get install gnupg -y & \Įcho "deb stable main" > /etc/apt//google.list & \Īpt-get update & apt-get install -y google-chrome-stable & \ RUN apt-get update & apt-get install -no-install-recommends -y python3.9 python3-venv & \Īpt-get install -y ffmpeg & apt-get install libopus0 & \ RUN pip3 install -no-cache-dir -r requirements.txt # using final folder name to avoid path issues with packages

selenium ubuntu 20.04

# create and activate virtual environment RUN apt-get update & apt-get install -no-install-recommends -y python3.9 python3.9-dev python3.9-venv python3-pip python3-wheel build-essential & \Īpt-get clean & rm -rf /var/lib/apt/lists/* My dockerfile: # using ubuntu LTS version Opts.add_argument("-disable-dev-shm-usage")ĭriver = uc.Chrome(use_subprocess=True, options=opts)

selenium ubuntu 20.04

My chromedriver options (I’m using undetected_chromedriver - optimized version of selenium webdriver): opts = uc.ChromeOptions() I’ve migrated my bot from heroku to fly.io because of heroku removing free plan, but after i tested chromedriver to scrap one site it fails to do so:ĭ.CommandInvokeError: Command raised an exception: WebDriverException: Message: unknown error: session deleted because of page crash








Selenium ubuntu 20.04