N
N
Nikolai Goldobin2021-06-05 13:14:05
Python
Nikolai Goldobin, 2021-06-05 13:14:05

How to run multiple chrome browsers with different silenium+python proxies?

I am new to working with selenium
. It was no problem to make a separate multithread and a separate proxy. But here's how to make each browser use a different proxy when starting a multithread

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
JokerGTS, 2021-06-05
@badpackman

First response in a search engine

from selenium import webdriver

PROXY = "23.23.23.23:3128" # IP:PORT or HOST:PORT

chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % PROXY)

chrome = webdriver.Chrome(options=chrome_options)
chrome.get("http://whatismyipaddress.com")

For multiple webdriver instances, you can run each on a different port.

S
Summer Breeze, 2021-06-05
@qipzone

Queues. Each thread accesses and receives its own unique proxy.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question