관리-도구
편집 파일: utils.cpython-36.pyc
3 �Pf/l � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlmZ ddl mZ ddlmZ ddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z! dd l"m#Z# dd l$m%Z% ddl&m'Z'm(Z(m)Z)m*Z* dfZ+ej,� Z-ddd�Z.ej/� dk�r0dd� Z0dd� Zdd� Z1dd� Z2dgdd�Z3dd� Z4dd � Z5d!d"� Z6d#d$� Z7d%d&� Z8dhd'd(�Z9d)d*� Z:d+d,� Z;d-d.� Z<d/d0� Z=d1d2� Z>d3d4� Z?d5d6� Z@eAdi�ZBd9d:� ZCd;d<� ZDd=d>� ZEd?d@� ZFdAdB� ZGdCdD� ZHejIdEdF� �ZJdGdH� ZKdjdIdJ�ZLdKdL� ZMdkdNdO�ZNdPdQ� ZOdRdS� ZPdTjQdU�ZReRdV ZSeRdW ZTdXdY� ZUdZd[� ZVd\d]� ZWejXd^�ZYejXd_�ZZd`da� Z[dbdc� Z\ddde� Z]dS )lz� requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. � N� )�__version__)�certs)�to_native_string)�parse_http_list)�quote�urlparse�bytes�str�OrderedDict�unquote� getproxies�proxy_bypass� urlunparse� basestring� integer_types�is_py3�proxy_bypass_environment�getproxies_environment)�cookiejar_from_dict)�CaseInsensitiveDict)� InvalidURL� InvalidHeader�FileModeWarning�UnrewindableBodyError�.netrc�_netrc�P i� )ZhttpZhttpsZWindowsc C s� t rdd l}ndd l}y2|j|jd�}|j|d�d }|j|d�d }W n tk r\ dS X | sj| rndS |jd�}xX|D ]P}|dkr�d| kr�d S |jdd �}|jdd�}|jd d�}t j || t j�r~d S q~W dS )Nr z;Software\Microsoft\Windows\CurrentVersion\Internet SettingsZProxyEnableZ ProxyOverrideF�;z<local>�.Tz\.�*z.*�?)r �winreg�_winreg�OpenKey�HKEY_CURRENT_USERZQueryValueEx�OSError�split�replace�re�match�I)�hostr"