chens11111010001
chens11111010001

Reputation: 63

I am using undetected_chromedriver

I am using undetected_chromedriver, but I am getting the error

This version of ChromeDriver only supports Chrome version 114
Current browser version is 103.0.5060.53

My code:

import undetected_chromedriver as uc 
uc.TARGET_VERSION = 103 
options = uc.ChromeOptions()    
options.add_argument('--no-sandbox') 
options.add_argument('--disable-dev-shm-usage') 
driver = uc.Chrome(options=options, version_main=103, patcher_force_close=True) 
driver.get('https://nowsecure.nl') 
driver.quit()

Upvotes: 2

Views: 4641

Answers (1)

Michael Mintz
Michael Mintz

Reputation: 15556

You can use SeleniumBase's UC Mode to use undetected-chromedriver with any browser version (it automatically downloads the correct driver if missing).

First pip install seleniumbase, and then run the following script with python:

from seleniumbase import Driver
import time

driver = Driver(uc=True, incognito=True)
driver.get("https://nowsecure.nl/#relax")
time.sleep(8)
driver.quit()

Upvotes: 3

Related Questions