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
9.71k stars 1.14k forks source link

Run undetected-chromedriver in google colab fails #866

Open bobiboMC opened 1 year ago

bobiboMC commented 1 year ago

Hello, I'm trying to run undetected-chromedriver in google colab, but I can't make it work. This is the code (similar code was working with selenium):

!pip install undetected-chromedriver
!apt-get update 
!apt install chromium-chromedriver
!cp /usr/lib/chromium-browser/chromedriver /usr/bin
import undetected_chromedriver as uc
import sys
sys.path.insert(0,'/usr/lib/chromium-browser/chromedriver')
wd = uc.Chrome(use_subprocess=True,headless=True,browser_executable_path='/usr/lib/chromium-browser/chromedriver')
wd.get("https://www.google.com/")

This is the fail message: Message: Service /root/.local/share/undetected_chromedriver/00632e9600d3693e_chromedriver unexpectedly exited. Status code was: -6

The problem is with line uc.Chrome() I didn't find anything about this '-6' error in google,I would glad for help to solve this.

kaliiiiiiiiii commented 1 year ago

I have a working repo: https://github.com/kaliiiiiiiiii/Selenium-Profiles see Google-Colab examle: https://colab.research.google.com/github/kaliiiiiiiiii/Selenium-Profiles/blob/master/google-colab/selenium_profiles.ipynb