HOME


Mini Shell 1.0
Mosykay Billing App
Logo
Login
DIR: /lib64/python3.6/urllib/__pycache__/
Upload File :
Current File : //lib64/python3.6/urllib/__pycache__/parse.cpython-36.opt-2.pyc
3

dja��@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<ej=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!	

 �	�
�
�cCstj�tj�dS)N)�_parse_cache�clear�
_safe_quoters�r!r!�$/usr/lib64/python3.6/urllib/parse.py�clear_cache^sr#�ascii�strictcCs|S)Nr!)�objr!r!r"�_noopmsr'cCs|j||�S)N)�encode)r&�encoding�errorsr!r!r"�_encode_resultpsr+cst��fdd�|D��S)Nc3s"|]}|r|j���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@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�	separatorZpercentZzoner!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"rP�s

z_NetlocResultMixinBase.portN)	r<r=r>r?�propertyrDrErKrPr!r!r!r"rB�s
rBc@s(eZdZfZedd��Zedd��ZdS)�_NetlocResultMixinStrcCsD|j}|jd�\}}}|r4|jd�\}}}|s<d}nd}}||fS)N�@�:)�netloc�
rpartitionrI)r;rU�userinfo�	have_info�hostinforD�
have_passwordrEr!r!r"rC�sz_NetlocResultMixinStr._userinfocCsl|j}|jd�\}}}|jd�\}}}|rL|jd�\}}}|jd�\}}}n|jd�\}}}|sdd}||fS)NrS�[�]rT)rUrVrI)r;rU�_rY�have_open_br�	bracketedrKrPr!r!r"rH�sz_NetlocResultMixinStr._hostinfoN)r<r=r>r?rQrCrHr!r!r!r"rR�srRc@s(eZdZfZedd��Zedd��ZdS)�_NetlocResultMixinBytescCsD|j}|jd�\}}}|r4|jd�\}}}|s<d}nd}}||fS)N�@�:)rUrVrI)r;rUrWrXrYrDrZrEr!r!r"rC�sz!_NetlocResultMixinBytes._userinfocCsl|j}|jd�\}}}|jd�\}}}|rL|jd�\}}}|jd�\}}}n|jd�\}}}|sdd}||fS)Nra�[�]rb)rUrVrI)r;rUr]rYr^r_rKrPr!r!r"rH�sz!_NetlocResultMixinBytes._hostinfoN)r<r=r>r?rQrCrHr!r!r!r"r`�sr`)�
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"�geturlCszDefragResult.geturlN)r<r=r>r?rir!r!r!r"rAsc@seZdZfZdd�ZdS)rcCst|�S)N)r)r;r!r!r"riKszSplitResult.geturlN)r<r=r>r?rir!r!r!r"rIsc@seZdZfZdd�ZdS)rcCst|�S)N)r)r;r!r!r"riPszParseResult.geturlN)r<r=r>r?rir!r!r!r"rNsc@seZdZfZdd�ZdS)rcCs |jr|jd|jS|jSdS)N�#)rgrh)r;r!r!r"riVszDefragResultBytes.geturlN)r<r=r>r?rir!r!r!r"rTsc@seZdZfZdd�ZdS)rcCst|�S)N)r)r;r!r!r"ri^szSplitResultBytes.geturlN)r<r=r>r?rir!r!r!r"r\sc@seZdZfZdd�ZdS)rcCst|�S)N)r)r;r!r!r"ricszParseResultBytes.geturlN)r<r=r>r?rir!r!r!r"rascCs8ttfttfttff}x|D]\}}||_||_qWdS)N)rrrrrrr:rA)Z
_result_pairsZ_decodedZ_encodedr!r!r"�_fix_result_transcodinggs
rkTc
Csft||�\}}}t|||�}|\}}}}}|tkrHd|krHt|�\}}nd}t||||||�}	||	�S)N�;r)r8r�uses_params�_splitparamsr)
rh�scheme�allow_fragments�_coerce_resultZsplitresultrU�queryrg�params�resultr!r!r"rtscCsRd|kr,|jd|jd��}|dkr6|dfSn
|jd�}|d|�||dd�fS)N�/rlrrr3)�find�rfind)rh�ir!r!r"rn�s

rncCsLt|�}x*dD]"}|j||�}|dkrt||�}qW|||�||d�fS)Nz/?#r)�lenrv�min)rh�start�delim�cZwdelimr!r!r"�_splitnetloc�s
r~cCs�|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>rrSrrTrf�?�NFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)�any�unicodedata�replace�	normalizerO)rUr��nZnetloc2r}r!r!r"�_checknetloc�s
r�cCsxtD]}|j|d�}qW|S)Nr)�_UNSAFE_URL_BYTES_TO_REMOVEr�)rh�br!r!r"�_remove_unsafe_bytes_from_url�s
r�c
Cs�t||�\}}}t|�}t|�}|jt�}|jt�}t|�}|||t|�t|�f}tj|d�}|rj||�St	t�t
kr|t�d}}}|jd�}	|	dk�r�|d|	�dk�r~|d|	�j
�}||	dd�}|dd�dk�rt|d�\}}d|ko�d	|k�sd	|k�rd|k�rtd
��|�r<d|k�r<|jdd�\}}d|k�rV|jdd�\}}t|�t|||||�}
|
t|<||
�Sxd|d|	�D]}|tk�r�P�q�W||	dd�}|�s�td
d�|D���r�|d|	�j
�|}}|dd�dk�r4t|d�\}}d|k�rd	|k�s,d	|k�r4d|k�r4td
��|�rTd|k�rT|jdd�\}}d|k�rn|jdd�\}}t|�t|||||�}
|
t|<||
�S)NrrTrrr3�z//r[r\zInvalid IPv6 URLrfr�css|]}|dkVqdS)�
0123456789Nr!)r-r}r!r!r"r/�szurlsplit.<locals>.<genexpr>)r8r��lstrip�_WHATWG_C0_CONTROL_OR_SPACE�strip�bool�typer�getry�MAX_CACHE_SIZEr#rvrJr~rO�splitr�r�scheme_charsr�)
rhrorprq�key�cachedrUrrrgrx�vr}�restr!r!r"r�sd






cCs<t|�\}}}}}}}|r&d||f}|t|||||f��S)Nz%s;%s)r8r)�
componentsrorUrhrsrrrgrqr!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//r3rurrTr�rf)r8�uses_netloc)r�rorUrhrrrgrqr!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)Nrrur3�..�.���r�r�r�r�)r�r�)r8r�
uses_relativer�rr��filter�pop�
IndexError�append�join)�baserhrprqZbschemeZbnetlocZbpathZbparamsZbqueryZ	bfragmentrorU�pathrsrrrgZ
base_partsZsegmentsZ
resolved_pathZsegr!r!r"r
sT






c	CsTt|�\}}d|kr>t|�\}}}}}}t|||||df�}nd}|}|t||��S)Nrfr)r8rrr)	rhrq�sr��p�a�qZfragZdefragr!r!r"rOs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�bytesrNr()r-r�r�r!r!r"�
<dictcomp>usz$unquote_to_bytes.<locals>.<dictcomp>r�)
r�r4r5r(ryr��
_hextobyter��KeyErrorr�)�string�bits�resr��itemr!r!r"rbs*



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��rangeryrr,r�)r�r)r*r�r�r�rxr!r!r"r�s


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�rO�countr�ryr�r�r)r�r�r�r)r*r�rLrq�
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"rs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�rucCsbt|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Zs
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�xsz$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�)Zbsr�r!)r�r"r
ks
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�ryr4r0r6�sys�exc_info�with_tracebackr�r5r�r�)rrZdoseqr�r)r*Z	quote_viaZtyZva�tb�l�kr�r.Zeltr!r!r"r�sP





cCsJt|t�rFy|jd�j�}Wn(tk
rDtdt|�d��YnX|S)N�ASCIIzURL z contains non-ASCII characters)r4r5r(r,�UnicodeError�repr)rhr!r!r"�to_bytes�s
r�cCs`t|�j�}|dd�dkr<|dd�dkr<|dd�j�}|dd�dkr\|dd�j�}|S)Nr3�<�>�zURL:r�r�)r5r�)rhr!r!r"�unwrap�s r�cCsDtdkrtjdtj�atj|�}|r<|j�\}}|j�|fSd|fS)Nz
([^/:]+):(.*))�	_typeprog�re�compile�DOTALL�match�groupsrJ)rhr�ro�datar!r!r"�	splittype�s
r�cCsXtdkrtjdtj�atj|�}|rP|j�\}}|rH|ddkrHd|}||fSd|fS)Nz//([^/#?]*)(.*)rru)�	_hostprogr�r�r�r�r�)rhr�Z	host_portr�r!r!r"�	splithost�s
r�cCs |jd�\}}}|r|nd|fS)NrS)rV)�host�userr|r!r!r"�	splitusersr�cCs |jd�\}}}||r|ndfS)NrT)rI)r�r|Zpasswdr!r!r"�splitpasswdsr�cCsDtdkrtjdtj�atj|�}|r<|j�\}}|r<||fS|dfS)Nz(.*):([0-9]*)$)�	_portprogr�r�r�r�r�)r�r�rPr!r!r"�	splitports
r�r3cCsT|jd�\}}}|s|}n2|rLyt|�}Wntk
rBd}YnX||fS||fS)NrT)rVrNrO)r�Zdefportr|rPZnportr!r!r"�
splitnports
r�cCs$|jd�\}}}|r||fS|dfS)Nr�)rV)rhr�r|rrr!r!r"�
splitquery+sr�cCs$|jd�\}}}|r||fS|dfS)Nrf)rV)rhr�r|�tagr!r!r"�splittag2srcCs|jd�}|d|dd�fS)Nrlrr3)r�)rhZwordsr!r!r"�	splitattr9s
rcCs |jd�\}}}||r|ndfS)Nr�)rI)�attrr|r�r!r!r"�
splitvalue?sr)rT)r)rT)T)r�r�)FFr�r�Nr�)FFr�r�Nr�)r�r�)ruNN)rNN)rur�)r�)]r�r��collections�__all__r�r�rmZnon_hierarchicalZ
uses_queryZ
uses_fragmentr�r�r�r�rr#Z_implicit_encodingZ_implicit_errorsr'r+r2r8�objectr9r@rBrRr`reZ_DefragResultBaseZ_SplitResultBaseZ_ParseResultBase�__doc__rhrgrorUr�rrrsZ
ResultBaserrrrrrrkrrnr~r�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