I'm using urllib.request.urlretrieve to download a file to local.
urllib.request.urlretrieve(url_string,file_name)
It throws error:
ssl.CertificateError was unhandled by user code
Message: hostname 'foo.net' doesn't match either of 'a248.e.akamai.net', '.akamaihd.net', '.akamaihd-staging.net', '.akamaized.net', '.akamaized-staging.net'
If you copy the url into Chrome, it will show you a notification and you need to say something like "keep going to the url".
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…