관리-도구
편집 파일: utils.cpython-38.pyc
U .?�fS� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z ddlmZmZ ddlmZ ddlmZ ddlmZmZmZmZ dd lmZmZmZmZmZmZ dd lm Z! ddlm"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( ddl)m*Z* dd l+m,Z,m-Z-m.Z.m/Z/ ddl0m1Z1 dZ2e�3� Z4ddd�Z5d�6e�7dedd�d ��Z8ej9dk�rvdd� Z:dd� Z"dd� Z;dd � Z<dtd"d#�Z=d$d%� Z>d&d'� Z?ej@d(d)� �ZAd*d+� ZBd,d-� ZCd.d/� ZDd0d1� ZEdud2d3�ZFd4d5� ZGd6d7� ZHd8d9� ZId:d;� ZJd<d=� ZKd>d?� ZLd@dA� ZMdBdC� ZNeOdD�ZPdEdF� ZQdGdH� ZRdIdJ� ZSdKdL� ZTdMdN� ZUdOdP� ZVej@dQdR� �ZWdSdT� ZXdvdUdV�ZYdWdX� ZZdwdYdZ�Z[dxd\d]�Z\d^d_� Z]d`da� Z^db�_dc�Z`e`dd Zae`de Zbdfdg� Zcdhdi� Zddjdk� Zedldm� Zfdndo� Zgdpdq� Zhdrds� ZidS )yz� requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. � N)�OrderedDict)�make_headers� parse_url� )�certs��__version__)�_HEADER_VALIDATORS_BYTE�_HEADER_VALIDATORS_STR�HEADER_VALIDATORS�to_native_string)�Mapping� basestring�bytes� getproxies�getproxies_environment� integer_types)�parse_http_list)�proxy_bypass�proxy_bypass_environment�quote�str�unquote�urlparse� urlunparse��cookiejar_from_dict)�FileModeWarning� InvalidHeader� InvalidURL�UnrewindableBodyError)�CaseInsensitiveDict)z.netrc�_netrc�P i� )�http�httpsz, z,\s*T)�accept_encodingzaccept-encoding�win32c C s� zdd l }W n tk r" Y dS X z6|�|jd�}t|�|d�d �}|�|d�d }W n ttfk rt Y dS X |r~|s�dS |�d�}t d |�}|D ]T}|dkr�d| kr� d S |� dd �}|� dd�}|� d d�}t�|| tj �r� d S q�dS )Nr Fz;Software\Microsoft\Windows\CurrentVersion\Internet SettingsZProxyEnableZ ProxyOverride�;z<local>�.Tz\.�*z.*�?)�winreg�ImportError�OpenKey�HKEY_CURRENT_USER�int�QueryValueEx�OSError� ValueError�split�filter�replace�re�match�I)�hostr, ZinternetSettingsZproxyEnableZ proxyOverride�test� r<