Replace urllib2 with requests to make HTTP handling easier and fix the SNI issue on Python 2.