Fix urlopen to be python3 compatible