fixed urlparse for python3