Python selenium, undetected-chromedriver will not allow me to change my fingerprints

601 views Asked by At

I am not able to change my browser fingerprints when using undetected-chromedriver, I tried to change my useragent and it did not work, is undetected-chromedriver blocking it from happening for some reason?

import undetected_chromedriver as uc
import time

options = uc.ChromeOptions()
options.headless = False
driver = uc.Chrome(options=options,version_main=118)

# Changing my useragent fingerprints
options.add_argument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36")

driver.get('https://amiunique.org/fingerprint')

time.sleep(40)
1

There are 1 answers

0
MD Kawsar On

If you simply added this before defining the river, everything would have worked out perfectly. Instead, you put the Option after defining the driver. The update code would then be:

import undetected_chromedriver as uc
import time

options = uc.ChromeOptions()
options.headless = False
options.add_argument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36")
driver = uc.Chrome(options=options,version_main=118)    

driver.get('https://amiunique.org/fingerprint')

time.sleep(40)

Please let us know if that work or if you have a further question!