ok

Mini Shell

Direktori : /opt/alt/python36/lib64/python3.6/urllib/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/urllib/__pycache__/parse.cpython-36.opt-2.pyc

3

��2ao��@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
d7d8d9gZd:ZiZ
d;d<�Zd=Zd>Zd?d@�ZeefdAdB�ZeefdCdD�ZdEdF�ZGdGdH�dHe�ZGdIdJ�dJe�ZGdKdL�dLe�ZGdMdN�dNee�ZGdOdP�dPee�ZddQlmZeddR�ZeddS�ZeddT�ZdUe_dVej _dWej!_dXe_dYej"_dZej#_d[ej$_d\ej%_d]ej!_d^e_ej"jej"_ej#jej#_ej$jej$_d_ej&_ej%jej%_ej!jej!_eZ'Gd`d�dee�Z(Gdad�dee�Z)Gdbd�dee�Z*Gdcd�dee�Z+Gddd�dee�Z,Gded�dee�Z-dfdg�Z.e.�[.d�did�Z/djdk�Z0d�dldm�Z1dndo�Z2dpdq�Z3d�drd�Z4dsd�Z5dtd�Z6d�dud�Z7dvd�Z8dwZ9da:dxd�Z;ej<dy�Z=d�d|d�Z>d�dd	�Z?d�d�d
�Z@d�d�d�ZAeBd��ZCeDeC�ZEiZFGd�d��d�ejG�ZHd�d�d�ZId�d�d�ZJd�d�d
�ZKd}dddeJfd�d�ZLd�d��ZMd�d��ZNdaOd�d��ZPdaQd�d��ZRd�d��ZSd�d��ZTdaUd�d��ZVd�d�d��ZWd�d��ZXd�d��ZYd�d��ZZd�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+-.�	�
�
�cCstj�tj�dS)N)�_parse_cache�clear�
_safe_quoters�r!r!�*/opt/alt/python36/lib64/python3.6/parse.py�clear_cacheVsr#�ascii�strictcCs|S)Nr!)�objr!r!r"�_noopesr'cCs|j||�S)N)�encode)r&�encoding�errorsr!r!r"�_encode_resulthsr+cst��fdd�|D��S)Nc3s"|]}|r|j���ndVqdS)rN)�decode)�.0�x)r)r*r!r"�	<genexpr>nsz_decode_args.<locals>.<genexpr>)�tuple)�argsr)r*r!)r)r*r"�_decode_argslsr2cGsZt|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_argsps
r8c@seZdZfZddd�ZdS)�_ResultMixinStrr$r%cs|j��fdd�|D��S)Nc3s|]}|j���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@seZdZfZddd�ZdS)�_ResultMixinBytesr$r%cs|j��fdd�|D��S)Nc3s|]}|j���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@eZdZfZedd��Zedd��Zedd��Zedd��Zd	S)
�_NetlocResultMixinBasecCs
|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}|j|�\}}}|j�||S)Nr�%�%)�	_hostinfor4r5�	partition�lower)r;�hostname�	separator�percentZzoner!r!r"rK�s
z_NetlocResultMixinBase.hostnamecCs@|jd}|dk	r<t|d�}d|ko.dkns<td��|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(eZdZfZedd��Zedd��ZdS)�_NetlocResultMixinStrcCsD|j}|jd�\}}}|r4|jd�\}}}|s<d}nd}}||fS)N�@�:)�netloc�
rpartitionrI)r;rV�userinfo�	have_info�hostinforD�
have_passwordrEr!r!r"rC�sz_NetlocResultMixinStr._userinfocCsl|j}|jd�\}}}|jd�\}}}|rL|jd�\}}}|jd�\}}}n|jd�\}}}|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(eZdZfZedd��Zedd��ZdS)�_NetlocResultMixinBytescCsD|j}|jd�\}}}|r4|jd�\}}}|s<d}nd}}||fS)N�@�:)rVrWrI)r;rVrXrYrZrDr[rEr!r!r"rC�sz!_NetlocResultMixinBytes._userinfocCsl|j}|jd�\}}}|jd�\}}}|rL|jd�\}}}|jd�\}}}n|jd�\}}}|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@seZdZfZdd�ZdS)rcCs |jr|jd|jS|jSdS)N�#)�fragment�url)r;r!r!r"�geturl;szDefragResult.geturlN)r<r=r>r?rjr!r!r!r"r9sc@seZdZfZdd�ZdS)rcCst|�S)N)r)r;r!r!r"rjCszSplitResult.geturlN)r<r=r>r?rjr!r!r!r"rAsc@seZdZfZdd�ZdS)rcCst|�S)N)r)r;r!r!r"rjHszParseResult.geturlN)r<r=r>r?rjr!r!r!r"rFsc@seZdZfZdd�ZdS)rcCs |jr|jd|jS|jSdS)N�#)rhri)r;r!r!r"rjNszDefragResultBytes.geturlN)r<r=r>r?rjr!r!r!r"rLsc@seZdZfZdd�ZdS)rcCst|�S)N)r)r;r!r!r"rjVszSplitResultBytes.geturlN)r<r=r>r?rjr!r!r!r"rTsc@seZdZfZdd�ZdS)rcCst|�S)N)r)r;r!r!r"rj[szParseResultBytes.geturlN)r<r=r>r?rjr!r!r!r"rYscCs8ttfttfttff}x|D]\}}||_||_qWdS)N)rrrrrrr:rA)Z
_result_pairsZ_decodedZ_encodedr!r!r"�_fix_result_transcoding_s
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"rlscCsRd|kr,|jd|jd��}|dkr6|dfSn
|jd�}|d|�||dd�fS)N�/rmrrr3)�find�rfind)ri�ir!r!r"ro|s

rocCsLt|�}x*dD]"}|j||�}|dkrt||�}qW|||�||d�fS)Nz/?#r)�lenrw�min)ri�start�delim�cZwdelimr!r!r"�_splitnetloc�s
rcCs�|stdd�|D��rdSddl}|jdd�}|jdd�}|jdd�}|jdd�}|jd	|�}||krndSx(d
D] }||krttd|dd
��qtWdS)Ncss|]}t|�dkVqdS)�N)�ord)r-r~r!r!r"r/�sz_checknetloc.<locals>.<genexpr>rrTrrUrg�?�NFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)�any�unicodedata�replace�	normalizerP)rVr��nZnetloc2r~r!r!r"�_checknetloc�s
r�cCsxtD]}|j|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|�f}tj|d�}|rV||�Stt�tkrht�d}}}|j	d�}	|	dk�r�|d|	�dk�rf|d|	�j
�}||	dd�}|dd�dk�rt|d�\}}d|kr�d	|ks�d	|ko�d|k�rtd
��|�r$d|k�r$|j
dd�\}}d|k�r>|j
dd�\}}t|�t|||||�}
|
t|<||
�Sxd|d|	�D]}|tk�rtP�qtW||	dd�}|�s�td
d�|D���r�|d|	�j
�|}}|dd�dk�rt|d�\}}d|k�rd	|k�sd	|k�rd|k�rtd
��|�r<d|k�r<|j
dd�\}}d|k�rV|j
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��bool�typer�getrz�MAX_CACHE_SIZEr#rwrJrrP�splitr�r�scheme_charsr�)
rirprqrr�key�cachedrVrsrhry�vr~�restr!r!r"r�s`




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|}|r�|
r�|}|}
|s�|}|t|
|||
||f��S|jd�}|ddkr�|d=|dd�dk�r�|jd�}n(||jd�}td|dd��|dd	�<g}xX|D]P}|dk�rdy|j�Wntk
�r`YnXn|dk�rt�q0n
|j	|��q0W|d
dk�r�|j	d�|t|
|dj
|��p�d|
||f��S)Nrrvr3�..�.���r�r�r�r�)r�r�)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"rCsZ0123456789ABCDEFabcdefcCs�|s|jdSt|t�r"|jd�}|jd�}t|�dkr<|S|dg}|j}tdkrbdd�tD�axb|dd�D]R}y(|t|dd��||dd��Wqptk
r�|d�||�YqpXqpWdj	|�S)	N�zutf-8rGr3rcSs4i|],}tD]"}tt||d�g�||j��qqS)�)�_hexdig�bytesrOr()r-r�r�r!r!r"�
<dictcomp>isz$unquote_to_bytes.<locals>.<dictcomp>r�)
r�r4r5r(rzr��
_hextobyter��KeyErrorr�)�string�bits�resr��itemr!r!r"rVs*


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


F�&c	CsRi}t|||||||d�}x2|D]*\}	}
|	|kr@||	j|
�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|�\}}|s"t|ttf�r*td��|dk	rPd|j|�}||krPtd��dd�|j|�D�}	g}
x�|	D]�}|r�|r�qn|jdd�}t|�dkr�|r�td|f��|rn|jd	�nqnt|d�s�|rn|d
j	dd�}
t
|
||d
�}
||
�}
|dj	dd�}t
|||d
�}||�}|
j|
|f�qnW|
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|jdd�}t|||�S)Nr�r�)r�r)r�r)r*r!r!r"r�ssAABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-c@s$eZdZdd�Zdd�Zdd�ZdS)�QuotercCstj|�|_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|�ndj|�}|||<|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}|j||�}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|||||�}|jdd�S)Nr�� r�)r4r5r�rr�)r�r�r)r*Zspacer!r!r"rNs
cs�t|ttf�std��|sdSt|t�r6|jdd�}ntdd�|D��}|jt|�s^|j�Syt	|�Wn&t
k
r�t|�jt	|<�YnXdj
�fdd�|D��S)Nz!quote_from_bytes() expected bytesrr$�ignorecSsg|]}|dkr|�qS)�r!)r-r~r!r!r"r�lsz$quote_from_bytes.<locals>.<listcomp>csg|]}�|��qSr!r!)r-�char)�quoterr!r"r�ss)r4r��	bytearrayr6r5r(�rstrip�_ALWAYS_SAFE_BYTESr,r r�r��__getitem__r�)�bsr�r!)r�r"r
_s
cCst|d�r|j�}nRy t|�r2t|dt�r2t�Wn0tk
rdtj�\}}}td�j|��YnXg}	|s�xr|D]j\}
}t|
t	�r�||
|�}
n|t
|
�|||�}
t|t	�r�|||�}n|t
|�|||�}|	j|
d|�qtW�n,�x(|D�]\}
}t|
t	��r||
|�}
n|t
|
�|||�}
t|t	��rL|||�}|	j|
d|�q�t|t
��rz|||||�}|	j|
d|�q�yt|�}Wn:tk
�r�|t
|�|||�}|	j|
d|�Yq�XxJ|D]B}
t|
t	��r�||
|�}
n|t
|
�|||�}
|	j|
d|
��q�Wq�Wdj|	�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"rusP





cCsJt|t�rFy|jd�j�}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|�j�}|dd�dkr<|dd�dkr<|dd�j�}|dd�dkr\|dd�j�}|S)Nr3�<�>�zURL:r�r�)r5�strip)rir!r!r"�unwrap�s r�cCsDtdkrtjdtj�atj|�}|r<|j�\}}|j�|fSd|fS)Nz
([^/:]+):(.*))�	_typeprog�re�compile�DOTALL�match�groupsrJ)rir�rp�datar!r!r"�	splittype�s
r�cCsXtdkrtjdtj�atj|�}|rP|j�\}}|rH|ddkrHd|}||fSd|fS)Nz//([^/#?]*)(.*)rrv)�	_hostprogr�r�r�r�r�)rir�Z	host_portr�r!r!r"�	splithost�s
r�cCs |jd�\}}}|r|nd|fS)NrT)rW)�host�userr}r!r!r"�	splituser�sr�cCs |jd�\}}}||r|ndfS)NrU)rI)r�r}Zpasswdr!r!r"�splitpasswd�sr�cCsDtdkrtjdtj�atj|�}|r<|j�\}}|r<||fS|dfS)Nz(.*):([0-9]*)$)�	_portprogr�r�r�r�r�)r�r�rQr!r!r"�	splitports
r�r3cCsT|jd�\}}}|s|}n2|rLyt|�}Wntk
rBd}YnX||fS||fS)NrU)rWrOrP)r�Zdefportr}rQZnportr!r!r"�
splitnports
r�cCs$|jd�\}}}|r||fS|dfS)Nr�)rW)rir�r}rsr!r!r"�
splitquerysr�cCs$|jd�\}}}|r||fS|dfS)Nrg)rW)rir�r}�tagr!r!r"�splittag&srcCs|jd�}|d|dd�fS)Nrmrr3)r�)riZwordsr!r!r"�	splitattr-s
rcCs |jd�\}}}||r|ndfS)Nr�)rI)�attrr}r�r!r!r"�
splitvalue3sr)rT)r)rT)T)r�r�)FFr�r�Nr�)FFr�r�Nr�)r�r�)rvNN)rNN)rvr�)r�)\r�r��collections�__all__r�r�rnZnon_hierarchicalZ
uses_queryZ
uses_fragmentr�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�r�rrrr!r!r!r"�<module>s�





!


	

<
E


)
A
	
,

O



Zerion Mini Shell 1.0