Please take a look at Cert Human: SSL Certificates for Humans for an impressive rewrite of this project by
lifehackjim
Extracting Certificate Authorities from a request.
λ python getcert.py -h
usage: getcert.py [-h] [--verify] [--no-verify] URL
Request any URL and dump the certificate chain
positional arguments:
URL Valid https URL to be handled by requests
optional arguments:
-h, --help show this help message and exit
--verify Explicitly set SSL verification
--no-verify Explicitly disable SSL verification