Fixing issue with python2 urllib2 and python3 urllib