Hello, I can not install a proxy on http.client
# coding: utf-8 import http.client request = http.client.HTTPConnection('ip-api.com') request.set_tunnel('77.73.65.173', 3128) request.request('GET', '/json') response = request.getresponse() source = response.read() request.close() print(source) OSError: Tunnel connection failed: 404 Not Found
Tell me, please, what's the problem?
I use the same proxies via urllib.request, everything works there, but not in http.client ..
import http.client request = http.client.HTTPConnection('77.73.65.173', 3128) request.set_tunnel('ip-api.com') request.request('GET', '/json') response = request.getresponse() source = response.read() request.close() print(source)- ast