I am making something where I need to be sending requests with post data to a https page. While trying to make this I got the following error.
urllib.error.HTTPError: HTTP Error 500: Domain Not Found
So I made something else really quick just for testing.
from urllib.request import Request, urlopen
proxy = ["5.62.154.103:8085","141.101.132.43:8085"]
indeks = 0
for x in range(0,2):
print(proxy[indeks])
q = Request("https://stackoverflow.com/questions/2146383/https-connection-python")
q.set_proxy(proxy[indeks],"http")
a = urlopen(q).read()
print(a)
indeks += 1
print(indeks)
And I found out this gave me the same same error. So I thought this was because the page was using https? Since I had no problems requesting http pages such as "http://httpbin.org/ip".
And https is not the problem here could someone explain me what I did wrong?
Thank you all in advance!