1

I want requests using proxy, but the following errors occur.

requests.exceptions.ProxyError: HTTPSConnectionPool(host='URL', port=443): Max retries exceeded with url: / (Caused by ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory')))

I tried downgrading the version of urlib3 to 1.25.3, and the same error continues to occur even though I tried the proxy setting as below.

proxies = [{
 'http' : 'http://ip:port',
 'https' : 'http://ip:port'
}]
&&&&&
proxies = [{
 'http' : 'http://ip:port',
 'https' : 'https://ip:port'
}]

False value is also given to the verify option, but errors continue to occur. Can you tell me the solution?

When I searched, I heard that my proxy ip does not support https communication. Is this right?

asked Sep 11, 2021 at 8:14

1 Answer 1

1
proxies = {
 'http': 'http://user_name:password@ip:port',
 'https': 'http://user_name:password@ip:port'
 }
r = requests.get(URL, proxies=proxies)
Nimantha
6,5456 gold badges32 silver badges78 bronze badges
answered Sep 11, 2021 at 8:25
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.