Не удается подключиться к прокси-серверу из-за ошибки requests.get (python) - PullRequest
0 голосов
/ 19 июня 2020

Я пытаюсь подключиться к прокси-серверу с помощью request.get, и всякий раз, когда я пытаюсь, я получаю сообщение об ошибке «Невозможно подключиться к прокси». Вот мой код:

import requests

proxies = {
 "http": "181.113.68.196:8080",
 "https": "181.113.68.196:8080",
}
r = requests.get("https://thewebsite.com", proxies=proxies)

Это приводит к этой ошибке:

requests.exceptions.ProxyError: HTTPSConnectionPool(host='thewebsite.com', port=443): Max retries exceeded with url: /python-requests-proxy (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)))

Я просто помещаю thewebsite.com, потому что он делает то же самое со всеми вводимыми мной веб-сайтами. Кто-нибудь может мне с этим помочь?

...