Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/urllib/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/urllib/__pycache__/parse.cpython-37.opt-2.pyc

B

YI~d��@s`ddlZddlZddlZdddddddd	d
ddd
dddddddddgZdddddddddd d!d"d#d$d%d&d'd(d)gZdddddd*dddd!dd d+d"d#d$d,d&d'd%d-d.d/d(d)gZddd0d"dddd d#d$d1d2d!d%d3gZdd0d4d5d*ddd+d1d2g
Zdddddd d!dd#d$d1d2gZddd0ddd5dddd d+dd"g
Z	d6Z
d7Zd8d9d:gZd;Z
iZd<d=�Zd>Zd?Zd@dA�ZeefdBdC�ZeefdDdE�ZdFdG�ZGdHdI�dIe�ZGdJdK�dKe�ZGdLdM�dMe�ZGdNdO�dOee�ZGdPdQ�dQee�ZddRlmZeddS�ZeddT�ZeddU�ZdVe_ dWej!_ dXej"_ dYe_ dZej#_ d[ej$_ d\ej%_ d]ej&_ d^ej"_ d_e_ ej#j ej#_ ej$j ej$_ ej%j ej%_ d`ej'_ ej&j ej&_ ej"j ej"_ eZ(Gdad�dee�Z)Gdbd�dee�Z*Gdcd�dee�Z+Gddd�dee�Z,Gded�dee�Z-Gdfd�dee�Z.dgdh�Z/e/�[/d�djd�Z0dkdl�Z1d�dmdn�Z2dodp�Z3dqdr�Z4d�dsd�Z5dtd�Z6dud�Z7d�dvd�Z8dwd�Z9dxZ:da;dyd�Z<e�=dz�Z>d�d}d�Z?d�d�d	�Z@d�d�d
�ZAd�d�d�ZBeCd��ZDeEeD�ZFiZGGd�d��d�ejH�ZId�d�d�ZJd�d�d�ZKd�d�d
�ZLd~dddeKfd�d�ZMd�d��ZNd�d��ZOdaPd�d��ZQdaRd�d��ZSd�d��ZTd�d��ZUdaVd�d��ZWd�d�d��ZXd�d��ZYd�d��ZZd�d��Z[d�d��Z\dS)��N�urlparse�
urlunparse�urljoin�	urldefrag�urlsplit�
urlunsplit�	urlencode�parse_qs�	parse_qsl�quote�
quote_plus�quote_from_bytes�unquote�unquote_plus�unquote_to_bytes�DefragResult�ParseResult�SplitResult�DefragResultBytes�ParseResultBytes�SplitResultBytes�Zftp�httpZgopherZnntpZimapZwais�fileZhttpsZshttpZmmsZprosperoZrtspZrtspuZsftpZsvnzsvn+sshZwsZwssZtelnetZsnewsZrsyncZnfsZgitzgit+sshZhdlZsipZsipsZtelZmailtoZnewszAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.z!	

 �	�
�
�cCst��t��dS)N)�_parse_cache�clear�
_safe_quoters�r!r!�1/opt/alt/python37/lib64/python3.7/urllib/parse.py�clear_cache^sr#�ascii�strictcCs|S)Nr!)�objr!r!r"�_noopmsr'cCs|�||�S)N)�encode)r&�encoding�errorsr!r!r"�_encode_resultpsr+cst��fdd�|D��S)Nc3s"|]}|r|����ndVqdS)rN)�decode)�.0�x)r)r*r!r"�	<genexpr>vsz_decode_args.<locals>.<genexpr>)�tuple)�argsr)r*r!)r)r*r"�_decode_argstsr2cGsZt|dt�}x.|dd�D]}|rt|t�|krtd��qW|rL|tfSt|�tfS)Nr�z$Cannot mix str and non-str arguments)�
isinstance�str�	TypeErrorr'r2r+)r1Z	str_input�argr!r!r"�_coerce_argsxs
r8c@seZdZdZddd�ZdS)�_ResultMixinStrr!r$r%cs|j��fdd�|D��S)Nc3s|]}|����VqdS)N)r()r-r.)r)r*r!r"r/�sz)_ResultMixinStr.encode.<locals>.<genexpr>)�_encoded_counterpart)�selfr)r*r!)r)r*r"r(�sz_ResultMixinStr.encodeN)r$r%)�__name__�
__module__�__qualname__�	__slots__r(r!r!r!r"r9�sr9c@seZdZdZddd�ZdS)�_ResultMixinBytesr!r$r%cs|j��fdd�|D��S)Nc3s|]}|����VqdS)N)r,)r-r.)r)r*r!r"r/�sz+_ResultMixinBytes.decode.<locals>.<genexpr>)�_decoded_counterpart)r;r)r*r!)r)r*r"r,�sz_ResultMixinBytes.decodeN)r$r%)r<r=r>r?r,r!r!r!r"r@�sr@c@s@eZdZdZedd��Zedd��Zedd��Zedd	��Zd
S)�_NetlocResultMixinBaser!cCs
|jdS)Nr)�	_userinfo)r;r!r!r"�username�sz_NetlocResultMixinBase.usernamecCs
|jdS)Nr3)rC)r;r!r!r"�password�sz_NetlocResultMixinBase.passwordcCsD|jd}|sdSt|t�r dnd}|�|�\}}}|��||S)Nr�%�%)�	_hostinfor4r5�	partition�lower)r;�hostname�	separator�percentZzoner!r!r"rK�s
z_NetlocResultMixinBase.hostnamecCs>|jd}|dk	r:t|d�}d|kr0dks:ntd��|S)Nr3�
ri��zPort out of range 0-65535)rH�int�
ValueError)r;�portr!r!r"rQ�s

z_NetlocResultMixinBase.portN)	r<r=r>r?�propertyrDrErKrQr!r!r!r"rB�s
rBc@s(eZdZdZedd��Zedd��ZdS)�_NetlocResultMixinStrr!cCsD|j}|�d�\}}}|r4|�d�\}}}|s<d}nd}}||fS)N�@�:)�netloc�
rpartitionrI)r;rV�userinfo�	have_info�hostinforD�
have_passwordrEr!r!r"rC�sz_NetlocResultMixinStr._userinfocCsl|j}|�d�\}}}|�d�\}}}|rL|�d�\}}}|�d�\}}}n|�d�\}}}|sdd}||fS)NrT�[�]rU)rVrWrI)r;rV�_rZ�have_open_br�	bracketedrKrQr!r!r"rH�sz_NetlocResultMixinStr._hostinfoN)r<r=r>r?rRrCrHr!r!r!r"rS�srSc@s(eZdZdZedd��Zedd��ZdS)�_NetlocResultMixinBytesr!cCsD|j}|�d�\}}}|r4|�d�\}}}|s<d}nd}}||fS)N�@�:)rVrWrI)r;rVrXrYrZrDr[rEr!r!r"rC�sz!_NetlocResultMixinBytes._userinfocCsl|j}|�d�\}}}|�d�\}}}|rL|�d�\}}}|�d�\}}}n|�d�\}}}|sdd}||fS)Nrb�[�]rc)rVrWrI)r;rVr^rZr_r`rKrQr!r!r"rH�sz!_NetlocResultMixinBytes._hostinfoN)r<r=r>r?rRrCrHr!r!r!r"ra�sra)�
namedtuplezurl fragmentz!scheme netloc path query fragmentz(scheme netloc path params query fragmentz�
DefragResult(url, fragment)

A 2-tuple that contains the url without fragment identifier and the fragment
identifier as a separate argument.
z$The URL with no fragment identifier.z�
Fragment identifier separated from URL, that allows indirect identification of a
secondary resource by reference to a primary resource and additional identifying
information.
z�
SplitResult(scheme, netloc, path, query, fragment)

A 5-tuple that contains the different components of a URL. Similar to
ParseResult, but does not split params.
z%Specifies URL scheme for the request.z0
Network location where the request is made to.
z@
The hierarchical path, such as the path to a file to download.
z�
The query component, that contains non-hierarchical data, that along with data
in path component, identifies a resource in the scope of URI's scheme and
network location.
z�
Fragment identifier, that allows indirect identification of a secondary resource
by reference to a primary resource and additional identifying information.
zr
ParseResult(scheme, netloc, path, params,  query, fragment)

A 6-tuple that contains components of a parsed URL.
z�
Parameters for last path element used to dereference the URI in order to provide
access to perform some operation on the resource.
c@seZdZdZdd�ZdS)rr!cCs |jr|jd|jS|jSdS)N�#)�fragment�url)r;r!r!r"�geturlCszDefragResult.geturlN)r<r=r>r?rjr!r!r!r"rAsc@seZdZdZdd�ZdS)rr!cCst|�S)N)r)r;r!r!r"rjKszSplitResult.geturlN)r<r=r>r?rjr!r!r!r"rIsc@seZdZdZdd�ZdS)rr!cCst|�S)N)r)r;r!r!r"rjPszParseResult.geturlN)r<r=r>r?rjr!r!r!r"rNsc@seZdZdZdd�ZdS)rr!cCs |jr|jd|jS|jSdS)N�#)rhri)r;r!r!r"rjVszDefragResultBytes.geturlN)r<r=r>r?rjr!r!r!r"rTsc@seZdZdZdd�ZdS)rr!cCst|�S)N)r)r;r!r!r"rj^szSplitResultBytes.geturlN)r<r=r>r?rjr!r!r!r"r\sc@seZdZdZdd�ZdS)rr!cCst|�S)N)r)r;r!r!r"rjcszParseResultBytes.geturlN)r<r=r>r?rjr!r!r!r"rascCs8ttfttfttff}x|D]\}}||_||_qWdS)N)rrrrrrr:rA)Z
_result_pairsZ_decodedZ_encodedr!r!r"�_fix_result_transcodinggs
rlTc
Csft||�\}}}t|||�}|\}}}}}|tkrHd|krHt|�\}}nd}t||||||�}	||	�S)N�;r)r8r�uses_params�_splitparamsr)
ri�scheme�allow_fragments�_coerce_resultZsplitresultrV�queryrh�params�resultr!r!r"rtscCsRd|kr,|�d|�d��}|dkr6|dfSn
|�d�}|d|�||dd�fS)N�/rmrrr3)�find�rfind)ri�ir!r!r"ro�s

rocCsLt|�}x*dD]"}|�||�}|dkrt||�}qW|||�||d�fS)Nz/?#r)�lenrw�min)ri�start�delim�cZwdelimr!r!r"�_splitnetloc�s
rcCs�|r|��rdSddl}|�dd�}|�dd�}|�dd�}|�dd�}|�d|�}||kr`dSx(dD] }||krftd	|d
d��qfWdS)NrrTrrUrg�?�NFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)�isascii�unicodedata�replace�	normalizerP)rVr��nZnetloc2r~r!r!r"�_checknetloc�s
r�cCsxtD]}|�|d�}qW|S)Nr)�_UNSAFE_URL_BYTES_TO_REMOVEr�)ri�br!r!r"�_remove_unsafe_bytes_from_url�s
r�c
Cs�t||�\}}}t|�}t|�}|�t�}|�t�}t|�}|||t|�t|�f}t�|d�}|rj||�St	t�t
kr|t�d}}}|�d�}	|	dk�r�|d|	�dk�rn||	dd�}|dd�dk�rt
|d�\}}d|kr�d	|k�sd	|k�rd|k�rtd
��|�r,d|k�r,|�dd�\}}d|k�rF|�dd�\}}t|�td||||�}
|
t|<||
�Sxb|d|	�D]}|tk�r|P�q|W||	dd�}|�r�td
d�|D���r�|d|	���|}}|dd�dk�r"t
|d�\}}d|k�rd	|k�sd	|k�r"d|k�r"td
��|�rBd|k�rB|�dd�\}}d|k�r\|�dd�\}}t|�t|||||�}
|
t|<||
�S)NrrUrrr3�z//r\r]zInvalid IPv6 URLrgr�css|]}|dkVqdS)�
0123456789Nr!)r-r~r!r!r"r/�szurlsplit.<locals>.<genexpr>)r8r��lstrip�_WHATWG_C0_CONTROL_OR_SPACE�strip�bool�typer�getrz�MAX_CACHE_SIZEr#rwrrP�splitr�r�scheme_chars�anyrJ)
rirprqrr�key�cachedrVrsrhry�vr~�restr!r!r"r�sb






cCs<t|�\}}}}}}}|r&d||f}|t|||||f��S)Nz%s;%s)r8r)�
componentsrprVrirtrsrhrrr!r!r"r�scCs�t|�\}}}}}}|s4|r`|tkr`|dd�dkr`|rP|dd�dkrPd|}d|pXd|}|rp|d|}|r�|d|}|r�|d|}||�S)	Nr�z//r3rvrrUr�rg)r8�uses_netloc)r�rprVrirsrhrrr!r!r"r�s c	Cs�|s|S|s|St||�\}}}t|d|�\}}}}}}	t|||�\}
}}}
}}|
|ks`|
tkrh||�S|
tkr�|r�|t|
|||
||f��S|}|s�|
s�|}|}
|s�|}|t|
|||
||f��S|�d�}|ddkr�|d=|dd�dkr�|�d�}n(||�d�}td|dd��|dd�<g}xX|D]P}|dk�r^y|��Wntk
�rZYnXn|dk�rn�q*n
|�	|��q*W|ddk�r�|�	d�|t|
|d�
|��p�d|
||f��S)Nrrv���r3z..�.)r�z..)r8r�
uses_relativer�rr��filter�pop�
IndexError�append�join)�baserirqrrZbschemeZbnetlocZbpathZbparamsZbqueryZ	bfragmentrprV�pathrtrsrhZ
base_partsZsegmentsZ
resolved_pathZsegr!r!r"r	sT






c	CsTt|�\}}d|kr>t|�\}}}}}}t|||||df�}nd}|}|t||��S)Nrgr)r8rrr)	rirr�sr��p�a�qZfragZdefragr!r!r"rNsZ0123456789ABCDEFabcdefc	Cs�|s|jdSt|t�r"|�d�}|�d�}t|�dkr<|S|dg}|j}tdkrbdd�tD�axb|dd�D]R}y(|t|dd��||dd��Wqptk
r�|d�||�YqpXqpWd�	|�S)	N�zutf-8rGr3rcSs.i|]&}tD]}t�||�||���qqSr!)�_hexdig�bytes�fromhexr()r-r�r�r!r!r"�
<dictcomp>tsz$unquote_to_bytes.<locals>.<dictcomp>r�)
r�r4r5r(rzr��
_hextobyter��KeyErrorr�)�string�bits�resr��itemr!r!r"ras*



z([-]+)�utf-8r�cCs�d|kr|j|S|dkrd}|dkr*d}t�|�}|dg}|j}x@tdt|�d�D],}|t||��||��|||d�qVWd�|�S)NrFzutf-8r�rr3r�r)r��_asciirer��rangerzrr,r�)r�r)r*r�r�r�ryr!r!r"r�s


F�&c	CsRi}t|||||||d�}x2|D]*\}	}
|	|kr@||	�|
�q |
g||	<q W|S)N)r)r*�max_num_fieldsrL)r
r�)�qs�keep_blank_values�strict_parsingr)r*r�rLZ
parsed_result�pairs�name�valuer!r!r"r	�s
cCs&t|�\}}|rt|ttf�s&td��|dk	rLd|�|�}||krLtd��dd�|�|�D�}	g}
x�|	D]�}|sx|sxqj|�dd�}t|�dkr�|r�td|f��|rj|�d	�nqjt|d�s�|rj|d
�	dd�}
t
|
||d
�}
||
�}
|d�	dd�}t
|||d
�}||�}|
�|
|f�qjW|
S)Nz*Separator must be of type string or bytes.r3zMax number of fields exceededcSsg|]}|�qSr!r!)r-�s1r!r!r"�
<listcomp>�szparse_qsl.<locals>.<listcomp>�=r�zbad query field: %rrr�+� )r)r*)r8r4r5r�rP�countr�rzr�r�r)r�r�r�r)r*r�rLrr�
num_fieldsr��rZ
name_valueZnvr�r�r!r!r"r
�s8
cCs|�dd�}t|||�S)Nr�r�)r�r)r�r)r*r!r!r"rssBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-~c@s$eZdZdd�Zdd�Zdd�ZdS)�QuotercCst�|�|_dS)N)�_ALWAYS_SAFE�union�safe)r;r�r!r!r"�__init__szQuoter.__init__cCsd|jjt|�fS)Nz<%s %r>)�	__class__r<�dict)r;r!r!r"�__repr__#szQuoter.__repr__cCs(||jkrt|�nd�|�}|||<|S)Nz%{:02X})r��chr�format)r;r�r�r!r!r"�__missing__'szQuoter.__missing__N)r<r=r>r�r�r�r!r!r!r"r�sr�rvcCsbt|t�r8|s|S|dkrd}|dkr*d}|�||�}n |dk	rHtd��|dk	rXtd��t||�S)Nzutf-8r%z,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)r4r5r(r6r
)r�r�r)r*r!r!r"r-s'
cCsdt|t�rd|ks$t|t�r2d|kr2t||||�St|t�rBd}nd}t|||||�}|�dd�S)Nr�� r�)r4r5r�rr�)r�r�r)r*Zspacer!r!r"rcs
cs�t|ttf�std��|sdSt|t�r6|�dd�}ntdd�|D��}|�t|�s^|��Syt	|�Wn&t
k
r�t|�jt	|<�YnXd�
�fdd�|D��S)Nz!quote_from_bytes() expected bytesrr$�ignorecSsg|]}|dkr|�qS)�r!)r-r~r!r!r"r��sz$quote_from_bytes.<locals>.<listcomp>csg|]}�|��qSr!r!)r-�char)�quoterr!r"r��s)r4r��	bytearrayr6r5r(�rstrip�_ALWAYS_SAFE_BYTESr,r r�r��__getitem__r�)�bsr�r!)r�r"r
ts
c	Cst|d�r|��}nPyt|�r0t|dt�s0t�Wn0tk
rbt��\}}}td��|��YnXg}	|s�xr|D]j\}
}t|
t	�r�||
|�}
n|t
|
�|||�}
t|t	�r�|||�}n|t
|�|||�}|	�|
d|�qrW�n,�x(|D�]\}
}t|
t	��r||
|�}
n|t
|
�|||�}
t|t	��rJ|||�}|	�|
d|�q�t|t
��rx|||||�}|	�|
d|�q�yt|�}Wn:tk
�r�|t
|�|||�}|	�|
d|�Yq�XxJ|D]B}
t|
t	��r�||
|�}
n|t
|
�|||�}
|	�|
d|
��q�Wq�Wd�|	�S)N�itemsrz1not a valid non-string sequence or mapping objectr�r�)
�hasattrr�rzr4r0r6�sys�exc_info�with_tracebackr�r5r�r�)rsZdoseqr�r)r*Z	quote_viaZtyZva�tb�l�kr�r.Zeltr!r!r"r�sP





cCsJt|t�rFy|�d���}Wn(tk
rDtdt|�d��YnX|S)N�ASCIIzURL z contains non-ASCII characters)r4r5r(r,�UnicodeError�repr)rir!r!r"�to_bytes�s
r�cCs`t|���}|dd�dkr<|dd�dkr<|dd���}|dd�dkr\|dd���}|S)Nr3�<r��>�zURL:)r5r�)rir!r!r"�unwrap�s r�cCsDtdkrt�dtj�at�|�}|r<|��\}}|��|fSd|fS)Nz
([^/:]+):(.*))�	_typeprog�re�compile�DOTALL�match�groupsrJ)rir�rp�datar!r!r"�	splittype�s
r�cCsXtdkrt�dtj�at�|�}|rP|��\}}|rH|ddkrHd|}||fSd|fS)Nz//([^/#?]*)(.*)rrv)�	_hostprogr�r�r�r�r�)rir�Z	host_portr�r!r!r"�	splithost�s
r�cCs |�d�\}}}|r|nd|fS)NrT)rW)�host�userr}r!r!r"�	splitusersr�cCs |�d�\}}}||r|ndfS)NrU)rI)r�r}Zpasswdr!r!r"�splitpasswdsr�cCsDtdkrt�dtj�at�|�}|r<|��\}}|r<||fS|dfS)Nz
(.*):([0-9]*))�	_portprogr�r�r��	fullmatchr�)r�r�rQr!r!r"�	splitports
r�r�cCsT|�d�\}}}|s|}n2|rLyt|�}Wntk
rBd}YnX||fS||fS)NrU)rWrOrP)r�Zdefportr}rQZnportr!r!r"�
splitnport$s
r�cCs$|�d�\}}}|r||fS|dfS)Nr�)rW)rir�r}rsr!r!r"�
splitquery4srcCs$|�d�\}}}|r||fS|dfS)Nrg)rW)rir�r}�tagr!r!r"�splittag;srcCs|�d�}|d|dd�fS)Nrmrr3)r�)riZwordsr!r!r"�	splitattrBs
rcCs |�d�\}}}||r|ndfS)Nr�)rI)�attrr}r�r!r!r"�
splitvalueHsr)rT)r)rT)T)r�r�)FFr�r�Nr�)FFr�r�Nr�)r�r�)rvNN)rNN)rv)r�)]r�r��collections�__all__r�r�rnZnon_hierarchicalZ
uses_queryZ
uses_fragmentr�r�r�r�rr#Z_implicit_encodingZ_implicit_errorsr'r+r2r8�objectr9r@rBrSrarfZ_DefragResultBaseZ_SplitResultBaseZ_ParseResultBase�__doc__rirhrprVr�rsrtZ
ResultBaserrrrrrrlrrorr�r�rrrrrr�r�rr�r�rr	r
r�	frozensetr�r�r�r �defaultdictr�rrr
rr�r�r�r�r�r�r�r�r�r�r�rrrrr!r!r!r"�<module>"s�





!


	

?
E


)
A
	
6

O



Hacked By AnonymousFox1.0, Coded By AnonymousFox