Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/requests/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/requests/__pycache__/models.cpython-311.pyc

�

�܋f����R�dZddlZddlZddlmZddlmZmZm	Z	m
Z
mZddlm
Z
ddlmZddlmZdd	lmZmZdd
lmZddlmZmZmZmZmZmZmZddlmZ dd
lm!Z!m"Z"m#Z#ddl$m%Z%m&Z&m'Z'ddl(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.ddl(mZ/ddl(m0Z0ddl(mZ1ddl(m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZCe6jDe6jEe6jFe6jGe6jHfZIdZJdZKdZLGd�d��ZMGd�d��ZNGd�d eN��ZOGd!�d"eMeN��ZPGd#�d$��ZQdS)%z`
requests.models
~~~~~~~~~~~~~~~

This module contains the primary objects that power Requests.
�N)�UnsupportedOperation)�DecodeError�LocationParseError�
ProtocolError�ReadTimeoutError�SSLError)�RequestField)�encode_multipart_formdata)�	parse_url�)�to_native_string�unicode_is_ascii)�
HTTPBasicAuth)�Callable�JSONDecodeError�Mapping�
basestring�builtin_str�chardet�	cookielib)�json)�	urlencode�urlsplit�
urlunparse)�_copy_cookie_jar�cookiejar_from_dict�get_cookie_header)�ChunkedEncodingError�ConnectionError�ContentDecodingError�	HTTPError�InvalidJSONError�
InvalidURL)r)�
MissingSchema)r)�StreamConsumedError)�
default_hooks)�codes)�CaseInsensitiveDict)
�check_header_validity�get_auth_from_url�guess_filename�guess_json_utf�iter_slices�parse_header_links�requote_uri�stream_decode_response_unicode�	super_len�to_key_val_list�i(ic�P�eZdZed���Zed���Zed���ZdS)�RequestEncodingMixinc��g}t|j��}|j}|sd}|�|��|j}|r*|�d��|�|��d�|��S)zBuild the path URL to use.�/�?�)r�url�path�append�query�join)�selfr:�pr;r=s     �F/opt/cloudlinux/venv/lib64/python3.11/site-packages/requests/models.py�path_urlzRequestEncodingMixin.path_urlUs~�����T�X�����v���	��D��
�
�4��������	��J�J�s�O�O�O��J�J�u�����w�w�s�|�|��c	�
�t|ttf��r|St|d��r|St|d��r�g}t	|��D]�\}}t|t
��st|d��s|g}|D]o}|�k|�t|t��r|�d��n|t|t��r|�d��n|f���p��t|d���S|S)z�Encode parameters in a piece of data.

        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        �read�__iter__N�utf-8T)�doseq)	�
isinstance�str�bytes�hasattrr2rr<�encoder)�data�result�k�vs�vs     rA�_encode_paramsz#RequestEncodingMixin._encode_paramsjs'���d�S�%�L�)�)�	��K�
�T�6�
"�
"�	��K�
�T�:�
&�
&�	��F�(��.�.�

�

���2��b�*�-�-��W�R��5L�5L����B����A��}��
�
�5?��3�5G�5G� N����� 1� 1� 1�Q�5?��3�5G�5G� N����� 1� 1� 1�Q��������V�4�0�0�0�0��KrCc	�v�|std���t|t��rtd���g}t|pi��}t|pi��}|D]�\}}t|t��st	|d��s|g}|D]�}|��t|t
��st
|��}|�t|t
��r|�d��n|t|t��r|�	d��n|f������|D�]\}}d}d}	t|ttf��r;t|��dkr|\}
}n5t|��dkr|\}
}}n|\}
}}}	nt|��p|}
|}t|tt
tf��r|}n*t	|d��r|���}n|���|}t!|||
|	�	��}
|
�|�
��|�|
����t%|��\}}||fS)a�Build the body for a multipart/form-data request.

        Will successfully encode files when passed as a dict or a list of
        tuples. Order is retained if data is a list of tuples but arbitrary
        if parameters are supplied as a dict.
        The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype)
        or 4-tuples (filename, fileobj, contentype, custom_headers).
        zFiles must be provided.zData must not be a string.rFNrG��rE)�namerN�filename�headers)�content_type)�
ValueErrorrIrr2rLrKrJr<�decoderM�tuple�list�lenr+�	bytearrayrEr	�make_multipartr
)�filesrN�
new_fields�fields�field�valrRrP�ft�fh�fn�fp�fdata�rf�bodyrZs                rA�
_encode_filesz"RequestEncodingMixin._encode_files�s���	;��6�7�7�7�
��j�
)�
)�	;��9�:�:�:��
� ����,�,������,�,�� �	�	�J�E�3��#�z�*�*�
�'�#�z�2J�2J�
��e���

�

���=�%�a��/�/�#���F�F���%�%� *�%��7�7�'�E�L�L��1�1�1�!&�1;�A�s�1C�1C�J�A�H�H�W�-�-�-��	�����


��	"�	"�F�Q���B��B��!�e�T�]�+�+�	
��q�6�6�Q�;�;��F�B�����V�V�q�[�[�!"�J�B��B�B�%&�N�B��B���#�A�&�&�+�!�����"�s�E�9�5�6�6�
������V�$�$�
����	�	���������1�5�2�r�J�J�J�B����2��.�.�.����b�!�!�!�!�6�z�B�B���l��\�!�!rCN)�__name__�
__module__�__qualname__�propertyrB�staticmethodrSrn�rCrAr5r5Tsh������
����X��(����\��:�B"�B"��\�B"�B"�B"rCr5c��eZdZd�Zd�ZdS)�RequestHooksMixinc�$�||jvrtd|�d����t|t��r"|j|�|��dSt|d��r,|j|�d�|D����dSdS)zProperly register a hook.z.Unsupported event specified, with event name "�"rFc3�DK�|]}t|t���|V��dS�N)rIr)�.0�hs  rA�	<genexpr>z2RequestHooksMixin.register_hook.<locals>.<genexpr>�s1����$P�$P�1�
�1�h�8O�8O�$P�Q�$P�$P�$P�$P�$P�$PrCN)�hooksr[rIrr<rL�extend�r?�event�hooks   rA�
register_hookzRequestHooksMixin.register_hook�s�����
�"�"��V�e�V�V�V�W�W�W��d�H�%�%�	Q��J�u��$�$�T�*�*�*�*�*�
�T�:�
&�
&�	Q��J�u��$�$�$P�$P��$P�$P�$P�P�P�P�P�P�	Q�	QrCc�j�	|j|�|��dS#t$rYdSwxYw)ziDeregister a previously registered hook.
        Returns True if the hook existed, False if not.
        TF)r~�remover[r�s   rA�deregister_hookz!RequestHooksMixin.deregister_hook�sI��
	��J�u��$�$�T�*�*�*��4���	�	�	��5�5�	���s� $�
2�2N)rorprqr�r�rtrCrArvrv�s5������	Q�	Q�	Q�	�	�	�	�	rCrvc�:�eZdZdZ										dd�Zd�Zd�ZdS)�Requesta{A user-created :class:`Request <Request>` object.

    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach to the request. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param json: json for the body to attach to the request (if files or data is not specified).
    :param params: URL parameters to append to the URL. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>
    Nc�b�|�gn|}|�gn|}|�in|}|�in|}|	�in|	}	t��|_t|	�����D]\}}|�||����||_||_||_||_||_	|
|_
||_||_||_
dS)N)r�r�)r&r~r^�itemsr��methodr:rYrbrNr�params�auth�cookies)
r?r�r:rYrbrNr�r�r�r~rrPrRs
             rA�__init__zRequest.__init__s����\�r�r�t���m�������"�"�W���~���6���m�����"�_�_��
��5�;�;�=�=�)�)�	0�	0�F�Q�����Q�Q��/�/�/�/������������
���	���	������	�����rCc��d|j�d�S)Nz
<Request [�]>�r��r?s rA�__repr__zRequest.__repr__%s��+�D�K�+�+�+�+rCc���t��}|�|j|j|j|j|j|j|j|j	|j
|j��
�
|S)zXConstructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it.)
r�r:rYrbrNrr�r�r�r~)�PreparedRequest�preparer�r:rYrbrNrr�r�r�r~�r?r@s  rAr�zRequest.prepare(sa������	�	�	��;����L��*������;����L��*�	�	
�	
�	
��rC�
NNNNNNNNNN)rorprq�__doc__r�r�r�rtrCrAr�r��sq��������:����
��
���
�!�!�!�!�F,�,�,�����rCr�c��eZdZdZd�Z										dd�Zd�Zd�Zd�Ze	d���Z
d	�Zd
�Zdd�Z
d�Zdd�Zd�Zd�ZdS)r�a)The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.

    Instances are generated from a :class:`Request <Request>` object, and
    should not be instantiated manually; doing so may produce undesirable
    effects.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> r = req.prepare()
      >>> r
      <PreparedRequest [GET]>

      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>
    c��d|_d|_d|_d|_d|_t��|_d|_dSrz)r�r:rY�_cookiesrmr&r~�_body_positionr�s rAr�zPreparedRequest.__init__Os@�������������
���	�"�_�_��
�"����rCNc�4�|�|��|�||��|�|��|�|��|�|||
��|�||��|�|	��dS)z6Prepares the entire request with the given parameters.N)�prepare_method�prepare_url�prepare_headers�prepare_cookies�prepare_body�prepare_auth�
prepare_hooks)r?r�r:rYrbrNr�r�r�r~rs           rAr�zPreparedRequest.prepare`s���	
���F�#�#�#�����f�%�%�%����W�%�%�%����W�%�%�%����$��t�,�,�,����$��$�$�$�	
���5�!�!�!�!�!rCc��d|j�d�S)Nz<PreparedRequest [r�r�r�s rAr�zPreparedRequest.__repr__|s��3�D�K�3�3�3�3rCc��t��}|j|_|j|_|j�|j���nd|_t|j��|_|j|_|j|_|j	|_	|Srz)
r�r�r:rY�copyrr�rmr~r�r�s  rAr�zPreparedRequest.copyss�������;�������+/�<�+C�D�L�%�%�'�'�'���	�%�d�m�4�4��
������*����.����rCc�|�||_|j�-t|j�����|_dSdS)zPrepares the given HTTP method.N)r�r
�upper)r?r�s  rAr�zPreparedRequest.prepare_method�s:������;�"�*�4�;�+<�+<�+>�+>�?�?�D�K�K�K�#�"rCc��ddl}	|�|d����d��}n#|j$rt�wxYw|S)NrT)�uts46rG)�idnarMr\�	IDNAError�UnicodeError)�hostr�s  rA�_get_idna_encoded_hostz&PreparedRequest._get_idna_encoded_host�s]������	��;�;�t�4�;�0�0�7�7��@�@�D�D���~�	�	�	���	�����s	�*1�Ac
���t|t��r|�d��}nt|��}|���}d|vr0|����d��s	||_dS	t|��\}}}}}}}	n #t$r}
t|
j��d}
~
wwxYw|std|�d|�d����|std|�d����t|��s4	|�|��}nA#t$rtd	���wxYw|�d
��rtd	���|pd}|r|dz
}||z
}|r|d|��z
}|sd
}t|ttf��rt!|��}|�|��}|r|r|�d|��}n|}t%t'|||d||	g����}||_dS)zPrepares the given HTTP URL.�utf8�:�httpNzInvalid URL z0: No scheme supplied. Perhaps you meant https://r8z: No host suppliedzURL has an invalid label.)�*�.r9�@r7�&)rIrKr\rJ�lstrip�lower�
startswithr:rrr#�argsr$rr�r�r
rSr/r)
r?r:r��schemer�r��portr;r=�fragment�e�netloc�
enc_paramss
             rAr�zPreparedRequest.prepare_url�sw���c�5�!�!�	��*�*�V�$�$�C�C��c�(�(�C��j�j�l�l��
�#�:�:�c�i�i�k�k�4�4�V�<�<�:��D�H��F�	&�>G��n�n�;�F�D�$��d�E�8�8��!�	&�	&�	&��a�f�%�%�����	&�����	��4�s�4�4�-0�4�4�4���
�
�	G��E�C�E�E�E�F�F�F� ��%�%�	:�
>��2�2�4�8�8�����
>�
>�
>� �!<�=�=�=�
>����
�_�_�Z�
(�
(�	:��8�9�9�9������	��c�M�F��$����	!��j�$�j�j� �F��	��D��f�s�E�l�+�+�	.�%�f�-�-�F��(�(��0�0�
��	#��
#� �/�/�:�/�/���"���*�f�f�d�D�%��%R�S�S�T�T������s$�B�
B9�&B4�4B9�9D�D)c��t��|_|rB|���D]/}t|��|\}}||jt	|��<�.dSdS)z Prepares the given HTTP headers.N)r(rYr�r)r
)r?rY�headerrW�values     rAr�zPreparedRequest.prepare_headers�ss��+�,�,����	=�!�-�-�/�/�
=�
=��%�f�-�-�-�$���e�7<���-�d�3�3�4�4�	=�	=�
=�
=rCc
��d}d}|si|�gd}	tj|d���}n##t$r}t||����d}~wwxYwt	|t
��s|�d��}tt|d��t	|ttttf��g��}|r�	t|��}n#ttt f$rd}YnwxYw|}t#|dd���>	|���|_n##t($rt+��|_YnwxYw|rt-d	���|rt/|��|jd
<n�d|jd<n�|r|�||��\}}nA|r?|�|��}t	|t��st|d
��rd}nd}|�|��|rd|jvr
||jd<||_dS)z"Prepares the given HTTP body data.Nzapplication/jsonF)�	allow_nan)�requestrGrF�tellz1Streamed bodies and files are mutually exclusive.�Content-Length�chunkedzTransfer-EncodingrEz!application/x-www-form-urlencodedzcontent-typezContent-Type)�complexjson�dumpsr[r"rIrKrM�allrLrr^r]rr1�	TypeError�AttributeErrorr�getattrr�r��OSError�object�NotImplementedErrorrrYrnrS�prepare_content_lengthrm)	r?rNrbrrmrZ�ve�	is_stream�lengths	         rAr�zPreparedRequest.prepare_body�s}�������	,��(�.�L�
9�"�(���?�?�?�����
9�
9�
9�&�r�4�8�8�8�8�����
9�����d�E�*�*�
,��{�{�7�+�+�����j�)�)��t�j�$��w�%G�H�H�H�
�
�
�	��,	<�
�"�4�������~�/C�D�
�
�
�����
�����D��t�V�T�*�*�6�3�*.�)�)�+�+�D�'�'���3�3�3�+1�(�(�D�'�'�'�3����
�
�)�G�����
>�1<�V�1D�1D���-�.�.�4=���0�1�1��
K�'+�'9�'9�%��'F�'F�$��|�|��K��.�.�t�4�4�D�!�$�
�3�3�K�w�t�V�7L�7L�K�'+���'J���'�'��-�-�-��
<��t�|�!C�!C�/;���^�,���	�	�	s6�#�
A�>�A�9C	�	C%�$C%�<D�D6�5D6c���|�,t|��}|rt|��|jd<dSdS|jdvr&|j�d���d|jd<dSdSdS)z>Prepare Content-Length header based on request method and bodyNr�)�GET�HEAD�0)r1rrYr��get)r?rmr�s   rAr�z&PreparedRequest.prepare_content_length=s������t�_�_�F��
E�2=�V�1D�1D���-�.�.�.�
E�
E�

�K��.�.��� � �!1�2�2�:�.1�D�L�)�*�*�*�
/�.�:�:rCr9c�J�|�'t|j��}t|��r|nd}|rwt|t��rt|��dkr	t
|�}||��}|j�|j��|�	|j
��dSdS)z"Prepares the given HTTP auth data.NrU)r*r:�anyrIr]r_r�__dict__�updater�rm)r?r�r:�url_auth�rs     rAr�zPreparedRequest.prepare_authMs����<�(���2�2�H�"�8�}�}�6�8�8�$�D��	3��$��&�&�
,�3�t�9�9��>�>�$�d�+����T�
�
�A�
�M� � ���,�,�,�
�'�'��	�2�2�2�2�2�	3�	3rCc��t|tj��r||_nt	|��|_t|j|��}|�||jd<dSdS)aPrepares the given HTTP cookie data.

        This function eventually generates a ``Cookie`` header from the
        given cookies using cookielib. Due to cookielib's design, the header
        will not be regenerated if it already exists, meaning this function
        can only be called once for the life of the
        :class:`PreparedRequest <PreparedRequest>` object. Any subsequent calls
        to ``prepare_cookies`` will have no actual effect, unless the "Cookie"
        header is removed beforehand.
        N�Cookie)rIr�	CookieJarr�rrrY)r?r��
cookie_headers   rAr�zPreparedRequest.prepare_cookiescsb���g�y�2�3�3�	9�#�D�M�M�/��8�8�D�M�)�$�-��>�>�
��$�%2�D�L��"�"�"�%�$rCc�P�|pg}|D]}|�|||���dS)zPrepares the given hooks.N)r�)r?r~r�s   rAr�zPreparedRequest.prepare_hookswsC��
�����	4�	4�E����u�e�E�l�3�3�3�3�	4�	4rCr�rz)r9)rorprqr�r�r�r�r�r�rsr�r�r�r�r�r�r�r�rtrCrAr�r�:s(��������(#�#�#�&����
��
���
�"�"�"�"�84�4�4�	�	�	�@�@�@�����\��H�H�H�T	=�	=�	=�L�L�L�L�\1�1�1� 3�3�3�3�,3�3�3�(4�4�4�4�4rCr�c�(�eZdZdZgd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ed���Zed
���Zed���Zed���Zed���Zdd�Zeddfd�Zed���Zed���Zd�Zed���Zd�Zd�ZdS)�ResponsezhThe :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    )
�_content�status_coderYr:�history�encoding�reasonr��elapsedr�c��d|_d|_d|_d|_t	��|_d|_d|_d|_g|_	d|_
ti��|_tjd��|_d|_dS)NFr)r��_content_consumed�_nextr�r(rY�rawr:r�r�r�rr��datetime�	timedeltar�r�r�s rAr�zResponse.__init__�s�����
�!&�����
� ���
+�,�,���
��������
�
������+�2�.�.��� �)�!�,�,�������rCc��|Srzrtr�s rA�	__enter__zResponse.__enter__�s���rCc�.�|���dSrz)�close)r?r�s  rA�__exit__zResponse.__exit__�s���
�
�����rCc�F���js�j�fd��jD��S)Nc�4��i|]}|t�|d����Srz)r�)r{�attrr?s  �rA�
<dictcomp>z)Response.__getstate__.<locals>.<dictcomp>�s'���K�K�K�D��g�d�D�$�/�/�K�K�KrC)r��content�	__attrs__r�s`rA�__getstate__zResponse.__getstate__�s3����%�	��L�L�K�K�K�K�D�N�K�K�K�KrCc��|���D]\}}t|||���t|dd��t|dd��dS)Nr�Tr�)r��setattr)r?�staterWr�s    rA�__setstate__zResponse.__setstate__�s_�� �;�;�=�=�	'�	'�K�D�%��D�$��&�&�&�&�	��)�4�0�0�0���e�T�"�"�"�"�"rCc��d|j�d�S)Nz<Response [r�)r�r�s rAr�zResponse.__repr__�s��1�T�-�1�1�1�1rCc��|jS�akReturns True if :attr:`status_code` is less than 400.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code, is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        ��okr�s rA�__bool__zResponse.__bool__�����w�rCc��|jSrrr�s rA�__nonzero__zResponse.__nonzero__�rrCc�,�|�d��S)z,Allows you to use a response as an iterator.�)�iter_contentr�s rArFzResponse.__iter__�s��� � ��%�%�%rCc�T�	|���n#t$rYdSwxYwdS)axReturns True if :attr:`status_code` is less than 400, False if not.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        FT)�raise_for_statusr!r�s rAr
zResponse.ok�sC��	��!�!�#�#�#�#���	�	�	��5�5�	�����ts��
%�%c�0�d|jvo
|jtvS)z�True if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        �location)rYr��REDIRECT_STATIr�s rA�is_redirectzResponse.is_redirects��
�T�\�)�P�d�.>�.�.P�PrCc�R�d|jvo|jtjtjfvS)z@True if this Response one of the permanent versions of redirect.r)rYr�r'�moved_permanently�permanent_redirectr�s rA�is_permanent_redirectzResponse.is_permanent_redirect	s4���T�\�)�
�d�.>��#��$�C
�/
�	
rCc��|jS)zTReturns a PreparedRequest for the next request in a redirect chain, if there is one.)r�r�s rA�nextz
Response.nexts���z�rCc�@�tj|j��dS)zOThe apparent encoding, provided by the charset_normalizer or chardet libraries.r�)r�detectrr�s rA�apparent_encodingzResponse.apparent_encodings���~�d�l�+�+�J�7�7rCrFc�Z�����fd�}�jr(t�jt��rt	�����5t�t
��s t
dt����d����t�j���}|��}�jr|n|}|rt|���}|S)a�Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        chunk_size must be of type int or None. A value of None will
        function differently depending on the value of `stream`.
        stream=True will read data as it arrives in whatever size the
        chunks are received. If stream=False, data is returned as
        a single chunk.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        c3��K�t�jd��r�	�j��d���Ed{V��n�#t$r}t	|���d}~wt
$r}t
|���d}~wt$r}t|���d}~wt$r}t|���d}~wwxYw	�j����}|sn|V��"d�_dS)N�streamT)�decode_content)
rLr�r&rrrr rrr�RequestsSSLErrorrEr�)r��chunk�
chunk_sizer?s  ��rA�generatez'Response.iter_content.<locals>.generate,s'������t�x��*�*�
 �	.�#�x���z�$��O�O�O�O�O�O�O�O�O�O��$�2�2�2�.�q�1�1�1�����"�2�2�2�.�q�1�1�1�����'�-�-�-�)�!�,�,�,������.�.�.�*�1�-�-�-�����.���� � �H�M�M�*�5�5�E� ����K�K�K�	 �&*�D�"�"�"s9�"=�
B/�A�
B/�#A2�2
B/�?B�
B/�B*�*B/Nz+chunk_size must be an int, it is instead a r�)
r�rIr��boolr%�intr��typer-r0)r?r*�decode_unicoder+�
reused_chunks�
stream_chunks�chunkss``     rArzResponse.iter_contents�����"	*�	*�	*�	*�	*�	*�.�!�	�j����&E�&E�	�%�'�'�'�
�
#�J�z�3�,G�,G�
#��Q�d�:�>N�>N�Q�Q�Q���
�$�D�M�:�>�>�
� ��
�
�
�"&�"8�K���m���	B�3�F�D�A�A�F��
rCNc#�>K�d}|�||���D]x}|�||z}|r|�|��}n|���}|r7|dr/|r-|dd|dkr|���}nd}|Ed{V���y|�|V�dSdS)z�Iterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.

        .. note:: This method is not reentrant safe.
        N)r*r/���)r�split�
splitlines�pop)r?r*r/�	delimiter�pendingr)�liness       rA�
iter_lineszResponse.iter_linesUs��������&�&�!�.�'�
�
�	�	�E��"��%����
+����I�.�.����(�(�*�*���
��r��
�u�
��r��2��%��)�1K�1K��)�)�+�+�����������������M�M�M�M�M��rCc��|jdurd|jrtd���|jdks|j�d|_n4d�|�t����pd|_d|_|jS)z"Content of the response, in bytes.Fz2The content for this response was already consumedrNrCT)r�r��RuntimeErrorr�r�r>r�CONTENT_CHUNK_SIZEr�s rArzResponse.contentws����=�E�!�!��%�
Y�"�#W�X�X�X���1�$�$���(8� $��
�
� #����):�):�;M�)N�)N� O� O� V�SV��
�!%����}�rCc���d}|j}|jsdS|j�|j}	t|j|d���}n-#tt
f$rt|jd���}YnwxYw|S)a�Content of the response, in unicode.

        If Response.encoding is None, encoding will be guessed using
        ``charset_normalizer`` or ``chardet``.

        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        Nr9�replace)�errors)r�rr#rJ�LookupErrorr�)r?rr�s   rA�textz
Response.text�s������=���|�	��2��=� ��-�H�		:��$�,���C�C�C�G�G���Y�'�	:�	:�	:��$�,�y�9�9�9�G�G�G�	:�����s�:�'A$�#A$c���|js�|jr�t|j��dkr~t|j��}|�h	t	j|j�|��fi|��S#t$rYn1t$r%}t|j
|j|j���d}~wwxYw	t	j|j
fi|��S#t$r%}t|j
|j|j���d}~wwxYw)z�Returns the json-encoded content of a response, if any.

        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        :raises requests.exceptions.JSONDecodeError: If the response body does not
            contain valid json.
        rVN)r�rr_r,r��loadsr\�UnicodeDecodeErrorr�RequestsJSONDecodeError�msg�doc�posrC)r?�kwargsr�r�s    rArz
Response.json�s ���}�	G���	G�#�d�l�2C�2C�a�2G�2G�
&�d�l�3�3�H��#�	G�&�,�T�\�-@�-@��-J�-J�U�U�f�U�U�U��)����
�D�&�G�G�G�1�!�%�����F�F�F�����G����	?��$�T�Y�9�9�&�9�9�9���	?�	?�	?�*�!�%�����>�>�>�����	?���s5�)A(�(
B"�4	B"�= B�B"�&B=�=
C,� C'�'C,c���|j�d��}i}|rCt|��}|D]1}|�d��p|�d��}|||<�2|S)z8Returns the parsed header links of the response, if any.�link�relr:)rYr�r.)r?r��resolved_links�linksrM�keys      rArPzResponse.links�ss����!�!�&�)�)�����	+�&�v�.�.�E��
+�
+���h�h�u�o�o�8����%����&*��s�#�#��rCc��d}t|jt��rF	|j�d��}n1#t$r|j�d��}YnwxYw|j}d|jcxkrdkrnn|j�d|�d|j��}n)d|jcxkrdkrnn|j�d	|�d|j��}|rt||�
���dS)z+Raises :class:`HTTPError`, if one occurred.r9rGz
iso-8859-1i�i�z Client Error: z
 for url: iXz Server Error: )�responseN)rIr�rKr\rFr�r:r!)r?�http_error_msgr�s   rArzResponse.raise_for_status�s1�����d�k�5�)�)�
	!�

:���+�+�G�4�4����%�
:�
:�
:���+�+�L�9�9����
:�����[�F��$�"�(�(�(�(�S�(�(�(�(�(��#�P�P�F�P�P�d�h�P�P�
�N��D�$�
*�
*�
*�
*�s�
*�
*�
*�
*�
*��#�P�P�F�P�P�d�h�P�P�
��	;��N�T�:�:�:�:�	;�	;s�9�$A �A c��|js|j���t|jdd��}|�|��dSdS)z�Releases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.

        *Note: Should not normally need to be called explicitly.*
        �release_connN)r�r�r�r�)r?rVs  rAr�zResponse.close�sQ���%�	��H�N�N�����t�x���>�>���#��L�N�N�N�N�N�$�#rC)rF)rorprqr�rr�r�r�rrr�rrrFrrr
rrr r#r�ITER_CHUNK_SIZEr;rrCrrPrr�rtrCrAr�r��s������������I�-�-�-�^������L�L�L�#�#�#�2�2�2�������&�&�&�����X���Q�Q��X�Q��
�
��X�
�����X���8�8��X�8�8�8�8�8�v)��$� � � � �D����X��$�#�#��X�#�J?�?�?�B����X�� ;�;�;�:����rCr�)Rr�r��encodings.idna�	encodings�ior�urllib3.exceptionsrrrrr�urllib3.fieldsr	�urllib3.filepostr
�urllib3.utilr�_internal_utilsr
rr�r�compatrrrrrrrrr�rrrr�rrr�
exceptionsrrr r!r"r#rGr$r(r%r~r&�status_codesr'�
structuresr(�utilsr)r*r+r,r-r.r/r0r1r2�moved�found�other�temporary_redirectrr�DEFAULT_REDIRECT_LIMITr>rWr5rvr�r�r�rtrCrA�<module>rjs��������
����#�#�#�#�#�#���������������(�'�'�'�'�'�6�6�6�6�6�6�"�"�"�"�"�"�?�?�?�?�?�?�?�?�������������������������(�'�'�'�'�'�3�3�3�3�3�3�3�3�3�3�M�M�M�M�M�M�M�M�M�M�����������������C�B�B�B�B�B�%�%�%�%�%�%�4�4�4�4�4�4�+�+�+�+�+�+� � � � � � �������+�+�+�+�+�+������������������������� 
�K�	�K�	�K�	��	����������w"�w"�w"�w"�w"�w"�w"�w"�t��������0Q�Q�Q�Q�Q��Q�Q�Q�hD4�D4�D4�D4�D4�*�,=�D4�D4�D4�N
I�I�I�I�I�I�I�I�I�IrC

Hacked By AnonymousFox1.0, Coded By AnonymousFox