A
asianavatar
I am trying to write a program that requires me hitting a https web link. However, I can't seem to get it to work. The program works fine when dealing with http sites, however, when I try it with a https site I get
socket.gaierror: [Errno 11001] getaddrinfo failed
It seems like it has something to do with the ssl not working, however, I do have the ssl.py in the python library and I have no problem importing it.
My code is below. Any help would be greatly appreciated.
import urllib.request
auth = urllib.request.HTTPSHandler()
proxy = urllib.request.ProxyHandler({'http':'my proxy'})
opener = urllib.request.build_opener(proxy, auth)
f = opener.open('http://www.google.ca/')
socket.gaierror: [Errno 11001] getaddrinfo failed
It seems like it has something to do with the ssl not working, however, I do have the ssl.py in the python library and I have no problem importing it.
My code is below. Any help would be greatly appreciated.
import urllib.request
auth = urllib.request.HTTPSHandler()
proxy = urllib.request.ProxyHandler({'http':'my proxy'})
opener = urllib.request.build_opener(proxy, auth)
f = opener.open('http://www.google.ca/')