PyDocs

Nav

Internet Protocols and Support

urllib.parse.SplitResult.geturl

  • urllib.parse.SplitResult.geturl()
Return the re-combined version of the original URL as a string. This may differ from the original URL in that the scheme may be normalized to lower case and empty components may be dropped. Specifically, empty parameters, queries, and fragment identifiers will be removed unless the URL was parsed with missing_as_none=True.
1 Example
>>> from urllib.parse import urlsplit
>>> url = 'HTTP://www.Python.org/doc/#'
>>> r1 = urlsplit(url)
>>> r1.geturl()
'http://www.Python.org/doc/'
>>> r2 = urlsplit(r1.geturl())
>>> r2.geturl()
'http://www.Python.org/doc/'
>>> r3 = urlsplit(url, missing_as_none=True)
>>> r3.geturl()
'http://www.Python.org/doc/#'
from the Python docs
See Also
No see-alsos for urllib.parse/urllib.parse.SplitResult.geturl
0 Notes
No notes for urllib.parse.SplitResult.geturl