Issue
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()
Solution
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()
Answered By - Michael Mintz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.