Код: Выделить всё
Traceback (most recent call last):
File "path/beta.py", line 36, in
driver.get("https://www.whatismyip.com/my-ip-information/")
File "path\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 363, in get
self.execute(Command.GET, {"url": url})
File "path\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 354, in execute
self.error_handler.check_response(response)
File "path\Miniconda\envs\geoweb_doctorat\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_TUNNEL_CONNECTION_FAILED
(Session info: chrome=)
Stacktrace:
GetHandleVerifier [0x00007FF7C5B8FDA5+29557]
(No symbol) [0x00007FF7C5B02240]
(No symbol) [0x00007FF7C59BB6EA]
(No symbol) [0x00007FF7C59B3746]
(No symbol) [0x00007FF7C59A4439]
(No symbol) [0x00007FF7C59A61E2]
(No symbol) [0x00007FF7C59A46FF]
(No symbol) [0x00007FF7C59A3FAD]
(No symbol) [0x00007FF7C59A3ECA]
(No symbol) [0x00007FF7C59A1D52]
(No symbol) [0x00007FF7C59A23CC]
(No symbol) [0x00007FF7C59BE821]
(No symbol) [0x00007FF7C5A596CE]
(No symbol) [0x00007FF7C5A374FA]
(No symbol) [0x00007FF7C5A588A3]
(No symbol) [0x00007FF7C5A372A3]
(No symbol) [0x00007FF7C5A012DF]
(No symbol) [0x00007FF7C5A02451]
GetHandleVerifier [0x00007FF7C5EBDCBD+3363469]
GetHandleVerifier [0x00007FF7C5F09B47+3674391]
GetHandleVerifier [0x00007FF7C5EFEAEB+3629243]
GetHandleVerifier [0x00007FF7C5C4FC66+815670]
(No symbol) [0x00007FF7C5B0D6EF]
(No symbol) [0x00007FF7C5B092B4]
(No symbol) [0x00007FF7C5B09450]
(No symbol) [0x00007FF7C5AF81FF]
BaseThreadInitThunk [0x00007FF9888D7034+20]
RtlUserThreadStart [0x00007FF988B02651+33]
Код: Выделить всё
from seleniumwire import webdriver
import seleniumwire.undetected_chromedriver as uc
username = 'username'
password = 'password'
proxy = f"http://{username}:{password}@ca.smartproxy.com:20000"
proxy_options = {
'proxy': {
'http': f"http://{username}:{password}@ca.smartproxy.com:20000",
'https': f"https://{username}:{password}@ca.smartproxy.com:20000"
}
}
driver = webdriver.Chrome(
seleniumwire_options=proxy_options
)
driver.get("https://www.whatismyip.com/my-ip-information/")
time.sleep(5)
Подробнее здесь: https://stackoverflow.com/questions/790 ... ying-to-us