Replace urllib2 with urllib3 consistently