ok

Mini Shell

Direktori : /opt/alt/python35/lib64/python3.5/urllib/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/urllib/__pycache__/parse.cpython-35.opt-2.pyc



���]!��@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
d7ZiZd8d9�Z
d:Zd;Zd<d=�Zeed>d?�Zeed@dA�ZdBdC�ZGdDdE�dEe�ZGdFdG�dGe�ZGdHdI�dIe�ZGdJdK�dKee�ZGdLdM�dMee�ZddNlmZeddO�ZeddP�ZeddQ�ZeZGdRd�dee�ZGdSd�dee�Z GdTd�dee�Z!GdUd�dee�Z"GdVd�dee�Z#GdWd�dee�Z$dXdY�Z%e%�[%ddZd[d�Z&d\d]�Z'dd^d_�Z(d`da�Z)ddZdbd�Z*dcd�Z+ddd�Z,dZded�Z-dfd�Z.dgZ/da0dhd�Z1ej2di�Z3djdkdld�Z4dmdmdjdkdnd	�Z5dmdmdjdkdod
�Z6djdkdpd�Z7e8dq�Z9e:e9�Z;iZ<Gdrds�dsej=�Z>dtdddud�Z?ddddvd�Z@dtdwd
�ZAdmddde@dxd�ZBdydz�ZCd{d|�ZDdaEd}d~�ZFdaGdd��ZHd�d��ZId�d��ZJdaKd�d��ZLd�d�d��ZMd�d��ZNd�d��ZOd�d��ZPd�d��ZQdS)��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�httpZgopherZnntp�imapZwais�fileZhttpsZshttpZmmsZprosperoZrtspZrtspuZsftpZsvnzsvn+sshZwsZwssZtelnetZsnewsZrsyncZnfsZgitzgit+sshZhdlZsipZsipsZtelZmailtoZnewszAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.�cCstj�tj�dS)N)�_parse_cache�clear�
_safe_quoters�rr�*/opt/alt/python35/lib64/python3.5/parse.py�clear_cacheSs
r!�ascii�strictcCs|S)Nr)�objrrr �_noopbsr%cCs|j||�S)N)�encode)r$�encoding�errorsrrr �_encode_resultesr)cs t��fdd�|D��S)Nc3s-|]#}|r!|j���ndVqdS)rN)�decode)�.0�x)r'r(rr �	<genexpr>ksz_decode_args.<locals>.<genexpr>)�tuple)�argsr'r(r)r'r(r �_decode_argsisr0cGswt|dt�}x?|dd�D]-}|r$t|t�|kr$td��q$W|rf|tfSt|�tfS)Nr�z$Cannot mix str and non-str arguments)�
isinstance�str�	TypeErrorr%r0r))r/Z	str_input�argrrr �_coerce_argsmsr6c@s(eZdZfZdddd�ZdS)�_ResultMixinStrr"r#cs#|j��fdd�|D��S)Nc3s!|]}|j���VqdS)N)r&)r+r,)r'r(rr r-�sz)_ResultMixinStr.encode.<locals>.<genexpr>)�_encoded_counterpart)�selfr'r(r)r'r(r r&�sz_ResultMixinStr.encodeN)�__name__�
__module__�__qualname__�	__slots__r&rrrr r7~sr7c@s(eZdZfZdddd�ZdS)�_ResultMixinBytesr"r#cs#|j��fdd�|D��S)Nc3s!|]}|j���VqdS)N)r*)r+r,)r'r(rr r-�sz+_ResultMixinBytes.decode.<locals>.<genexpr>)�_decoded_counterpart)r9r'r(r)r'r(r r*�sz_ResultMixinBytes.decodeN)r:r;r<r=r*rrrr r>�sr>c@s^eZdZfZedd��Zedd��Zedd��Zedd��Zd	S)
�_NetlocResultMixinBasecCs|jdS)Nr)�	_userinfo)r9rrr �username�sz_NetlocResultMixinBase.usernamecCs|jdS)Nr1)rA)r9rrr �password�sz_NetlocResultMixinBase.passwordcCs8|jd}|sd}n|dk	r4|j�}|S)Nr)�	_hostinfo�lower)r9�hostnamerrr rF�s
	z_NetlocResultMixinBase.hostnamecCsL|jd}|dk	rHt|d�}d|ko?dknsHdS|S)Nr1�
ri��)rD�int)r9�portrrr rI�s
z_NetlocResultMixinBase.portN)	r:r;r<r=�propertyrBrCrFrIrrrr r@�s
	r@c@s:eZdZfZedd��Zedd��ZdS)�_NetlocResultMixinStrcCsb|j}|jd�\}}}|rN|jd�\}}}|sXd}n
d}}||fS)N�@�:)�netloc�
rpartition�	partition)r9rN�userinfo�	have_info�hostinforB�
have_passwordrCrrr rA�s		
z_NetlocResultMixinStr._userinfocCs�|j}|jd�\}}}|jd�\}}}|rr|jd�\}}}|jd�\}}}n|jd�\}}}|s�d}||fS)NrL�[�]rM)rNrOrP)r9rN�_rS�have_open_br�	bracketedrFrIrrr rD�s	z_NetlocResultMixinStr._hostinfoN)r:r;r<r=rJrArDrrrr rK�srKc@s:eZdZfZedd��Zedd��ZdS)�_NetlocResultMixinBytescCsb|j}|jd�\}}}|rN|jd�\}}}|sXd}n
d}}||fS)N�@�:)rNrOrP)r9rNrQrRrSrBrTrCrrr rA�s		
z!_NetlocResultMixinBytes._userinfocCs�|j}|jd�\}}}|jd�\}}}|rr|jd�\}}}|jd�\}}}n|jd�\}}}|s�d}||fS)Nr[�[�]r\)rNrOrP)r9rNrWrSrXrYrFrIrrr rD�s	z!_NetlocResultMixinBytes._hostinfoN)r:r;r<r=rJrArDrrrr rZ�srZ)�
namedtuplezurl fragmentz!scheme netloc path query fragmentz(scheme netloc path params query fragmentc@s"eZdZfZdd�ZdS)rcCs&|jr|jd|jS|jSdS)N�#)�fragment�url)r9rrr �geturl�s	zDefragResult.geturlN)r:r;r<r=rcrrrr r�sc@s"eZdZfZdd�ZdS)rcCs
t|�S)N)r)r9rrr rcszSplitResult.geturlN)r:r;r<r=rcrrrr r�sc@s"eZdZfZdd�ZdS)rcCs
t|�S)N)r)r9rrr rcszParseResult.geturlN)r:r;r<r=rcrrrr rsc@s"eZdZfZdd�ZdS)rcCs&|jr|jd|jS|jSdS)N�#)rarb)r9rrr rcs	zDefragResultBytes.geturlN)r:r;r<r=rcrrrr r	sc@s"eZdZfZdd�ZdS)rcCs
t|�S)N)r)r9rrr rcszSplitResultBytes.geturlN)r:r;r<r=rcrrrr rsc@s"eZdZfZdd�ZdS)rcCs
t|�S)N)r)r9rrr rcszParseResultBytes.geturlN)r:r;r<r=rcrrrr rscCsNttfttfttff}x&|D]\}}||_||_q(WdS)N)rrrrrrr8r?)Z
_result_pairsZ_decodedZ_encodedrrr �_fix_result_transcodings			reTc
Cs�t||�\}}}t|||�}|\}}}}}|tkrld|krlt|�\}}nd}t||||||�}	||	�S)N�;r)r6r�uses_params�_splitparamsr)
rb�scheme�allow_fragments�_coerce_resultZsplitresultrN�queryra�params�resultrrr r)scCsqd|kr@|jd|jd��}|dkrO|dfSn|jd�}|d|�||dd�fS)N�/rfrrr1)�find�rfind)rb�irrr rh9s
rhcCsht|�}x;dD]3}|j||�}|dkrt||�}qW|||�||d�fS)Nz/?#r)�lenrp�min)rb�start�delim�cZwdelimrrr �_splitnetlocBs
rxcCs�|s!tdd�|D��r%dSddl}|jdd�}|jdd�}|jdd�}|jdd�}|jd	|�}||kr�dSx2d
D]*}||kr�td|dd
��q�WdS)Ncss!|]}t|�dkVqdS)�N)�ord)r+rwrrr r-Ksz_checknetloc.<locals>.<genexpr>rrLrrMr`�?ZNFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)�any�unicodedata�replace�	normalize�
ValueError)rNr}�nZnetloc2rwrrr �_checknetlocJs!
r�c
Cs8t||�\}}}t|�}|||t|�t|�f}tj|d�}|rg||�Stt�tkr�t�d}}}|jd�}	|	dkrM|d|	�dkr�|d|	�j	�}||	dd�}|dd�dkrPt
|d�\}}d|kr,d	|ksDd	|krPd|krPtd
��|rzd|krz|jdd�\}}d|kr�|jdd�\}}t
|�t|||||�}
|
t|<||
�Sxv|d|	�D]}|tkr�Pq�W||	dd�}|s0td
d�|D��rM|d|	�j	�|}}|dd�dkr�t
|d�\}}d|kr�d	|ks�d	|kr�d|kr�td
��|r�d|kr�|jdd�\}}d|kr|jdd�\}}t
|�t|||||�}
|
t|<||
�S)NrrMrrr1�z//rUrVzInvalid IPv6 URLr`r{css|]}|dkVqdS)�
0123456789Nr)r+rwrrr r-�szurlsplit.<locals>.<genexpr>)r6�bool�typer�getrs�MAX_CACHE_SIZEr!rprErxr��splitr�r�scheme_charsr|)
rbrirjrk�key�cachedrNrlrarr�vrw�restrrr r\s\!



 

cCsVt|�\}}}}}}}|r7d||f}|t|||||f��S)Nz%s;%s)r6r)�
componentsrirNrbrmrlrarkrrr r�s!cCs�t|�\}}}}}}|sL|r�|tkr�|dd�dkr�|rr|dd�dkrrd|}d|p~d|}|r�|d|}|r�|d|}|r�|d|}||�S)	Nr�z//r1rorrMr{r`)r6�uses_netloc)r�rirNrbrlrarkrrr r�s.
cCsR|s
|S|s|St||�\}}}t|d|�\}}}}}}	t|||�\}
}}}
}}|
|ks�|
tkr�||�S|
tkr�|r�|t|
|||
||f��S|}|r|
r|}|}
|s�|}|t|
|||
||f��S|jd�}|ddkr>|d=|dd�dkrf|jd�}n6||jd�}td|dd��|dd	�<g}x_|D]W}|dkr�y|j�Wqtk
r�YqXq�|dkr�q�q�|j	|�q�W|d
dkr!|j	d�|t|
|dj
|�p?d|
||f��S)Nrror1�..�.���r�r�r�r�)r�r�)r6r�
uses_relativer�rr��filter�pop�
IndexError�append�join)�baserbrjrkZbschemeZbnetlocZbpathZbparamsZbqueryZ	bfragmentrirN�pathrmrlraZ
base_partsZsegmentsZ
resolved_pathZsegrrr r�sT$$
#


c	Cs|t|�\}}d|kr]t|�\}}}}}}t|||||df�}nd}|}|t||��S)Nr`r)r6rrr)	rbrk�sr��p�a�qZfragZdefragrrr r�s!Z0123456789ABCDEFabcdefcCs
|s|jdSt|t�r/|jd�}|jd�}t|�dkrT|S|dg}|j}tdkr�dd�tD�axq|dd�D]_}y0|t|dd��||dd��Wq�tk
r�|d�||�Yq�Xq�Wdj	|�S)	N�zutf-8�%r1rcSsFi|]<}tD]/}tt||d�g�||j��qqS)�)�_hexdig�bytesrHr&)r+r��brrr �
<dictcomp>s	z$unquote_to_bytes.<locals>.<dictcomp>r�)
r�r2r3r&rsr��
_hextobyter��KeyErrorr�)�string�bits�resr��itemrrr rs*
		


z([-]+)zutf-8r~cCs�d|kr|j|S|dkr)d}|dkr;d}tj|�}|dg}|j}xRtdt|�d�D]8}|t||�j||��|||d�qyWdj|�S)N�%zutf-8r~rr1r�r)r��_asciirer��rangersrr*r�)r�r'r(r�r�r�rrrrr r,s

	 Fc	Csli}t|||d|d|�}xA|D]9\}}||krW||j|�q+|g||<q+W|S)Nr'r()r
r�)	�qs�keep_blank_values�strict_parsingr'r(Z
parsed_result�pairs�name�valuerrr r	FscCsMt|�\}}dd�|jd�D�}g}x|D]
}|rR|rRq;|jdd�}	t|	�dkr�|r�td|f��|r;|	jd�nq;t|	d�s�|r;|	d	jd
d�}
t|
d|d
|�}
||
�}
|	djd
d�}t|d|d
|�}||�}|j|
|f�q;W|S)NcSs,g|]"}|jd�D]}|�qqS)rf)r�)r+�s1�s2rrr �
<listcomp>�s	zparse_qsl.<locals>.<listcomp>�&�=r1r�zbad query field: %rrr�+� r'r()r6r�rsr�r�r~r)r�r�r�r'r(rkr��rZ
name_valueZnvr�r�rrr r
is,
cCs"|jdd�}t|||�S)Nr�r�)r~r)r�r'r(rrr r�ssAABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-c@s4eZdZdd�Zdd�Zdd�ZdS)�QuotercCstj|�|_dS)N)�_ALWAYS_SAFE�union�safe)r9r�rrr �__init__�szQuoter.__init__cCsd|jjt|�fS)Nz<%s %r>)�	__class__r:�dict)r9rrr �__repr__�szQuoter.__repr__cCs8||jkrt|�ndj|�}|||<|S)Nz%{:02X})r��chr�format)r9r�r�rrr �__missing__�s*
zQuoter.__missing__N)r:r;r<r�r�r�rrrr r��sr�rocCs�t|t�rR|s|S|dkr+d}|dkr=d}|j||�}n0|dk	rjtd��|dk	r�td��t||�S)Nzutf-8r#z,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)r2r3r&r4r
)r�r�r'r(rrr r�scCs�t|t�rd|ks6t|t�rId|krIt||||�St|t�rad}nd}t|||||�}|jdd�S)Nr�� r�)r2r3r�rr~)r�r�r'r(Zspacerrr r�s	cs�t|ttf�s!td��|s+dSt|t�rO|jdd�}ntdd�|D��}|jt|�s�|j�Syt	|�Wn)t
k
r�t|�jt	|<�YnXdj
�fdd�|D��S)Nz!quote_from_bytes() expected bytesrr"�ignorecSs"g|]}|dkr|�qS)�r)r+rwrrr r�	s	z$quote_from_bytes.<locals>.<listcomp>csg|]}�|��qSrr)r+�char)�quoterrr r�s	)r2r��	bytearrayr4r3r&�rstrip�_ALWAYS_SAFE_BYTESr*rr�r��__getitem__r�)�bsr�r)r�r r
�s

cCs�t|d�r|j�}niy*t|�rGt|dt�rGt�Wn<tk
r�tj�\}}}td�j|��YnXg}	|s:x |D]�\}
}t|
t	�r�||
|�}
n|t
|
�|||�}
t|t	�r|||�}n|t
|�|||�}|	j|
d|�q�Wn|xy|D]q\}
}t|
t	�rn||
|�}
n|t
|
�|||�}
t|t	�r�|||�}|	j|
d|�qAt|t
�r�|||||�}|	j|
d|�qAyt|�}WnBtk
rO|t
|�|||�}|	j|
d|�YqAXx_|D]W}
t|
t	�r~||
|�}
n|t
|
�|||�}
|	j|
d|
�qWWqAWdj|	�S)N�itemsrz1not a valid non-string sequence or mapping objectr�r�)
�hasattrr�rsr2r.r4�sys�exc_info�with_tracebackr�r3r�r�)rlZdoseqr�r'r(Z	quote_viaZtyZva�tb�l�kr�r,Zeltrrr rsP 



cCs[t|t�rWy|jd�j�}Wn,tk
rVtdt|�d��YnX|S)N�ASCIIzURL z contains non-ASCII characters)r2r3r&r*�UnicodeError�repr)rbrrr �to_bytesbs
r�cCs�t|�j�}|dd�dkrT|dd�dkrT|dd�j�}|dd�dkr�|dd�j�}|S)Nr1�<�>�zURL:r�r�)r3�strip)rbrrr �unwrapos,r�cCsbtdkr!tjdtj�atj|�}|rX|j�\}}|j�|fSd|fS)Nz
([^/:]+):(.*))�	_typeprog�re�compile�DOTALL�match�groupsrE)rbr�ri�datarrr �	splittypexsr�cCs|tdkr!tjdtj�atj|�}|rr|j�\}}|rh|ddkrhd|}||fSd|fS)Nz//([^/#?]*)(.*)rro)�	_hostprogr�r�r�r�r�)rbr�Z	host_portr�rrr �	splithost�s

r�cCs.|jd�\}}}|r$|nd|fS)NrL)rO)�host�userrvrrr �	splituser�sr�cCs.|jd�\}}}||r'|ndfS)NrM)rP)r�rvZpasswdrrr �splitpasswd�sr�cCsbtdkr!tjdtj�atj|�}|rX|j�\}}|rX||fS|dfS)Nz(.*):([0-9]*)$)�	_portprogr�r�r�r�r�)r�r�rIrrr �	splitport�s
r�r1cCsl|jd�\}}}|s'|}n;|rbyt|�}Wntk
rWd}YnX||fS||fS)NrM)rOrHr�)r�ZdefportrvrIZnportrrr �
splitnport�s	

r�cCs2|jd�\}}}|r(||fS|dfS)Nr{)rO)rbr�rvrlrrr �
splitquery�s
r�cCs2|jd�\}}}|r(||fS|dfS)Nr`)rO)rbr�rv�tagrrr �splittag�s
r�cCs'|jd�}|d|dd�fS)Nrfrr1)r�)rbZwordsrrr �	splitattr�sr�cCs.|jd�\}}}||r'|ndfS)Nr�)rP)�attrrvr�rrr �
splitvalue�sr�r�)Rr�r��collections�__all__r�r�rgZnon_hierarchicalZ
uses_queryZ
uses_fragmentr�r�rr!Z_implicit_encodingZ_implicit_errorsr%r)r0r6�objectr7r>r@rKrZr_Z_DefragResultBaseZ_SplitResultBaseZ_ParseResultBaseZ
ResultBaserrrrrrrerrhrxr�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�r�r�r�rrrr �<module>s�		 
	:E"/	,O



Zerion Mini Shell 1.0