Please be careful using urllib2, unless you are on Python 2.7.10+ or 3.5+ it does not do HTTPS certificate validation.
An authentic connection to LE is literally fundamental.
Unless you validate the certificate that you get using a pre-installed LE root certificate.