Skip to main content
ubuntuask.com

Back to all posts

How to Use A Proxy In Selenium Python?

Published on
4 min read
How to Use A Proxy In Selenium Python? image

Best Proxy Tools for Selenium Python to Buy in November 2025

1 GUM Proxabrush Permanent Handle Refills - Compatible with Go-Betweens Interdental Brushes - Floss Picks for Teeth, Braces, and Implants

GUM Proxabrush Permanent Handle Refills - Compatible with Go-Betweens Interdental Brushes - Floss Picks for Teeth, Braces, and Implants

  • DEEP CLEAN: REACHES PLAQUE BRUSHING CAN'T FOR HEALTHIER GUMS.

  • ECO-FRIENDLY: REUSABLE SYSTEM REDUCES SINGLE-USE PLASTICS!

  • VERSATILE: PERFECT FOR BRACES, IMPLANTS, AND ALL DENTAL DEVICES.

BUY & SAVE
$5.09 $6.99
Save 27%
GUM Proxabrush Permanent Handle Refills - Compatible with Go-Betweens Interdental Brushes - Floss Picks for Teeth, Braces, and Implants
2 GUM Proxabrush Go-Betweens - Ultra Tight - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10ct (Pack of 6)

GUM Proxabrush Go-Betweens - Ultra Tight - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10ct (Pack of 6)

  • DEEP CLEANING: EFFECTIVE PLAQUE REMOVAL BEYOND BRUSHING ALONE.
  • ULTRA TIGHT FIT: CLEANS NARROW SPACES EASILY FOR ALL DENTAL NEEDS.
  • TRAVEL-FRIENDLY: COMPACT, REUSABLE DESIGN WITH HYGIENIC PROTECTION.
BUY & SAVE
$22.99 $26.99
Save 15%
GUM Proxabrush Go-Betweens - Ultra Tight - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10ct (Pack of 6)
3 Fremouth 50 Count Angle Interdental Brushes for Braces, 5 Sizes, Extra Tight(0.6mm), Tight(0.7mm), Medium(0.8mm), Wide(1.0mm,1.2mm), L- Shaped Interproximal Floss for Dental Plaque Removal Health

Fremouth 50 Count Angle Interdental Brushes for Braces, 5 Sizes, Extra Tight(0.6mm), Tight(0.7mm), Medium(0.8mm), Wide(1.0mm,1.2mm), L- Shaped Interproximal Floss for Dental Plaque Removal Health

  • DEEP CLEANING MADE EASY: ANGLED HANDLE FOR EFFORTLESS BACK-OF-MOUTH ACCESS.

  • FIVE SIZES FOR EVERY NEED: TAILORED OPTIONS FOR OPTIMAL INTERDENTAL CARE.

  • VERSATILE USE: CLEANS TEETH, BRACES, AND EVEN HOUSEHOLD ITEMS EFFECTIVELY.

BUY & SAVE
$9.99
Fremouth 50 Count Angle Interdental Brushes for Braces, 5 Sizes, Extra Tight(0.6mm), Tight(0.7mm), Medium(0.8mm), Wide(1.0mm,1.2mm), L- Shaped Interproximal Floss for Dental Plaque Removal Health
4 GUM Proxabrush Go-Betweens Refills - Wide - Compatible with GUM Permanent Handle - Reusable Interdental Brushes - Soft Bristled Dental Picks, 8 Count(Pack of 6)

GUM Proxabrush Go-Betweens Refills - Wide - Compatible with GUM Permanent Handle - Reusable Interdental Brushes - Soft Bristled Dental Picks, 8 Count(Pack of 6)

  • COMPATIBLE REFILLS: WORKS WITH GUM PERMANENT AND DUAL-ENDED HANDLES.

  • DEEP CLEAN: SOFT BRISTLES EFFECTIVELY REMOVE PLAQUE AND FOOD PARTICLES.

  • IDEAL FOR BRACES: GENTLE CLEANING FOR BRACES AND DENTAL APPLIANCES.

BUY & SAVE
$19.99
GUM Proxabrush Go-Betweens Refills - Wide - Compatible with GUM Permanent Handle - Reusable Interdental Brushes - Soft Bristled Dental Picks, 8 Count(Pack of 6)
5 GUM Proxabrush Go-Betweens - Moderate - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10 Count (Pack of 4)

GUM Proxabrush Go-Betweens - Moderate - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10 Count (Pack of 4)

  • DEEP CLEAN BETWEEN TEETH: REMOVES PLAQUE BEYOND BRUSHING POWER.
  • PERFECT FOR BRACES: CLEANS AROUND DENTAL DEVICES WITHOUT DAMAGE.
  • TRAVEL-FRIENDLY DESIGN: REUSABLE PICKS WITH PROTECTIVE CAPS INCLUDED.
BUY & SAVE
$16.99 $19.99
Save 15%
GUM Proxabrush Go-Betweens - Moderate - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10 Count (Pack of 4)
6 Fremouth 50 Count Angle Interdental Brushes for Braces, Tight(0.7mm), L- Shaped Interproximal Floss for Dental Plaque Removal Health

Fremouth 50 Count Angle Interdental Brushes for Braces, Tight(0.7mm), L- Shaped Interproximal Floss for Dental Plaque Removal Health

  • EXTENDED HANDLE FOR EASY REACH: CLEAN HARD-TO-REACH AREAS EFFORTLESSLY.

  • VERSATILE CLEANING TOOL: REMOVES STAINS FROM TEETH AND VARIOUS SURFACES.

  • COMPACT & DURABLE DESIGN: REUSABLE WITH A DUSTPROOF CAP FOR HYGIENE AND PORTABILITY.

BUY & SAVE
$9.99
Fremouth 50 Count Angle Interdental Brushes for Braces, Tight(0.7mm), L- Shaped Interproximal Floss for Dental Plaque Removal Health
7 GUM Proxabrush Go-Betweens - Tight - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10ct (Pack of 6)

GUM Proxabrush Go-Betweens - Tight - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10ct (Pack of 6)

  • DEEP CLEAN, NO FLOSS NEEDED: SOFT BRISTLES REACH PLAQUE BETWEEN TEETH.

  • IDEAL FOR TIGHT SPACES: CLEAN NARROW GAPS EASILY WITH TAILORED BRUSHES.

  • TRAVEL-FRIENDLY & REUSABLE: COMPACT DESIGN WITH HYGIENIC, PROTECTIVE CAPS.

BUY & SAVE
$25.74
GUM Proxabrush Go-Betweens - Tight - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 10ct (Pack of 6)
8 Proxysoft Dental Floss for Bridges and Implants 2 Packs - Floss Threaders for Bridges, Dental Implants, Braces with Extra-Thick Proxy Brush for Optimal Oral Hygiene -Teeth Bridge and Implant Cleaners

Proxysoft Dental Floss for Bridges and Implants 2 Packs - Floss Threaders for Bridges, Dental Implants, Braces with Extra-Thick Proxy Brush for Optimal Oral Hygiene -Teeth Bridge and Implant Cleaners

  • TRAVEL-SIZED PACKS ENSURE CONVENIENT ORAL CARE ANYTIME, ANYWHERE.
  • ALL-IN-ONE CLEANER FOR BRIDGES, BRACES, AND IMPLANTS-VERSATILE HYGIENE.
  • INNOVATIVE DESIGN TARGETS GUM HEALTH WITH SUPERIOR CLEANING EFFICIENCY.
BUY & SAVE
$11.89
Proxysoft Dental Floss for Bridges and Implants 2 Packs - Floss Threaders for Bridges, Dental Implants, Braces with Extra-Thick Proxy Brush for Optimal Oral Hygiene -Teeth Bridge and Implant Cleaners
9 GUM Proxabrush Go-Betweens - Wide - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 15 Count

GUM Proxabrush Go-Betweens - Wide - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 15 Count

  • DEEP CLEAN ALTERNATIVE: REMOVES PLAQUE WHERE BRUSHING CAN'T REACH.
  • WIDE FIT DESIGN: IDEAL FOR LARGER GAPS; AVAILABLE IN VARIOUS SIZES.
  • TRAVEL-FRIENDLY: COMPACT, REUSABLE, WITH HYGIENIC TRAVEL CAP INCLUDED.
BUY & SAVE
$8.88
GUM Proxabrush Go-Betweens - Wide - Interdental Brushes - Soft Bristled Dental Picks for Plaque Removal Health - Safe for Braces & Dental Devices, 15 Count
+
ONE MORE?

To use a proxy in Selenium Python, you can follow the steps mentioned below:

  1. Import the necessary modules: from selenium import webdriver from selenium.webdriver.common.proxy import Proxy, ProxyType
  2. Set up the proxy: proxy = Proxy() proxy.proxy_type = ProxyType.MANUAL proxy.http_proxy = ":" proxy.ssl_proxy = ":" Note: Replace and with the actual proxy server address and port.
  3. Configure the desired capabilities: capabilities = webdriver.DesiredCapabilities.CHROME proxy.add_to_capabilities(capabilities)
  4. Launch the browser with the configured proxy: driver = webdriver.Chrome(desired_capabilities=capabilities) Replace Chrome with the appropriate browser (e.g., Firefox, Edge, etc.) if you are using a different browser.
  5. Proceed with your desired automated browser actions using the driver object.

By following the above steps, you can easily use a proxy with Selenium in Python for browsing with IP anonymity or accessing region-restricted content.

How to bypass proxy settings for local addresses in Selenium Python?

To bypass proxy settings for local addresses in Selenium Python, you can add a proxy capability to your WebDriver instance and exclude the local addresses from the proxy configuration. Here is an example:

from selenium import webdriver from selenium.webdriver.common.proxy import Proxy, ProxyType

Create a new Proxy object

proxy = Proxy()

Set the proxy type to MANUAL

proxy.proxy_type = ProxyType.MANUAL

Add the proxy server address and port

proxy.http_proxy = "127.0.0.1:8080"

Set the desired capabilities with proxy configuration

capabilities = webdriver.DesiredCapabilities.CHROME.copy() proxy.add_to_capabilities(capabilities)

Exclude the local addresses from the proxy configuration

proxy.add_to_capabilities({'proxy': {'noProxy': ''}})

Create a new WebDriver instance with the desired capabilities

driver = webdriver.Chrome(desired_capabilities=capabilities)

Now you can use the WebDriver instance for automation

...

In this example, we create a Proxy object and set its type to MANUAL. Then, we add the proxy server address and port to the proxy object. Next, we create a copy of the CHROME desired capabilities and add the proxy configuration to it using the add_to_capabilities method on the proxy object. Finally, we exclude the local addresses from the proxy configuration by adding {'proxy': {'noProxy': '<local>'}} to the capabilities. This ensures that any local addresses are accessed directly without going through the proxy.

How to use a proxy in Selenium Python?

To use a proxy in Selenium Python, you can follow these steps:

  1. Import the necessary modules:

from selenium import webdriver from selenium.webdriver.common.proxy import Proxy, ProxyType

  1. Create a Proxy object and specify the proxy server address and port:

proxy = Proxy() proxy.proxy_type = ProxyType.MANUAL proxy.http_proxy = "<proxy_server_address>:<proxy_port>" proxy.ssl_proxy = "<proxy_server_address>:<proxy_port>"

Replace <proxy_server_address> and <proxy_port> with the appropriate values.

  1. Create a webdriver.DesiredCapabilities object and set the proxy:

capabilities = webdriver.DesiredCapabilities.CHROME proxy.add_to_capabilities(capabilities)

  1. Instantiate the WebDriver with the capabilities:

driver = webdriver.Chrome(desired_capabilities=capabilities)

Now, Selenium will use the specified proxy for all subsequent browser interactions.

How to use proxies for multi-threaded web scraping in Selenium Python?

To use proxies for multi-threaded web scraping in Selenium Python, follow these steps:

  1. Import the required dependencies:

import threading from selenium import webdriver from selenium.webdriver.chrome.options import Options

  1. Create a function to initialize the Selenium WebDriver instance with proxy settings:

def init_driver(proxy): chrome_options = Options() chrome_options.add_argument('--proxy-server=%s' % proxy) driver = webdriver.Chrome(options=chrome_options) return driver

  1. Create a function to perform the scraping operations on a given thread:

def scrape_with_proxy(proxy): driver = init_driver(proxy)

# Perform scraping operations using the driver instance

driver.quit()
  1. Initialize a list of proxies to be used:

proxies = ['proxy1:port', 'proxy2:port', 'proxy3:port']

  1. Create a list to hold the thread instances:

threads = []

  1. Create and start the threads, passing the proxy from the list to each thread:

for proxy in proxies: thread = threading.Thread(target=scrape_with_proxy, args=(proxy,)) thread.start() threads.append(thread)

  1. Wait for all the threads to complete using the join() method:

for thread in threads: thread.join()

By using this approach, you can perform multi-threaded web scraping with different proxies using Selenium in Python. Each thread will have its own instance of the WebDriver with the specified proxy settings.