Proxies #6
-
Looks great ! (seems to work fine while many other solutions had failed -thanks) Would there be a way to set the proxies when creating the driver instance ? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 31 replies
-
Thank you! Adding proxies should be possible as following: from selenium_profiles.driver import driver as mydriver
from selenium_profiles.profiles import profiles
from selenium.webdriver.common.by import By # locate elements
mydriver = mydriver()
profile = profiles.Windows() # or .Android
PROXY = "23.23.23.23:3128" # IP:PORT or HOST:PORT
PROXY_METHOD = "socks5://" # optional, default is socks5
# add to profile
profile["options"]["browser"].update({"proxy":PROXY, "proxy_method":PROXY_METHOD})
driver = mydriver.start(profile, uc_driver=False)
# get url
driver.get('https://browserleaks.com/client-hints') # test client hints
input("Press ENTER to exit: ")
driver.quit() # Execute on the End! For other options in the profile, have a look at Example-Profile Didn't test it yet tho, but in theory it should work like that:) Feel free to tell me if it works as intended. |
Beta Was this translation helpful? Give feedback.
-
Proxy-authenticationsee documentation EDIT
|
Beta Was this translation helpful? Give feedback.
-
Back(end) in the game : 1. Minor point : 2. Proxy auth doesn't work so far (I may have done somthing wrong, I'm looking more closely at it) since
|
Beta Was this translation helpful? Give feedback.
-
Closing as it seems to be resolved |
Beta Was this translation helpful? Give feedback.
Proxy-authentication
see documentation
EDIT