ID EN
Urllib Parse

urlsplit

Python 3.11

This is similar to urlparse(), but does not split the params from the URL. This should generally be used instead of urlparse() if the more recent URL syntax allowing parameters to be applied to each segment of the path portion of the URL (see RFC 2396) is wanted. A separate function is needed to separate the path segments and parameters. This function returns a 5-item named tuple:

Syntax

PYTHON
urllib.parse.urlsplit(urlstring, scheme='', allow_fragments=True)

Examples

Example 1
PYTHON
(addressing scheme, network location, path, query, fragment identifier).

See Also

urlparse() urlparse() named tuple named tuple None None None None