Closed thesalah1212 closed 2 years ago
You will have to use a request interceptor if you want to change the user agent.
def request_interceptor(req):
del req.headers["user-agent"]
req.headers["user-agent"] = "randomuseragent"
driver.request_interceptor = request_interceptor
Verify it by visiting https://httpbin.org/headers
I tried this one options = { 'proxy': { 'http': f'http://{proxy_user}:{proxy_pass}@{host}:{port}', }, 'user-agent':randomuseragent }
then I test using
driver.execute_script("return navigator.userAgent;")
the user agent don't changed same always