Closed mick-net closed 4 years ago
Can anybody help me out why the request to Google is using the following code?
# noinspection PyUnresolvedReferences gcontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1) resp = urllib.request.urlopen(urllib.request.Request( url=search_url, data=None, headers=USER_AGENT), context=gcontext)
Without the SSL gcontext it also works:
gcontext
resp = urllib.request.urlopen(urllib.request.Request( url=search_url, data=None, headers=USER_AGENT))
Not relevant
Well, I am still interested in reason. It does not work on some python hostings with gcontext.
Can anybody help me out why the request to Google is using the following code?
Without the SSL
gcontext
it also works: