fix for python 3 urlopen and urlencode