ID EN
Urllib Parse

urldefrag

Python 3.11

If url contains a fragment identifier, return a modified version of url with no fragment identifier, and the fragment identifier as a separate string. If there is no fragment identifier in url, return url unmodified and an empty string.

Syntax

PYTHON
urllib.parse.urldefrag(url)

See Also

named tuple Structured Parse Results