urllib2 and urlparse imports adjust for py3