import urlparse print urlparse.urlsplit('http://www.sharejs.com:80/faq.cgi?src=fie')