-
I've noticed an extra http request hitting the URL called when using uc=True. I see it occur right before the usual request when I check my web logs. It has user_agent "python-requests/2.31.0" but does not occur unless uc=True is used. Any way to prevent this? from seleniumbase import Driver |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
That's covered in the UC Mode video tutorial: https://www.youtube.com/watch?v=5dMFI3e85ig In UC Mode, In summary, to avoid that extra
|
Beta Was this translation helpful? Give feedback.
That's covered in the UC Mode video tutorial: https://www.youtube.com/watch?v=5dMFI3e85ig
In UC Mode,
driver.get(url)
has been modified so that it first checks if UC Mode is needed for the website you're loading. If so, it callsdriver.uc_open_with_reconnect(url)
, and if not needed, it callsdriver.default_get(url)
, which is a copy of the originaldriver.get(url)
.In summary, to avoid that extra
requests
call, use either of the following when using UC Mode:driver.default_get(url)
driver.uc_open_with_reconnect(url)
.