Undetected chromedriver doesnt change custom UserAgent #1219
Answered
by
rastinder
chibuikeogodo
asked this question in
Q&A
-
I have tried changing my custom user agent with UC but it couldn't, I used options.add_argument. Please can anyone help out please |
Beta Was this translation helpful? Give feedback.
Answered by
rastinder
Apr 30, 2023
Replies: 1 comment
-
from selenium.webdriver import ChromeOptions |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
chibuikeogodo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from selenium.webdriver import ChromeOptions
chrome_options = ChromeOptions()
userAgent = ua.random
print(userAgent)
chrome_option.add_argument(f"--user-agent={userAgent}")
driver = Chrome(options=chrome_option)