Considering that there is no function that works very well natively in Selenium for using proxys with authentication in chromedriver, this is an effective way to solve this problem.
Project description
Selenium Proxy Extension
Considering that there is no function that works very well natively in Selenium for using proxys with authentication in chromedriver, this is an effective way to solve this problem.
Usage
First, we import the extension, using the following syntax:
from extension import proxies
Then we can use the syntax to set the proxy
proxies_extension = proxies("username", "password", "host", "port")
It looks like this:
chrome_options = webdriver.ChromeOptions()
proxies_extension = proxies("username", "password", "host", "port")
chrome_options.add_extension(proxies_extension)
service = Service(executable_path='./chromedriver.exe')
driver = webdriver.Chrome(service=service, options=chrome_options)
driver.get("https://api.my-ip.io/v2/ip.json")
How it works?
This extension works in a very simple way, when calling the proxies function, it creates a javascript extension that configures the proxy in the browser, and this extension is injected when starting the browser
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seleniumproxy-0.1.0.tar.gz.
File metadata
- Download URL: seleniumproxy-0.1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0efa52f69dd4d9cec8202c711d1ce29ab1039612ec219fe87ef6bd585b0b8fb
|
|
| MD5 |
b13d3ba7d3526a3e035c69585e622877
|
|
| BLAKE2b-256 |
afa4e632b8863953a215e3e83bf281bfbf69db766463584aab1567dff9dc6896
|
File details
Details for the file seleniumproxy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: seleniumproxy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb04cd686fd9f6937c02d3e87aab0c2ec9ef0838b445d09ae9b5c1df44025c59
|
|
| MD5 |
2787e26fe87f737cd9d4aea05f1a60b1
|
|
| BLAKE2b-256 |
937cb8fe55bbe6fcd68e91b57044f52996db27fb34a4a67ebefd173f784dca77
|