Купила прокси Socks, IPv6. Хочу сейчас проверить, рабочий ли, на что мне вылетает ошибка:
Traceback (most recent call last):
File "C:\Users\ilyam\PycharmProjects\steam orders bot\parse_id.py", line 57, in <module>
r = requests.get("https://www.google.com", proxies=proxies)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\adapters.py", line 439, in send
resp = conn.urlopen(
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
self._prepare_proxy(conn)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
conn.connect()
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 359, in connect
conn = self._connect_tls_proxy(hostname, conn)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\connection.py", line 500, in _connect_tls_proxy
return ssl_wrap_socket(
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock)
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\ilyam\AppData\Local\Programs\Python\Python39\lib\ssl.py", line 997, in _create
raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname
Прокси 45.89.18.238:5354, логин/пароль: "oOAQ6o", "89EpI4FXtY"
Код:
import requests
from requests_toolbelt.auth.http_proxy_digest import HTTPProxyDigestAuth
proxies = {
"http": "http://45.89.18.238:5354",
"https": "https://45.89.18.238:5354",
}
auth = HTTPProxyDigestAuth("oOAQ6o", "89EpI4FXtY")
# HTTPS
r = requests.get("https://www.google.com", proxies=proxies, auth=auth)
print(r.status_code)
Еще есть тоже прокси, с ними аналогичная ошибка:
45.89.18.249:16296@oOAQ6o:89EpI4FXtY
45.89.19.10:8150@oOAQ6o:89EpI4FXtY
45.89.19.107:17312@oOAQ6o:89EpI4FXtY
Подскажите, из-за чего может быть ошибка и как её пофиксить?