Replaced use of urllib2 with requests