I was trying to access webpages which has expired/invalid certs. When I access the URL from browser, I get the security warning Your connection is not private. But when I use python to access the same page, I am not getting any error. The code I used is below,
import urllib2
url = 'https://expired.badssl.com/'
request = urllib2.Request(url)
result = urllib2.urlopen(request)
print (result.read())
Why am I not getting SSL cert error in urllib2?
UPDATE
I identified that the page which is downloaded was my internet authentication page.
But when I use requests I am getting SSL exception. why urllib2 behaviour is different from requests behaviour?