0

I have every time this error If I use this code

import requests

proxy_list = [
    {"https": "45.14.173.23"},
]

for proxy in proxy_list:
    requests.get('https://iplogger.org/1QMwp7', proxies=proxy)

.

Error code: requests.exceptions.ProxyError: HTTPSConnectionPool(host='iplogger.org', port=443): Max retries exceeded with url: /1QMwp7 (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 400 Bad Request')))

I am sure that my proxy is working. But what's the problem?

1

1 Answer 1

0
import requests
    
proxy_list = {
    "http": "https://ip:port",
    "https": "http://ip:port",
    }
    
requests.get('https://iplogger.org/1QMwp7', proxies=proxy_list)
Sign up to request clarification or add additional context in comments.

1 Comment

Welcome to Stack Overflow! While this code may solve the question, including an explanation of how and why this solves the problem would really help to improve the quality of your post, and probably result in more up-votes. Remember that you are answering the question for readers in the future, not just the person asking now. Please edit your answer to add explanations and give an indication of what limitations and assumptions apply.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.