403Webshell
Server IP : 35.236.43.222  /  Your IP : 216.73.216.143
Web Server : Apache
System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64
User : deploy ( 1002)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/requests_toolbelt/utils/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/requests_toolbelt/utils/__pycache__/deprecated.cpython-39.pyc
a

�O�X�	�@sddZddlZddlZddlmZejdejd�jZejdejd�jZ	e�d�jZ
dd	�Zd
d�ZdS)z7A collection of functions deprecated in requests.utils.�N)�utilss!<meta.*?charset=["\']*(.+?)["\'>])�flagss+<meta.*?content=["\']*;?charset=(.+?)["\'>]s$^<\?xml.*?encoding=["\']*(.+?)["\'>]cCsDt|�t|�t|�}dtjkr.dkr@nndd�|D�}|S)a�Return encodings from given content string.

    .. code-block:: python

        import requests
        from requests_toolbelt.utils import deprecated

        r = requests.get(url)
        encodings = deprecated.get_encodings_from_content(r)

    :param content: bytestring to extract encodings from
    :type content: bytes
    :return: encodings detected in the provided content
    :rtype: list(str)
    )�r)�rcSsg|]}|�d��qS)�utf8)�decode)�.0�encoding�r
�D/usr/lib/python3/dist-packages/requests_toolbelt/utils/deprecated.py�
<listcomp>(�z.get_encodings_from_content.<locals>.<listcomp>)�find_charset�find_pragma�find_xml�sys�version_info)�content�	encodingsr
r
r�get_encodings_from_contents�rc	Cs�t�}t�|j�}|rFzt|j|�WStyD|�|���Yn0t	|j�}|D]F}|��}||vrjqTzt|j|�WSty�|�|�YqT0qT|r�zt|j|dd�WSt
y�Yn0|jS)aMReturn the requested content back in unicode.

    This will first attempt to retrieve the encoding from the response
    headers. If that fails, it will use
    :func:`requests_toolbelt.utils.deprecated.get_encodings_from_content`
    to determine encodings from HTML elements.

    .. code-block:: python

        import requests
        from requests_toolbelt.utils import deprecated

        r = requests.get(url)
        text = deprecated.get_unicode_from_response(r)

    :param response: Response object to get unicode content from.
    :type response: requests.models.Response
    �replace)�errors)�setrZget_encoding_from_headersZheaders�strr�UnicodeError�add�lowerr�	TypeError�text)ZresponseZtried_encodingsr	rZ	_encodingr
r
r�get_unicode_from_response,s,
r)
�__doc__�rerZrequestsr�compile�I�findallrrrrrr
r
r
r�<module>s���

Youez - 2016 - github.com/yon3zu
LinuXploit