Name
urlsplit
Synopsis
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','')
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.