python (3.12.0)
̑e d Z ddlmZ ddlZddlZddlZddlZddlZddlZg dZ g dZ
g dZg dZg dZ
g d Zg d
ZdZdZg d
Zd ZdZdZd ZeefdZeefdZd Z G d de Z G d de Z G d de Z G d dee Z G d dee Z edd Z ed!d" Z! ed#d$ Z"d%e _ d&e jF _ d'e jH _ d(e!_ d)e!jJ _ d*e!jL _ d+e!jN _ d,e!jP _ d-e!jH _ d.e"_ e!jJ j e"jJ _ e!jL j e"jL _ e!jN j e"jN _ d/e"jR _ e!jP j e"jP _ e!jH j e"jH _ eZ* G d0 de e Z+ G d1 d!e!e Z, G d2 d#e"e Z- G d3 d4e e Z. G d5 d6e!e Z/ G d7 d8e"e Z0d9 Z1 e1 [1dsd<Z2d= Z3dtd>Z4d? Z5d@ Z6 ejn d;A dsdB Z8dC Z9dD Z:dudEZ;dF Z<dGZ=da>dH Z?dIe@eAz eBz dJe@eAz fdKZC ej dL ZEdM ZFdvdNZG dwdPZH dwdQZIdvdRZJ eKdS ZL e@eL ZMdT ZN G dU dVeO ZPdxdWZQdydXZRejn dY ZSdzdZZTdOd:ddeRfd[ZUd\ ZVd] ZWd^ ZXd_ ZYdaZd` Z[da Z\da]db Z^dc Z_dd Z`de Zadf Zbdg Zcdaddh Zed{diZfd{djZgdk Zhdl Zidm Zjdn Zkdo Zldp Zmdq Zndr Zoy)|a3 Parse (absolute and relative) URLs.
urlparse module is based upon the following RFC specifications.
RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding
and L. Masinter, January 2005.
RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter
and L.Masinter, December 1999.
RFC 2396: "Uniform Resource Identifiers (URI)": Generic Syntax by T.
Berners-Lee, R. Fielding, and L. Masinter, August 1998.
RFC 2368: "The mailto URL scheme", by P.Hoffman , L Masinter, J. Zawinski, July 1998.
RFC 1808: "Relative Uniform Resource Locators", by R. Fielding, UC Irvine, June
1995.
RFC 1738: "Uniform Resource Locators (URL)" by T. Berners-Lee, L. Masinter, M.
McCahill, December 1994
RFC 3986 is considered the current standard and any future changes to
urlparse module should conform with it. The urlparse module is
currently not entirely compliant with this RFC due to defacto
scenarios for parsing, and for backward compatibility purposes, some
parsing quirks from older RFCs are retained. The testcases in
test_urlparse.py provides a good indicator of parsing behavior.
The WHATWG URL Parser spec should also be considered. We are not compliant with
it either due to existing user code API behavior expectations (Hyrum's Law).
It serves as a useful guide when making changes.
)
namedtupleN)urlparse
urlunparseurljoin urldefragurlsplit
urlunsplit urlencodeparse_qs parse_qslquote
quote_plusquote_from_bytesunquoteunquote_plusunquote_to_bytesDefragResultParseResultSplitResultDefragResultBytesParseResultBytesSplitResultBytes) ftphttpgophernntpimapwaisfilehttpsshttpmmsprosperortsprtspsrtspusftpsvnsvn+sshwswss)r r r r r telnetr r r r# r! r"