notes/Retrieve html from encrypted site https ssl-S1XZMra4.py
#!/usr/bin/env python
import urllib3
import certifi
http = urllib3.PoolManager(
cert_reqs='CERT_REQUIRED', # Force certificate check.
ca_certs=certifi.where(), # Path to the Certifi bundle.
)
# You're ready to make verified HTTPS requests.
try:
print "Connecting..."
r = http.request('GET', 'https://iaff2396.com/')
html = r.read()
print html
except urllib3.exceptions.SSLError as e:
print "error"
syntax highlighted by Code2HTML, v. 0.9.1