A
A
AlmazKayum2020-09-08 10:51:29
Python
AlmazKayum, 2020-09-08 10:51:29

Why don't proxies work in python requests? Or work?

s = requests.Session()
s.headers['Accept']= 'application/json'
proxies = {
'http':' http://login:[email protected]:port/ ',
}
res = s.get( ' https://ya.ru ', proxies=proxies)
print(res)

I tried without a proxy, with valid proxies, and deliberately made a mistake in the host and pass proxies.
Always the same result code 200.
Do they even work? Or how to prescribe in the code so that they work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-09-08
@bacon

What protocol is the proxy for, and what is the request for?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question