March 2003
Intermediate to advanced
656 pages
39h 30m
English
urlsplit
urlsplit(url_string,default_scheme='',allow_fragments=True)
Analyzes url_string and returns a tuple
with five string items: scheme, location, path, query, and fragment.
default_scheme is the first item when the
url_string lacks a scheme. When
allow_fragments is
False, the tuple’s last item is
always '', whether or not
url_string has a fragment. Items
corresponding to missing parts are always ''. For
example:
urlparse.urlsplit(
'http://www.python.org:80/faq.cgi?src=fie')
# Result is:
# ('http','www.python.org:80','/faq.cgi','src=fie','')