OwlCyberSecurity - MANAGER
Edit File: request.cpython-313.opt-1.pyc
� ����u�ht����������������������������S�r�SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK r SSK r SSKrSSKrSSK r SSKrSSKrSSKrSSKJrJrJr �SSKJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r' �SSK(J)r)J*r* ��SSK+r+Sr,/�SQr.S \R^������������������SS �-��r0Sq1S\ Rd������������������4SS.S�jjr3S �r4/�r5SgS�jr6S�r7\ Rp������������������"�S\ Rr������������������5������r:S�r;�"�S�S5������r<�"�S�S5������r=S�r>�"�S�S5������r?�"�S�S\?5������r@�"�S�S\?5������rA�"�S�S\?5������rBS�rC�"�S �S!\?5������rD�"�S"�S#5������rE�"�S$�S%\E5������rF�"�S&�S'\F5������rG�"�S(�S)5������rH�"�S*�S+\H\?5������rI�"�S,�S-\H\?5������rJ\R�������������������rL�"�S.�S/5������rM�"�S0�S1\?\M5������rN�"�S2�S3\?\M5������rO�"�S4�S5\?5������rP�"�S6�S7\P5������rQ\R"�\R�������������������S85������(�������a���"�S9�S:\P5������rT\.R�������������������S:5������ ��"�S;�S<\?5������rV�"�S=�S>\?5������rWS?�rXS@�rY�"�SA�SB\?5������rZSC�r[�"�SD�SE\?5������r\�"�SF�SG\\5������r]�"�SH�SI\?5������r^SJr_\R�������������������SK:X��a ��SSLKaJbrbJcrc �OSM�rbSN�rc0�rd�"�SO�SP5������re�"�SQ�SR\e5������rfSqgSS�rhSqiST�rjSqkSU�rlSqmSV�rn�"�SW�SX5������roSY�rpShSZ�jrqS[�rrS\�rs\R�������������������S]:X��a��SS^KuJvrvJwrw �S_�rxS`�rySa�rzSb�r{g\R�������������������SK:X��a ��Sc�r|Sd�r{Se�r}Sf�rzg\pr{\qrzg!�\-�a�� �Sr,�GNef�=�f)ia� ��An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra methods described below. The OpenerDirector manages a collection of Handler objects that do all the actual work. Each Handler implements a particular protocol or option. The OpenerDirector is a composite object that invokes the Handlers needed to open the requested URL. For example, the HTTPHandler performs HTTP GET and POST requests and deals with non-error returns. The HTTPRedirectHandler automatically deals with HTTP 301, 302, 303, 307, and 308 redirect errors, and the HTTPDigestAuthHandler deals with digest authentication. urlopen(url, data=None) -- Basic usage is the same as original urllib. pass the url and optionally data to post to an HTTP URL, and get a file-like object back. One difference is that you can also pass a Request instance instead of URL. Raises a URLError (subclass of OSError); for HTTP errors, raises an HTTPError, which can also be treated as a valid response. build_opener -- Function that creates a new OpenerDirector instance. Will install the default handlers. Accepts one or more Handlers as arguments, either instances or Handler classes that it will instantiate. If one of the argument is a subclass of the default handler, the argument will be installed instead of the default. install_opener -- Installs a new opener as the default opener. objects of interest: OpenerDirector -- Sets up the User Agent as the Python-urllib client and manages the Handler classes, while dealing with requests and responses. Request -- An object that encapsulates the state of a request. The state can be as simple as the URL. It can also include extra HTTP headers, e.g. a User-Agent. BaseHandler -- internals: BaseHandler and parent _call_chain conventions Example usage: import urllib.request # set up authentication info authinfo = urllib.request.HTTPBasicAuthHandler() authinfo.add_password(realm='PDQ Application', uri='https://mahler:8092/site-updates.py', user='klem', passwd='geheim$parole') proxy_support = urllib.request.ProxyHandler({"http" : "http://ahad-haam:3128"}) # build a new opener that adds authentication and caching FTP handlers opener = urllib.request.build_opener(proxy_support, authinfo, urllib.request.CacheFTPHandler) # install it urllib.request.install_opener(opener) f = urllib.request.urlopen('https://www.python.org/') �����N)�URLError� HTTPError�ContentTooShortError)�urlparse�urlsplit�urljoin�unwrap�quote�unquote� _splittype� _splithost� _splitport� _splituser�_splitpasswd� _splitattr�_splitquery�_splitvalue� _splittag� _to_bytes�unquote_to_bytes� urlunparse)� addinfourl�addclosehookTF)!�Request�OpenerDirector�BaseHandler�HTTPDefaultErrorHandler�HTTPRedirectHandler�HTTPCookieProcessor�ProxyHandler�HTTPPasswordMgr�HTTPPasswordMgrWithDefaultRealm�HTTPPasswordMgrWithPriorAuth�AbstractBasicAuthHandler�HTTPBasicAuthHandler�ProxyBasicAuthHandler�AbstractDigestAuthHandler�HTTPDigestAuthHandler�ProxyDigestAuthHandler�HTTPHandler�FileHandler� FTPHandler�CacheFTPHandler�DataHandler�UnknownHandler�HTTPErrorProcessor�urlopen�install_opener�build_opener�pathname2url�url2pathname� getproxies�urlretrieve� urlcleanup� URLopener�FancyURLopenerz%d.%d������contextc����������������������U(�������a��[��������US9n[��������U5������nO[��������c ��[��������5�������=qnO[��������nUR������������������XU5������$�)a���Open the URL url, which can be either a string or a Request object. *data* must be an object specifying additional data to be sent to the server, or None if no such data is needed. See Request for details. urllib.request module uses HTTP/1.1 and includes a "Connection:close" header in its HTTP requests. The optional *timeout* parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout setting will be used). This only works for HTTP, HTTPS and FTP connections. If *context* is specified, it must be a ssl.SSLContext instance describing the various SSL options. See HTTPSConnection for more details. This function always returns an object which can work as a context manager and has the properties url, headers, and status. See urllib.response.addinfourl for more detail on these properties. For HTTP and HTTPS URLs, this function returns a http.client.HTTPResponse object slightly modified. In addition to the three new methods above, the msg attribute contains the same information as the reason attribute --- the reason phrase returned by the server --- instead of the response headers as it is specified in the documentation for HTTPResponse. For FTP, file, and data URLs and requests explicitly handled by legacy URLopener and FancyURLopener classes, this function returns a urllib.response.addinfourl object. Note that None may be returned if no handler handles the request (though the default installed global OpenerDirector uses UnknownHandler to ensure this never happens). In addition, if proxy settings are detected (for example, when a *_proxy environment variable like http_proxy is set), ProxyHandler is default installed and makes sure the requests are handled through the proxy. r<���)�HTTPSHandlerr3����_opener�open)�url�data�timeoutr=���� https_handler�openers��� �5/opt/alt/python313/lib64/python3.13/urllib/request.pyr1���r1�������sC������X��$�W�5� ��m�,�� ��'�>�)��&����;�;�s�'�*�*�����c�����������������������U�q�g��N)r@���)rF���s��� rG���r2���r2�������s�������GrH���c������������������L����[��������U�5������u��pE[��������R������������������"�[��������X5������5�������nUR ������������������5�������nUS:X��a1��U(�������d*��[ ��������R������������������R������������������U5������U4sSSS5������ �$�U(�������a ��[��������US5������nO5[��������R������������������"�SS9nUR������������������n[��������R������������������U5������ �U� �X4n Sn SnSnSn S U;���a��[��������US ���5������nU(�������a ��U"�X�U5������ �UR������������������U 5������=n(�������aN��U[!��������U5������- ��nUR#������������������U5������ �U S- ��n U(�������a ��U"�X�U5������ �UR������������������U 5������=n(�������a��MN��SSS5������ �SSS5������ �WS:���a��WU:��a��[%��������SX�4-��W 5������eW $�!�,�(�������d��f �� � �N4=�f!�,�(�������d��f �� � �N==�f) a+�� Retrieve a URL into a temporary location on disk. Requires a URL argument. If a filename is passed, it is used as the temporary file location. The reporthook argument should be a callable that accepts a block number, a read size, and the total file size of the URL target. The data argument should be valid URL encoded data. If a filename is passed and the URL points to a local resource, the result is a copy from local file to new file. Returns a tuple containing the path to the newly created data file as well as the resulting HTTPMessage object. �fileN�wbF)�delete�� �����r����content-length�Content-Length�����1retrieval incomplete: got only %i out of %i bytes)r���� contextlib�closingr1����info�os�path�normpathrA����tempfile�NamedTemporaryFile�name�_url_tempfiles�append�int�read�len�writer���)rB����filename� reporthookrC����url_typerY����fp�headers�tfp�result�bs�sizera����blocknum�blocks��� rG���r7���r7�������s}����� � ��_�N�H� � � �G�C�.� /�2��'�'�)����v��h��7�7�#�#�D�)�7�2� � 0� /����x��&�C��-�-�U�;�C��x�x�H��!�!�(�+� ��&�F��B��D��D��H��7�*��7�#3�4�5����8��.��7�7�2�;�&�%�&���E� �"��� � �%� ��A� ����x�T�2���7�7�2�;�&�%�&���!� 0�F��q�y�T�D�[�"�?��l� �"�$�� $���M�1��S��!� 0� /�s+����>F�5AF��BF�F� F �F� F#c������������������������[����������H��n��[��������R������������������"�U�5������ �M��� �[���������SS2 �[��������(�������a��Sqgg!�[���������a�� ��MC��f�=�f)z0Clean up temporary files from urlretrieve calls.N)r^���rX����unlink�OSErrorr@���)� temp_files��� rG���r8���r8������sJ������#� � ��I�I�i� ��$�� �q���w��������� �� �s����=� A� Az:\d+$c�����������������������U�R�������������������n[��������U5������S���nUS:X��a��U�R������������������SS5������n[��������R ������������������SUS5������nUR������������������5�������$�)z|Return request-host, as defined by RFC 2965. Variation from RFC: returned value is lowercased, for convenient comparison. rS������Host)�full_urlr���� get_header�_cut_port_re�sub�lower)�requestrB����hosts��� rG����request_hostr}�����sX�������� � �C��C�=���D��r�z��!�!�&�"�-������B��a�(�D��:�:�<�rH���c������������������������\�rS�rSrS0�SSS4S�jr\S�5�������r\R������������������S�5�������r\R������������������S�5�������r\S�5�������r \ R������������������S �5�������r \ R������������������S �5�������r S�r S�rS �rS�r S�rS�rS�rS�rSS�jrS�rS�rSrg)r���i��NFc�����������������������Xl���������0�U�l��������0�U�l��������S�U�l��������X l��������S�U�l��������UR ������������������5��������H��u��pxU�R������������������Xx5������ �M��� �Uc��[��������U�5������nX@l ��������XPl ��������U(�������a��X`l��������g�g�rJ���)rv���rh����unredirected_hdrs�_datarC����_tunnel_host�items� add_headerr}����origin_req_host�unverifiable�method) �selfrB���rC���rh���r����r����r�����key�values ��� rG����__init__�Request.__init__!��ss�������� ����!#����� �� � ���!�-�-�/�J�C��O�O�C�'��*��"�*�4�0�O�.��(��� �K��rH���c�����������������������U�R�������������������(�������a&��SR������������������U�R������������������U�R�������������������5������$�U�R������������������$�)Nz{}#{})�fragment�format� _full_url�r����s��� rG���rv����Request.full_url3��s,�������=�=��>�>�$�.�.�$�-�-�@�@��~�~�rH���c�����������������������[��������U5������U�l��������[��������U�R������������������5������u��U�l��������U�l��������U�R ������������������5������� �g�rJ���)r ���r����r���r�����_parse�r����rB���s��� rG���rv���r����9��s/������� �����(1�$�.�.�(A�%���� ���� rH���c������������������.�����S�U�l���������S�U�l��������SU�l��������g�)Nrt���)r����r�����selectorr����s��� rG���rv���r����@��s����������� ��� rH���c�����������������������U�R�������������������$�rJ���)r����r����s��� rG���rC����Request.dataF��s�������z�z�rH���c�����������������������XR�������������������:w��a/��Xl���������U�R������������������S5������(�������a��U�R������������������S5������ �g�g�g�)N�Content-length)r����� has_header� remove_header)r����rC���s��� rG���rC���r����J��s<�������:�:���J�����/�0�0��"�"�#3�4��1��rH���c�����������������������S�U�l���������g�rJ���)rC���r����s��� rG���rC���r����T��s �������� rH���c����������������������[��������U�R������������������5������u��U�l��������nU�R������������������c��[��������SU�R������������������-��5������e[��������U5������u��U�l��������U�l��������U�R������������������(�������a��[��������U�R������������������5������U�l��������g�g�)Nzunknown url type: %r) r���r�����type� ValueErrorrv���r ���r|���r����r���)r�����rests��� rG���r�����Request._parseX��sd������$�T�^�^�4��� �4��9�9���3�d�m�m�C�D�D�#-�d�#3� �� �4�=��9�9��� � �*�D�I��rH���c������������������>�����U�R�������������������b��SOSn[��������U�SU5������$�)z3Return a string indicating the HTTP request method.�POST�GETr����)rC����getattr)r�����default_methods��� rG���� get_method�Request.get_method`��s!������#'�9�9�#8��e���t�X�~�6�6rH���c�����������������������U�R�������������������$�rJ���)rv���r����s��� rG����get_full_url�Request.get_full_urle��s�������}�}�rH���c�����������������������U�R�������������������S:X��a#��U�R������������������(�������d��U�R������������������U�l��������OX l���������U�R������������������U�l��������Xl��������g�)N�https)r����r����r|���rv���r����)r����r|���r����s��� rG���� set_proxy�Request.set_proxyh��s7�������9�9����(9�(9� $� � �D���I� �M�M�D�M�� rH���c������������������4�����U�R�������������������U�R������������������:H��$�rJ���)r����rv���r����s��� rG���� has_proxy�Request.has_proxyp��s�������}�}�� � �-�-rH���c������������������<�����X R�������������������UR������������������5�������'���g�rJ���)rh���� capitalize�r����r�����vals��� rG���r�����Request.add_headers��s������),���S�^�^�%�&rH���c������������������<�����X R�������������������UR������������������5�������'���g�rJ���)r����r����r����s��� rG����add_unredirected_header�Request.add_unredirected_headerw��s������36���s�~�~�/�0rH���c������������������H�����XR�������������������;���=(�������d�� �XR������������������;���$�rJ���)rh���r�����r�����header_names��� rG���r�����Request.has_header{��s"�������|�|�+��6��5�5�5� 7rH���c������������������l�����U�R�������������������R������������������UU�R������������������R������������������X5������5������$�rJ���)rh����getr����)r����r�����defaults��� rG���rw����Request.get_header��s0�������|�|�����"�"�&�&�{�<�>�� >rH���c������������������t�����U�R�������������������R������������������US�5������ �U�R������������������R������������������US�5������ �g�rJ���)rh����popr����r����s��� rG���r�����Request.remove_header���s,������������d�+����"�"�;��5rH���c������������������h�����0�U�R�������������������EU�R������������������En[��������UR������������������5�������5������$�rJ���)r����rh����listr����)r�����hdrss��� rG����header_items�Request.header_items���s,������9�$�(�(�9�D�L�L�9���D�J�J�L�!�!rH���)r����r����r����rC���r����rv���rh���r|���r����r����r����r����r����r����rJ���)�__name__� __module__�__qualname__�__firstlineno__r�����propertyrv����setter�deleterrC���r����r����r����r����r����r����r����r����rw���r����r�����__static_attributes__��rH���rG���r���r�����s�������!%�r�!%�E��!�$������ ��_�_������������� ������� �[�[�5���5�� �\�\�����+�7� ��.�-�7�7�>� 6�"rH���r���c��������������������^�����\�rS�rSrS�rS�rS�rS�rS\R������������������4S�jr SS�jrS �rS r g)r���i���c������������������p�����S[���������-��nSU4/U�l��������/�U�l��������0�U�l��������0�U�l��������0�U�l��������0�U�l��������g�)N�Python-urllib/%sz User-agent)�__version__� addheaders�handlers�handle_open�handle_error�process_response�process_request)r�����client_versions��� rG���r�����OpenerDirector.__init__���sB������+�k�9��(�.�9�:����� ������� "���!��rH���c������������������<����[��������US5������(�������d��[��������S[��������U5������-��5������eSn[��������U5�������GH��nUS;���a��M��UR ������������������S5������nUS�U�nX4S-���S��nUR������������������S5������(�������aU��UR ������������������S5������U-���S-���nX7S-���S��n�[ ��������U5������nU�R������������������R������������������U0�5������n X�R������������������U'���OAUS:X��a��UnU�R������������������n O,US :X��a��UnU�R������������������n OUS :X��a��UnU�R������������������n OM���U R������������������U/�5������n U (�������a��[��������R������������������"�X�5������ �OU R!������������������U5������ �SnGM��� �U(�������a3��[��������R������������������"�U�R"������������������U5������ �UR%������������������U�5������ �g�g�!�[���������a�� ��N�f�=�f)N� add_parentz%expected BaseHandler instance, got %rF)�redirect_request�do_open� proxy_open�_rS����errorrA����responser{���T)�hasattr� TypeErrorr�����dir�find� startswithr`���r����r����r����r����r����r����� setdefault�bisect�insortr_���r����r����)r�����handler�added�meth�i�protocol� condition�j�kind�lookupr����s��� rG����add_handler�OpenerDirector.add_handler���s�������w��-�-��C� ��M�*��+�� +������L�D��D�D��� � �#��A��B�Q�x�H��q�S�T� �I��#�#�G�,�,��N�N�3�'�!�+�a�/���a�C�D�z����t�9�D���*�*�.�.�x��<��.4�!�!�(�+��f�$����)�)���j�(����.�.���i�'����-�-����(�(��r�2�H��� � �h�0�����(��E�G�!�J���M�M�$�-�-��1����t�$����/�"�����s����F� F�Fc�����������������������g�rJ���r����r����s��� rG����close�OpenerDirector.close����������rH���c������������������h�����UR������������������US5������nU�H��n[��������Xc5������nU"�U6�nUc��M��Us �$�� �g�)Nr����)r����r����) r�����chainr����� meth_name�argsr����r�����funcrj���s ��� rG����_call_chain�OpenerDirector._call_chain���s<��������9�9�T�2�&���G��7�.�D��4�[�F��!�� � � rH���Nc����������������������[��������U[��������5������(�������a��[��������X5������nOUnUb��X$l��������X4l��������UR ������������������nUS-���nU�R������������������R������������������U/�5�������H��n[��������Xv5������nU"�U5������nM��� �[��������R������������������"�SUR������������������UR������������������UR������������������UR������������������5�������5������ �U�R������������������XB5������n US-���nU�R������������������R������������������U/�5�������H��n[��������Xv5������nU"�XI5������n M��� �U $�)N�_requestzurllib.Request� _response)� isinstance�strr���rC���rD���r����r����r����r�����sys�auditrv���rh���r�����_openr����) r�����fullurlrC���rD����reqr����r��� processorr����r����s ��� rG���rA����OpenerDirector.open���s��������g�s�#�#��'�(�C��C��������8�8����Z�'� ��-�-�1�1�(�B�?�I��9�0�D��s�)�C��@�� � � �"�C�L�L�#�(�(�C�K�K����IY�Z��:�:�c�(����[�(� ��.�.�2�2�8�R�@�I��9�0�D��C�*�H��A���rH���c�����������������������U�R������������������U�R������������������SSU5������nU(�������a��U$�UR������������������nU�R������������������U�R������������������XDS-���U5������nU(�������a��U$�U�R������������������U�R������������������SSU5������$�)Nr�����default_openr���unknown�unknown_open)r��r����r����)r����r��rC���rj���r����s��� rG���r���OpenerDirector._open���s��������!�!�$�"2�"2�I�"0�#�7����M��8�8���!�!�$�"2�"2�H�")�?*�+.�0����M����� 0� 0�)� .��5�� 5rH���c������������������������US;���a��U�R�������������������S���nUS���nSU-��nSnUnOU�R�������������������nUS-���nSnX1U4U-���nU�R������������������"�U6�nU(�������a��U$�U(�������a��USS 4W-���nU�R������������������"�U6�$�g�) N��httpr����r��r;���z http_error_%srS����_errorr���r�����http_error_default)r����r��)r�����protor���dictr���http_err� orig_argsrj���s��� rG���r�����OpenerDirector.error��s��������%�%��$�$�V�,�D���G�E�'�%�/�I��H��I��$�$�D���(�I��H��Y�'�$�.���!�!�4�(����M���)�%9�:�Y�F�D��#�#�T�*�*��rH���)r����r����r����r����r����r����rJ���)r����r����r����r����r����r����r����r���socket�_GLOBAL_DEFAULT_TIMEOUTrA���r��r����r����r����rH���rG���r���r������s3������ "�-%�^ � ��"&�v�/M�/M���: 5�+rH���r���c������������ �����������[��������5�������n[��������[��������[��������[��������[ ��������[��������[��������[��������[��������/ n[��������[��������R������������������S5������(�������a��UR������������������[��������5������ �[��������5�������nU�Hi��nU��H`��n[!��������U["��������5������(�������a%��[%��������XT5������(�������a��UR'������������������U5������ �M;��M=��[!��������XT5������(�������d��MO��UR'������������������U5������ �Mb��� �Mk��� �U�H��nUR)������������������U5������ �M��� �U�H��nUR+������������������U"�5�������5������ �M��� �U��H0��n[!��������U["��������5������(�������a��U"�5�������nUR+������������������U5������ �M2��� �U$�)a��Create an opener object from a list of handlers. The opener will use several default handlers, including support for HTTP, FTP and when applicable HTTPS. If any of the handlers passed as arguments are subclasses of the default handlers, the default handlers will not be used. �HTTPSConnection)r���r ���r/���r*���r���r���r,���r+���r0���r.���r����r���clientr_���r?����setr��r����� issubclass�add�remover����)r����rF����default_classes�skip�klass�check�hs��� rG���r3���r3�����s������� �F�#�^�[�.�0C�!�;�0B�"�$�O���t�{�{�-�.�.����|�,��5�D� ���E��%��&�&��e�+�+��H�H�U�O��,��E�)�)���������!�������u�%����!�����5�7�#��!�����a������A����1������MrH���c��������������������*�����\�rS�rSrSrS�rS�rS�rSrg)r���i?������c�����������������������Xl���������g�rJ�����parent)r����r5��s��� rG���r�����BaseHandler.add_parentB��s�������rH���c�����������������������g�rJ���r����r����s��� rG���r�����BaseHandler.closeE��r���rH���c������������������X�����[��������US5������(�������d��gU�R������������������UR������������������:��$�)N� handler_orderT)r����r:��)r�����others��� rG����__lt__�BaseHandler.__lt__I��s+�������u�o�.�.����!�!�E�$7�$7�7�7rH���r4��N) r����r����r����r����r:��r����r����r<��r����r����rH���rG���r���r���?��s�������M�� �8rH���r���c��������������������&�����\�rS�rSrSrSrS�r\rSrg)r0���iR��zProcess HTTP error responses.i���c�����������������������UR�������������������UR������������������UR������������������5�������pTnSUs=::��a��S:��d ��O �U�R������������������R ������������������SXX4U5������nU$�)N������,��r��)�code�msgrW���r5��r����)r����r{���r����rB��rC��r����s��� rG���� http_response� HTTPErrorProcessor.http_responseV��sN������"�-�-����x�}�}��4����t�!�c�!��{�{�(�(���4�d�<�H���rH���r����N) r����r����r����r�����__doc__r:��rD���https_responser����r����rH���rG���r0���r0���R��s������'��M� ��#�NrH���r0���c�������������������������\�rS�rSrS�rSrg)r���ic��c������������������0�����[��������UR������������������X4XR5������erJ���)r���rv���)r����r��rg���rB��rC��r����s��� rG���r���*HTTPDefaultErrorHandler.http_error_defaultd��s����������d��:�:rH���r����N)r����r����r����r����r��r����r����rH���rG���r���r���c��s������;rH���r���c��������������������<�����\�rS�rSrSrSrS�rS�r\=r=r =r rSrSr g) r���ig������� ���c������������������z����UR������������������5�������nUS;���a��US;���d#��US;���a��US:X��d��[��������UR������������������X4XR5������eUR������������������SS5������nSnUR������������������R������������������5��������V V s0�s�H��u��p�U R ������������������5�������U;��d��M��X�_M��� �nn n [��������UUS:X��a��SOS UUR������������������S S9$�s �sn n f�)au��Return a Request or None in response to a redirect. This is called by the http_error_30x methods when a redirection response is received. If a redirection should take place, return a new Request to allow http_error_30x to perform the redirect. Otherwise, raise HTTPError if no-one else should try to handle this url. Return None if you can't but another Handler might. )�-���.���/��i3��i4��)r�����HEAD)rO��rP��rQ��r����� z%20)rQ���zcontent-typerR��r����T)r����rh���r����r����) r����r���rv����replacerh���r����rz���r���r����)r����r��rg���rB��rC��rh����newurl�m�CONTENT_HEADERS�k�v� newheaderss��� rG���r�����$HTTPRedirectHandler.redirect_requesto��s�������� �N�N����2�2�q�O�7K���&�1��;��C�L�L�$�W�A�A������U�+��<��'*�{�{�'8�'8�':��;�':�t�q�����/�9���a�d�':� ��;��v�()�V��f��)�'*�':�':�$(� *�� *��;s����1B7�B7c������������������r����SU;���a��US���nO SU;���a��US���nOg�[��������U5������nUR������������������S;��a��[��������XcU<�SU<�S3XR5������eUR������������������(�������d!��UR������������������(�������a��[��������U5������nSUS'���[ ��������U5������n[��������US[��������R������������������S 9n[��������UR������������������U5������nU�R������������������XX4XV5������nUc��g�[��������US 5������(�������aq��UR������������������=o�l��������U R������������������US5������U�R ������������������:���d��[#��������U 5������U�R$������������������:���a%��[��������UR������������������UU�R&������������������U-���XR5������eO0�=n =Ul��������Ul��������U R������������������US5������S-���X�'���UR)������������������5������� �UR+������������������5������� �U�R,������������������R/������������������X�R0������������������S 9$�)N�location�uri�r��r�����ftprt���z - Redirection to url 'z' is not allowed�/r;���z iso-8859-1)�encoding�safe� redirect_dictr���rS����rD���)r����schemer���rY����netlocr����r���r ����string�punctuationr���rv���r����r����rd��r�����max_repeatsrb����max_redirections�inf_msgra���r����r5��rA���rD���) r����r��rg���rB��rC��rh���rU���urlparts�new�visiteds ��� rG����http_error_302�"HTTPRedirectHandler.http_error_302���s��������� ��Z�(�F� �g� ��U�^�F����F�#�� ��?�?�">�>���AD�f�M���� � ��}�}�����H�~�H��H�Q�K��H�%�� ���\��0B�0B�D������v�.�� ��#�#�C�T��H���;����3��(�(�*-�*;�*;�;�G�'����F�A�&�$�*:�*:�:��G��� 5� 5�5�����d� $���s� 2�G�A��A��6��?A�@�G�@�c�'�#�*;�!�+�+�f�a�0�1�4���� ��� � ��� ��{�{����[�[��9�9rH���zoThe HTTP server returned a redirect error that would lead to an infinite loop. The last 30x error message was: r����N)r����r����r����r����rj��rk��r����rp���http_error_301�http_error_303�http_error_307�http_error_308rl��r����r����rH���rG���r���r���g��s<��������K����!*�N::�x�IW�V�N�V�^�V�n�~�2�GrH���r���c������������������v����[��������U�5������u��pUR������������������S5������(�������d��SnU�nOmUR������������������S5������(�������d��[��������SU�-��5������eSU;���a$��UR������������������S5������nUR������������������SU5������nOUR������������������SS5������nUS:X��a��SnUSU�n[ ��������U5������u��pgUb��[��������U5������u��p�OS=p�XX�4$�)z�Return (scheme, user, password, host/port) given a URL or an authority. If a URL is supplied, it must have an authority (host:port) component. According to RFC 3986, having an authority component means the URL must have two slashes after the scheme. ra��N�//zproxy URL with no authority: %r�@r;���rP���)r���r����r����r����r���r���) �proxyrf���r_scheme� authority�host_separator�end�userinfo�hostport�user�passwords ��� rG����_parse_proxyr������s��������"�%�(��F����s�#�#���� ���"�"�4�(�(��>��F�G�G���(�?�%�]�]�3�/�N��-�-��^�4�C��-�-��Q�'�C��"�9��C��Q�s�O� �#�I�.��H���%�h�/���h������+�+rH���c��������������������(�����\�rS�rSrSrSS�jrS�rSrg)r ���i����d���Nc�����������������������Uc ��[��������5�������nXl��������UR������������������5��������H4��u��p#UR������������������5�������n[ ��������U�SU-��X2U�R ������������������4S�j5������ �M6��� �g�)Nz%s_openc�����������������������U"�XU5������$�rJ���r����)�rry��r����r����s��� rG����<lambda>�'ProxyHandler.__init__.<locals>.<lambda>��s�������Q�t�,rH���)r6����proxiesr����rz����setattrr����)r����r���r����rB���s��� rG���r�����ProxyHandler.__init__���sO�������?� �l�G��� ����I�D��:�:�<�D��D�)�d�*�$'�����-� .��)rH���c����������������������UR�������������������n[��������U5������u��pVpxUc��UnUR������������������(�������a��[��������UR������������������5������(�������a��g�U(�������aj��U(�������ac��[ ��������U5������<�S[ ��������U5������<�3n [ ��������R������������������"�U R������������������5�������5������R������������������S5������n UR������������������SSU -���5������ �[ ��������U5������nUR������������������X�5������ �XE:X��d��US:X��a��g�U�R������������������R������������������XR������������������S9$�)N�:�ascii�Proxy-authorization�Basic r����re��)r����r���r|����proxy_bypassr����base64� b64encode�encode�decoder����r����r5��rA���rD���)r����r��ry��r����� orig_type� proxy_typer���r���r��� user_pass�credss��� rG���r�����ProxyHandler.proxy_open ��s��������H�H� �/;�E�/B�,� �(���"�J��8�8��S�X�X�.�.���H�#*�4�=�#*�8�#4�6�I��$�$�Y�%5�%5�%7�8�?�?��H�E��N�N�0�(�U�2B�C��8�$��� � �h�+��"�i�7�&:����;�;�#�#�C���#�=�=rH���)r���rJ���)r����r����r����r����r:��r����r����r����r����rH���rG���r ���r ������s�������M� .�>rH���r ���c��������������������6�����\�rS�rSrS�rS�rS�rS S�jrS�rSr g) r!���i%��c�����������������������0�U�l���������g�rJ�����passwdr����s��� rG���r�����HTTPPasswordMgr.__init__'��s ��������rH���c����������������������^�^��[��������U[��������5������(�������a��U/nUT�R������������������;��a��0�T�R������������������U'���S�H,��m[��������UU�4S�jU�5�������5������nX44T�R������������������U���U'���M.��� �g�)N�TFc��������������3����H���>#� ���U��H��nTR������������������UT5������v�� �M��� �g�7frJ���)� reduce_uri)�.0�u�default_portr����s��� ��rG���� <genexpr>�/HTTPPasswordMgr.add_password.<locals>.<genexpr>1��s"���������� ?�:=�Q�����<�0�0�#�s����")r��r��r����tuple)r�����realmr^��r���r����reduced_urir���s���` @rG����add_password�HTTPPasswordMgr.add_password*��sg��������c�3����%�C�����#�!#�D�K�K���'�L��� ?�:=� ?��?�K�/3�n�D�K�K���{�+��(rH���c������������������������U�R�������������������R������������������U0�5������nS�HT��nU�R������������������X$5������nUR������������������5��������H,��u��pgU�H!��nU�R ������������������X�5������(�������d��M��Us �s �s �$�� �M.��� �MV��� �g)Nr����NN)r���r����r���r����� is_suburi) r����r����authuri�domainsr����reduced_authuri�uris�authinfor^��s ��� rG����find_user_password�"HTTPPasswordMgr.find_user_password5��sc�������+�+�/�/�%��,��'�L�"�o�o�g�D�O�")�-�-�/����C��~�~�c�;�;�'��� ��#2��(��rH���c������������������������[��������U5������nUS���(�������a��US���nUS���nUS���=(�������d�� �SnOSnUnSn[��������U5������u��pxU(�������a#��Uc ��Ub��SSS.R������������������U5������n U b��S Xy4-��nXV4$�) z@Accept authority or URI and extract only the authority and path.rS���r���r;���ra��N�P���i���r��z%s:%d)r���r���r����) r����r^��r����partsrf��r{��rY���r|����port�dports ��� rG���r����HTTPPasswordMgr.reduce_uri?��s���������� ����8��1�X�F��a��I���8�?�s�D���F��I��D�� �*� ���D�L�V�-?��!���s�6�{�� ��� �#�t�m�3� ���rH���c������������������v�����X:X��a��gUS���US���:w��a��gUS���nUSS�S:w��a��US- ��nUS���R������������������U5������$�)zSCheck if test is below base in a URI tree Both args must be URIs in reduced form. Tr���FrS���rP���Nra��)r����)r�����base�test�prefixs��� rG���r����HTTPPasswordMgr.is_suburiV��sT������ ��<����7�d�1�g����a����"�#�;�#���c�M�F��A�w�!�!�&�)�)rH���r���N)T) r����r����r����r����r����r���r���r���r���r����r����rH���rG���r!���r!���%��s������� =���.*rH���r!���c�������������������������\�rS�rSrS�rSrg)r"���ie��c������������������l�����[���������R������������������XU5������u��p4Ub��X44$�[���������R������������������U�S�U5������$�rJ���)r!���r���)r����r���r���r���r���s��� rG���r����2HTTPPasswordMgrWithDefaultRealm.find_user_passwordg��s=������(�;�;�D�<C�E������>�!��1�1�$��g�F�FrH���r����N)r����r����r����r����r���r����r����rH���rG���r"���r"���e��s������GrH���r"���c��������������������H���^���\�rS�rSrU�4S�jrSU�4S�jjrSS�jrS�rSrU�=r $�)r#���io��c������������������0���>��0�U�l���������[��������TU�] ��5������� �g�rJ���)� authenticated�superr����)r����� __class__s��� �rG���r�����%HTTPPasswordMgrWithPriorAuth.__init__q��s���������� ���rH���c������������������p���>��U�R������������������X%5������ �Ub��[��������TU�] ��S�X#U5������ �[��������TU�] ��XX45������ �g�rJ���)�update_authenticatedr���r���)r����r���r^��r���r����is_authenticatedr���s��� �rG���r����)HTTPPasswordMgrWithPriorAuth.add_passwordu��s7��������!�!�#�8����G� ��s�&�9� ���U��6rH���c�����������������������[��������U[��������5������(�������a��U/nS�H+��nU�H"��nU�R������������������XC5������nX R������������������U'���M$��� �M-��� �g��Nr���)r��r��r���r���)r����r^��r���r���r���r���s��� rG���r����1HTTPPasswordMgrWithPriorAuth.update_authenticated|��sF�������c�3����%�C�'�L���"�o�o�a�>��2B�"�"�;�/����(rH���c�����������������������S�HP��nU�R������������������X5������nU�R�������������������H,��nU�R������������������XC5������(�������d��M��U�R������������������U���s �s �$�� �MR��� �g�r���)r���r���r���)r����r���r���r���r^��s��� rG���r����-HTTPPasswordMgrWithPriorAuth.is_authenticated���sJ������'�L�"�o�o�g�D�O��)�)���>�>�#�7�7��-�-�c�2�2��*��(rH���)r���)F) r����r����r����r����r����r���r���r���r����� __classcell__)r���s���@rG���r#���r#���o��s��������7�C�3��3rH���r#���c��������������������~�����\�rS�rSr\R ������������������"�S\R������������������5������rSS�jrS�r S�r S�rS�rS �r \r\ rS rg)r$���i���z1(?:^|,)[ ]*([^ ,]+)[ ]+realm=(["']?)([^"']*)\2Nc������������������`�����Uc ��[��������5�������nXl��������U�R������������������R������������������U�l��������g�rJ���)r!���r���r���)r�����password_mgrs��� rG���r�����!AbstractBasicAuthHandler.__init__���s'��������*�,�L�"�� �K�K�4�4��rH���c��������������#����*��#� ���Sn[���������R������������������R������������������U5�������H?��nUR������������������5�������u��pEnUS;��a��[��������R ������������������"�S[��������S5������ �XF4v�� �SnMA��� �U(�������d$��U(�������a��UR������������������5�������S���nOSnUS�4v�� �g�g�7f)NF)�"�'zBasic Auth Realm was unquoted����Tr���rt���)r$����rx�finditer�groups�warnings�warn�UserWarning�split)r�����header�found_challenge�morf��r ���r���s��� rG����_parse_realm�%AbstractBasicAuthHandler._parse_realm���s�����������*�-�-�6�6�v�>�B�#%�9�9�;� �F�5��J�&�� � �=�)�1�.���/�!�"�O��?���������*�����4�.� ���s����BBc����������������������UR������������������U5������nU(�������d��g�S�nU�HN��nU�R������������������U5�������H6��u��pxUR������������������5�������S:w��a��UnM��Uc��M"��U�R������������������X#U5������s �s �$�� �MP��� �Ub��[ ��������SW<�35������eg�)N�basicz@AbstractBasicAuthHandler does not support the following scheme: )�get_allr���rz����retry_http_basic_authr����) r�����authreqr|���r��rh����unsupportedr���rf��r���s ��� rG����http_error_auth_reqed�.AbstractBasicAuthHandler.http_error_auth_reqed���s���������/�/�'�*�������F�!%�!2�!2�6�!:� ���<�<�>�W�,�"(�K���$�� �5�5�d��G�G��";�����"�� &�)��*�� *��#rH���c����������������������U�R�������������������R������������������X15������u��pEUb���U<�SU<�3nS[��������R������������������"�UR ������������������5�������5������R������������������S5������-���nUR ������������������U�R������������������S�5������U:X��a��g�UR������������������U�R������������������U5������ �U�R������������������R������������������X"R������������������S9$�g�)Nr���r���r���re��)r���r���r���r���r���r���rw����auth_headerr����r5��rA���rD���)r����r|���r��r���r����pw�raw�auths��� rG���r����.AbstractBasicAuthHandler.retry_http_basic_auth���s��������;�;�1�1�%�>��� �>�!�2�&�C��f�.�.�s�z�z�|�<�C�C�G�L�L�D��~�~�d�.�.��5��=���'�'��(8�(8�$�?��;�;�#�#�C���#�=�=�rH���c�����������������������[��������U�R������������������S5������(�������a*��U�R������������������R������������������UR������������������5������(�������d��U$�UR ������������������S5������(�������d���U�R������������������R������������������S�UR������������������5������u��p#SR ������������������X#5������R������������������5�������n[��������R������������������"�U5������R������������������5�������nUR������������������SSR ������������������UR������������������5�������5������5������ �U$�)Nr���� Authorizationz{0}:{1}zBasic {}) r����r���r���rv���r����r���r����r���r����standard_b64encoder���r�����strip)r����r��r���r����credentials�auth_strs��� rG����http_request�%AbstractBasicAuthHandler.http_request���s�����������%7�8�8��{�{�+�+�C�L�L�9�9��J��~�~�o�.�.��;�;�9�9�$����M�L�D�#�*�*�4�8�?�?�A�K��0�0��=�D�D�F�H��'�'��(2�(9�(9�(�.�.�:J�(K� M�� rH���c����������������������[��������U�R������������������S5������(�������ah��SUR������������������s=::��a��S:��a+��O �O(U�R������������������R������������������UR������������������S5������ �U$�U�R������������������R������������������UR������������������S5������ �U$�)Nr���r@��rA��TF)r����r���rB��r���rv���)r����r��r����s��� rG���rD���&AbstractBasicAuthHandler.http_response���sc�������4�;�;� 2�3�3��h�m�m�)�c�)����0�0����t�D��������0�0����u�E��rH���)r���r���rJ���)r����r����r����r�����re�compile�Ir���r����r���r���r���r���rD��� https_requestrG��r����r����rH���rG���r$���r$������sJ������� ����1���D�D� �B�5�!�(*�4 ����!�M�"�NrH���r$���c�������������������������\�rS�rSrSrS�rSrg)r%���i���r���c������������������D�����UR�������������������nU�R������������������SXaU5������nU$�)N�www-authenticate)rv���r���)r����r��rg���rB��rC��rh���rB���r����s��� rG����http_error_401�#HTTPBasicAuthHandler.http_error_401��s(�������l�l���-�-�.@�*-�G�=���rH���r����N)r����r����r����r����r���r ��r����r����rH���rG���r%���r%������s������!�K�rH���r%���c�������������������������\�rS�rSrSrS�rSrg)r&���i��r���c������������������D�����UR�������������������nU�R������������������SXaU5������nU$��N�proxy-authenticate)r|���r���)r����r��rg���rB��rC��rh���r{��r����s��� rG����http_error_407�$ProxyBasicAuthHandler.http_error_407��s+������ ��H�H� ��-�-�.B�*3�'�C���rH���r����N)r����r����r����r����r���r��r����r����rH���rG���r&���r&�����s������'�K�rH���r&���c��������������������H�����\�rS�rSrSS�jrS�rS�rS�rS�rS�r S �r S �rSrg) r'���i��Nc�����������������������Uc ��[��������5�������nXl��������U�R������������������R������������������U�l��������SU�l��������SU�l��������S�U�l��������g��Nr���)r!���r���r����retried�nonce_count� last_nonce)r����r���s��� rG���r�����"AbstractDigestAuthHandler.__init__&��s<�������>�$�&�F��� �K�K�4�4�����������rH���c�����������������������SU�l���������g�r��)r��r����s��� rG����reset_retry_count�+AbstractDigestAuthHandler.reset_retry_count/��s ��������rH���c������������������h����UR������������������US�5������nU�R������������������S:���a��[��������UR������������������SSUS�5������eU�=R������������������S- ��sl��������U(�������a[��UR ������������������5�������S���nUR������������������5�������S:X��a��U�R ������������������X55������$�UR������������������5�������S:w��a��[��������SU-��5������eg�g�) N����i���zdigest auth failedrS���r����digestr���zEAbstractDigestAuthHandler does not support the following scheme: '%s')r����r��r���rv���r���rz����retry_http_digest_authr����)r����r���r|���r��rh���r���rf��s��� rG���r����/AbstractDigestAuthHandler.http_error_auth_reqed2��s��������+�+�k�4�0���<�<�!����C�L�L�#�/C�#�T�+�� +�� �L�L�A��L���]�]�_�Q�'�F��|�|�~��)��2�2�3�@�@�����7�*� ��"?�AG�"H��I��I��+� �rH���c������������������z����UR������������������SS5������u��p4[��������[��������S�[��������U5������5������5������nU�R ������������������X5������nU(�������aq��SU-��nUR ������������������R ������������������U�R������������������S�5������U:X��a��g�UR������������������U�R������������������U5������ �U�R������������������R������������������XR������������������S9nU$�g�)NrS��rS���z Digest %sre��)r����parse_keqv_list�filter�parse_http_list�get_authorizationrh���r����r���r����r5��rA���rD���)r����r��r����token� challenge�chal�auth_val�resps��� rG���r���0AbstractDigestAuthHandler.retry_http_digest_authF��s��������:�:�c�1�-����v�d�O�I�,F�G�H���%�%�c�0���"�T�)�H��{�{���t�/�/��6�(�B���'�'��(8�(8�(�C��;�;�#�#�C���#�=�D��K� �rH���c������������������������U�R�������������������<�SU<�S[��������R������������������"�5�������<�S3nUR������������������S5������[ ��������S5������-���n[ ��������R������������������"�U5������R������������������5�������nUS�S�$�)Nr���r�����������)r���time�ctimer����_randombytes�hashlib�sha1� hexdigest)r�����nonce�s�b�digs��� rG���� get_cnonce�$AbstractDigestAuthHandler.get_cnonceR��sT������� �+�+�U�D�J�J�L�A�� �H�H�W���Q��/���l�l�1�o�'�'�)���3�B�x�rH���c�����������������������US���nUS���nUR������������������S5������nUR������������������SS5������nUR������������������SS�5������nU�R������������������U5������u��p�Uc��g�U�R������������������R ������������������X1R ������������������5������u��p�U c��g�UR������������������b��U�R������������������UR������������������U5������nOS�nU <�SU<�SU<�3n UR������������������5�������<�SUR������������������<�3nUc��U "�U"�U 5������U<�SU"�U5������<�35������nO�SUR������������������S 5������;���a}��X@R������������������:X��a��U�=R������������������S - ��sl��������O S U�l��������X@l��������SU�R������������������-��nU�R������������������U5������nU<�SU<�SU<�SS<�SU"�U5������<�3 nU "�U"�U 5������U5������nO[��������SU-��5������eS U <�SU<�SU<�SUR������������������<�SU<�S3nU(�������a��USU-��- ��nU(�������a��USU-��- ��nUSU-��- ��nU(�������a��USW<�SW<�S3- ��nU$�!�[���������a�� ��g�f�=�f)Nr���r5���qop� algorithm�MD5�opaquer���r����,rS���z%08xzqop '%s' is not supported.z username="z ", realm="z ", nonce="z", uri="z ", response="r���z , opaque="%s"z , digest="%s"z, algorithm="%s"z, qop=auth, nc=z , cnonce=")r�����KeyError�get_algorithm_implsr���r���rv���rC����get_entity_digestr����r����r���r��r��r9��r���)r����r��r(��r���r5��r<��r=��r?���H�KDr���r����entdig�A1�A2�respdig�ncvalue�cnonce�noncebitr���s��� rG���r%���+AbstractDigestAuthHandler.get_authorization]��s������ ���M�E���M�E��(�(�5�/�C�����e�4�I���X�X�h��-�F���(�(��3����9���;�;�1�1�%���F����<����8�8���+�+�C�H�H�d�;�F��F���� +�����(����&�� ��;���2��5�!�B�%� 8�9�G� �s�y�y��~� %����'�� � �A�%� �#$�� �"'���t�/�/�/�G��_�_�U�+�F�+0�'�6�6�1�R�5�Q�H���2���)�G���7�#�=�>�>�� �#'��u�c�l�l�")�+�����O�f�,�,�D���O�f�,�,�D��"�Y�.�.������H�H�D����g��� �� �s����?G;��; H�Hc������������������\���^��US:X��a��S�mOUS:X��a��S�mO[��������SU-��5������eU4S�jnTU4$�)Nr>��c������������������h�����[���������R������������������"�U�R������������������S5������5������R������������������5�������$��Nr���)r2���md5r���r4����xs��� rG���r����?AbstractDigestAuthHandler.get_algorithm_impls.<locals>.<lambda>���s������'�+�+�a�h�h�w�&7�8�B�B�DrH����SHAc������������������h�����[���������R������������������"�U�R������������������S5������5������R������������������5�������$�rP��)r2��r3��r���r4��rR��s��� rG���r���rT�����s������'�,�,�q�x�x��'8�9�C�C�ErH���z.Unsupported digest authentication algorithm %rc������������������"���>��T"�U�<�SU<�35������$�)Nr���r����)r6���drD��s��� �rG���r���rT�����s�������!�q�!�,�-rH���)r����)r����r=��rE��rD��s��� @rG���rB���-AbstractDigestAuthHandler.get_algorithm_impls���sG����������D�A� �%� �E�A����,�.7�8��9�� 9� -���"�u�rH���c�����������������������g�rJ���r����)r����rC���r(��s��� rG���rC���+AbstractDigestAuthHandler.get_entity_digest���s������rH���)r���r��r��r���r��rJ���) r����r����r����r����r����r��r���r��r9��r%��rB��rC��r����r����rH���rG���r'���r'�����s,��������I�( � �<�|�rH���r'���c��������������������&�����\�rS�rSrSrSrSrS�rSrg)r(���i���z�An authentication protocol defined by RFC 2069 Digest authentication improves on basic authentication because it does not transmit passwords in the clear. r�������c������������������|�����[��������UR������������������5������S���nU�R������������������SXaU5������nU�R������������������5������� �U$�)NrS���r ��)r���rv���r���r���r����r��rg���rB��rC��rh���r|����retrys��� rG���r ���$HTTPDigestAuthHandler.http_error_401���s>����������%�a�(���*�*�+=�+/�g�?����� ��rH���r����N) r����r����r����r����rF��r���r:��r ��r����r����rH���rG���r(���r(������s��������"�K��M�rH���r(���c��������������������"�����\�rS�rSrSrSrS�rSrg)r)���i����Proxy-Authorizationr]��c������������������d�����UR�������������������nU�R������������������SXaU5������nU�R������������������5������� �U$�r��)r|���r���r��r_��s��� rG���r���%ProxyDigestAuthHandler.http_error_407���s4�������x�x���*�*�+?�+/�g�?����� ��rH���r����N)r����r����r����r����r���r:��r��r����r����rH���rG���r)���r)������s������'�K��M�rH���r)���c��������������������6�����\�rS�rSrS S�jrS�rS�rS�rS�rSr g) �AbstractHTTPHandleri���Nc������������������j�����Ub��Xl��������g�[���������R������������������R������������������R������������������U�l��������g�rJ���)r��r'���HTTPConnection� debuglevel�_debuglevel)r����rj��s��� rG���r�����AbstractHTTPHandler.__init__���s$������)3�)?�:��T�[�[�E_�E_�Ej�Ej��rH���c�����������������������Xl���������g�rJ����rk��)r�����levels��� rG����set_http_debuglevel�'AbstractHTTPHandler.set_http_debuglevel���s������ �rH���c�����������������������[���������R������������������R������������������R������������������UR������������������UR������������������5�������5������$�rJ���)r��r'��ri���_get_content_lengthrC���r�����r����r{���s��� rG���rs���'AbstractHTTPHandler._get_content_length���s2�������{�{�)�)�=�=��L�L���� �"�� "rH���c������������������Z����UR�������������������nU(�������d��[��������S5������eUR������������������b���UR������������������n[��������U[��������5������(�������a ��Sn[��������U5������eUR ������������������S5������(�������d��UR������������������SS5������ �UR ������������������S5������(�������dX��UR ������������������S5������(�������dB��U�R������������������U5������nUb��UR������������������S[ ��������U5������5������ �OUR������������������SS5������ �UnUR������������������5�������(�������a$��[��������UR������������������5������u��px[��������U5������u��piUR ������������������S5������(�������d��UR������������������SU5������ �U�R������������������R�������������������H>��u��p�U R������������������5�������n UR ������������������U 5������(�������a��M-��UR������������������X�5������ �M@��� �U$�) N� no host givenz\POST data should be bytes, an iterable of bytes, or a file object. It cannot be of type str.zContent-type�!application/x-www-form-urlencodedr�����Transfer-encoding�chunkedru���)r|���r���rC���r��r��r����r����r����rs��r����r���r����r ���r5��r����r����)r����r{���r|���rC���rC���content_length�sel_hostrf���sel�sel_pathr]���r����s��� rG����do_request_�AbstractHTTPHandler.do_request_���sw������|�|����?�+�+��<�<�#��<�<�D��$��$�$�D����n�$��%�%�n�5�5��/�/�"�7�9���&�&�'7�8�8�#�.�.�/B�C�C�!%�!9�!9�'�!B��!�-��3�3�,�c�.�.A�C���3�3�/��<���������$�W�%5�%5�6�K�F�!+�C���H��!�!�&�)�)��+�+�F�H�=��;�;�1�1�K�D��?�?�$�D��%�%�d�+�+��/�/��<��2� ��rH���c����������� �����������UR�������������������nU(�������d��[��������S5������eU"�U4SUR������������������0UD6nUR������������������U�R������������������5������ �[��������UR������������������5������nUR������������������UR������������������R������������������5��������VVs0�s�H��u��pxXv;��d��M��Xx_M��� �snn5������ �SUS'���UR������������������5��������V V s0�s�H��u��p�U R������������������5�������U _M��� �nn n UR������������������(�������a+��0�nSnX�;���a��Xl���X�'���Xl �UR������������������UR������������������US9 ���UR������������������UR������������������5�������UR������������������UR ������������������UUR#������������������S5������S9 �UR'������������������5�������nUR*������������������(�������a!��UR*������������������R)������������������5������� �S Ul��������UR-������������������5�������Ul��������UR0������������������Ul��������U$�s �snnf�s �sn n f�!�[$���������a��n [��������U 5������eS n A ff�=�f!� �UR)������������������5������� �e�=�f) z�Return an HTTPResponse object for the request, using http_class. http_class must implement the HTTPConnection API from http.client. rw��rD���r����� Connectionrc���rh���ry��)�encode_chunkedN)r|���r���rD����set_debuglevelrk��r��r�����updaterh���r�����titler����� set_tunnelr{���r����r����rC���r����rq����getresponser�����sockr����rB����reasonrC��)r����� http_classr���http_conn_argsr|���r0��rh���rX��rY��r]���r�����tunnel_headers�proxy_auth_hdr�errr���s��� rG���r�����AbstractHTTPHandler.do_open���s������ ��x�x����?�+�+�� �t�C�S�[�[�C�N�C�� ����)�)�*��s�,�,�-��������):�):�)<��-�)<����+�����)<��-�� .��!(����6=�m�m�o�F�o���4�:�:�<��$�o��F�����N�2�N��(�18�1H��.���+� �L�L��)�)�>�L�B� � $�� � �#�.�.�*�C�L�L�#�(�(�G�),���8K�)L����N��� � ��A�� �6�6� �F�F�L�L�N��A�F�� � �"������������e-���G�� ��� $��s�m�#�� $�� � �G�G�I��s=����G �G �G�AG��#G6�� G3�#G.�.G3�3G6��6H rn��rJ���) r����r����r����r����r����rp��rs��r��r����r����r����rH���rG���rg��rg�����s������k�!�"� $�L@rH���rg��c��������������������2�����\�rS�rSrS�r\R������������������rSrg)r*���iA��c������������������V�����U�R������������������[��������R������������������R������������������U5������$�rJ���)r����r��r'��ri���r����r��s��� rG���� http_open�HTTPHandler.http_openC��s�������|�|�D�K�K�6�6��<�<rH���r����N) r����r����r����r����r���rg��r��r���r����r����rH���rG���r*���r*���A��s������=��'�2�2�LrH���r*���r&��c��������������������<�����\�rS�rSrSS�jrS�r\R������������������rSr g)r?���iJ��Nc������������������*����Ub��UO#[���������R������������������R������������������R������������������n[��������R������������������X5������ �UcC��[���������R������������������R������������������R������������������n[���������R������������������R������������������U5������nUb��X2l��������X l ��������g�rJ���) r��r'��r&��rj��rg��r����� _http_vsn�_create_https_context�check_hostname�_context)r����rj��r=���r����http_versions��� rG���r�����HTTPSHandler.__init__L��sk������'1�'=��4�;�;�C^�C^�Ci�Ci�J��(�(��:���#�{�{�:�:�D�D���+�+�;�;�L�I���)�)7�&�#�MrH���c������������������h�����U�R������������������[��������R������������������R������������������UU�R������������������S9$�)Nr<���)r����r��r'��r&��r���r���s��� rG���� https_open�HTTPSHandler.https_openV��s-�������<�<���� ;� ;�S�(,� � �� ��7�� 7rH���)r����NNN) r����r����r����r����r����r���rg��r��r��r����r����rH���rG���r?���r?���J��s������ $� 7��,�7�7� rH���r?���c��������������������2�����\�rS�rSrSS�jrS�rS�r\r\rSr g)r���i^��Nc������������������R�����SS�K�nUc��UR������������������R������������������5�������nXl��������g�r��)�http.cookiejar� cookiejar� CookieJar)r����r���r��s��� rG���r�����HTTPCookieProcessor.__init___��s"������������0�0�2�I�"�rH���c������������������<�����U�R�������������������R������������������U5������ �U$�rJ���)r����add_cookie_headerrt��s��� rG���r���� HTTPCookieProcessor.http_requeste��s���������(�(��1��rH���c������������������<�����U�R�������������������R������������������X!5������ �U$�rJ���)r����extract_cookies)r����r{���r����s��� rG���rD���!HTTPCookieProcessor.http_responsei��s���������&�&�x�9��rH���)r���rJ���) r����r����r����r����r����r���rD��r��rG��r����r����rH���rG���r���r���^��s������#����!�M�"�NrH���r���c�������������������������\�rS�rSrS�rSrg)r/���ip��c������������������6�����UR�������������������n[��������SU-��5������e)Nzunknown url type: %s)r����r���)r����r��r����s��� rG���r���UnknownHandler.unknown_openq��s�������x�x���-��4�5�5rH���r����N)r����r����r����r����r��r����r����rH���rG���r/���r/���p��s������6rH���r/���c������������������z�����0�nU��H2��nUR������������������SS5������u��p4US���S:X��a��US���S:X��a��USS�nXAU'���M4��� �U$�)z>Parse list of key=value strings where keys are not duplicated.�=rS���r���r���rP���)r���)�l�parsed�eltrX��rY��s��� rG���r"��r"��u��sQ������ �F����y�y��a� ����Q�4�3�;�1�R�5�C�<��!�B��A��q� � �� ��MrH���c������������������F����/�nSnS=p4U��HX��nU(�������a��X%- ��nSnM��U(�������a��US:X��a��SnM#��US:X��a��SnX%- ��nM1��US:X��a��UR������������������U5������ �SnML��US:X��a��SnX%- ��nMZ��� �U(�������a��UR������������������U5������ �U�Vs/�s�H��o"R������������������5�������PM��� �sn$�s �snf�)aX��Parse lists as described by RFC 2068 Section 2. In particular, parse comma-separated lists where the elements of the list may include quoted-strings. A quoted-string could contain a comma. A non-quoted string could have quotes in the middle. Neither commas nor quotes count if they are escaped. Only double-quotes count, not single-quotes. rt���F�\Tr���r@��)r_���r���)r6���res�part�escaper ����curs��� rG���r$��r$����s�������� �C� �D���F�����K�D��F����d�{����������K�D���#�:��J�J�t���D���#�:��E����-��2��� � �4��%(�)�S�T�J�J�L�S�)�)��)s����Bc��������������������*�����\�rS�rSrS�rSrS�rS�rSrg)r+���i���c�����������������������UR�������������������nUS�S�S:X��aT��USS�S:w��aK��UR������������������(�������a:��UR������������������S:w��a*��UR������������������U�R������������������5�������;��a��[��������S5������eg�U�R ������������������U5������$�)Nr;���rw��r���ra��� localhost�-file:// scheme is supported only on localhost)r����r|���� get_namesr����open_local_file)r����r��rB���s��� rG���� file_open�FileHandler.file_open���sm�������l�l���r��7�d�?�s�1�Q�x�3��C�H�H����K�'��8�8�t�~�~�/�/��N�O�O��0���'�'��,�,rH���Nc����������������������[���������R������������������ci���[��������[��������R������������������"�S5������S���[��������R������������������"�[��������R ������������������"�5�������5������S���-���5������[���������l��������[���������R������������������$�[���������R������������������$�!�[��������R�������������������a2�� �[��������R������������������"�S5������4[���������l���������[���������R������������������$�f�=�f)Nr���r;���)r+����namesr���r#���gethostbyname_ex�gethostname�gaierror� gethostbynamer����s��� rG���r����FileHandler.get_names���s����������$� I�$)��+�+�K�8��;��+�+�F�,>�,>�,@�A�!�D�E�%F��!� �� � � �{� � � ����?�?�� I�%+�%9�%9�+�%F�$H��!�� � � � I�s����AB��4C�Cc������������������r����SS�K�nSS�KnUR������������������nUR������������������n[ ��������U5������n�[ ��������R������������������"�U5������nUR������������������nUR������������������R������������������UR������������������SS9n UR������������������U5������S���n UR������������������"�SU =(�������d�� �SX�4-��5������nU(�������a ��[��������U5������u��pLU(�������a$��W(�������dH��[��������U5������U�R������������������5�������;���a+��U(�������a ��SU-���U-���n OSU-���n [!��������[#��������US5������X�5������$�['��������S5������e!�[$���������a��n['��������U5������eS�nAff�=�f) Nr���T��usegmtz6Content-type: %s Content-length: %d Last-modified: %s � text/plain�file://�rbzfile not on local host)�email.utils� mimetypesr|���r����r5���rX����stat�st_size�utils� formatdate�st_mtime� guess_type�message_from_stringr����_safe_gethostbynamer���r���rA���rq���r���)r����r���emailr���r|���rd���� localfile�statsrl����modified�mtyperh���r����origurl�exps��� rG���r����FileHandler.open_local_file���s��������x�x���<�<�� ��*� � ��G�G�I�&�E��=�=�D��{�{�-�-�e�n�n�T�-�J�H��(�(��2�1�5�E��/�/�K��&�,��7�8�9�G���'��-� ����1�$�7�4�>�>�;K�K��'�$�.��9�G�'�(�2�G�!�$�y�$�"7��J�J���/�0�0����� ��3�-��� �s����C#D�� D6�&D1�1D6r����) r����r����r����r����r���r���r���r���r����r����rH���rG���r+���r+������s������-�� �E�!�1rH���r+���c������������������d������[���������R������������������"�U�5������$�!�[���������R�������������������a�� ��g�f�=�frJ���)r#��r���r���)r|���s��� rG���r���r������s.��������#�#�D�)�)���?�?�����s������/�/c�������������������� �����\�rS�rSrS�rS�rSrg)r,���i���c����������������������SS�K�nSS�KnUR������������������nU(�������d��[��������S5������e[ ��������U5������u��pEUc ��UR ������������������nO[ ��������U5������n[��������U5������u��pdU(�������a��[��������U5������u��pgOS�n[��������U5������nU=(�������d�� �SnU=(�������d�� �Sn�[��������R������������������"�U5������n[��������UR������������������5������u��p�U R������������������S5������n[!��������[#��������[��������U5������5������nUS�S�US���p�U(�������a��US���(�������d��USS��n�U�R%������������������XgXEX�R&������������������5������n U=(�������a�� �S=(�������d�� �SnU �H?��n[)��������U5������u��nnUR+������������������5�������S :X��d��M'��US ;���d��M/��UR-������������������5�������nMA��� �U R/������������������X�5������u��nnSnUR1������������������UR2������������������5������S���nU(�������a��USU-��- ��nUb��US:���a��USU-��- ��n[4��������R6������������������"�U5������n[9��������UUUR2������������������5������$�!�[���������a��n[��������U5������eS�nAff�=�f!�UR:�������������������a��n[��������U5������UeS�nAff�=�f) Nr����ftp error: no host givenrt���ra��rP���rS���r���Dr������a�Ar����r��rX��r���zContent-type: %s zContent-length: %d )�ftplibr���r|���r���r����FTP_PORTr`���r���r���r���r#��r���rq���r���r����r���r�����map�connect_ftprD���r���rz����upper�retrfiler���rv���r���r���r���� all_errors)r����r��r���r���r|���r���r���r���rC��rY����attrs�dirsrL����fwr�����attrr����rg����retrlenrh���r���r���s��� rG����ftp_open�FTPHandler.ftp_open���s��������x�x����5�6�6���%� ���<��?�?�D��t�9�D�� ��%� ���'��-�L�D�&��F��t�}���z�r����2�� ��'�'��-�D��!����.����z�z�#����C���&�'���#�2�Y��R��d���Q�����8�D� )��!�!�$��D�+�+�N�B��<�C�&�3�D���)�$�/���e��:�:�<�6�)��:�:� �;�;�=�D� �� ��+�+�d�1�K�B���G��(�(����6�q�9�E���/�%�7�7���"�w�!�|��1�G�;�;���/�/��8�G��b�'�3�<�<�8�8��1��� ��3�-��� ��2�� � �� )��3�-�S�(�� )�s>����H��AH ��&H ��.BH �� H� H�H� I�0H<�<Ic����������� ������������[��������XX4XVSS9$�)NF)� persistent)� ftpwrapper)r����r���r���r|���r���r���rD���s��� rG���r����FTPHandler.connect_ftp��s�������$��D�%*�,�� ,rH���r����N)r����r����r����r����r���r���r����r����rH���rG���r,���r,������s ������2)�h,rH���r,���c��������������������8�����\�rS�rSrS�rS�rS�rS�rS�rS�r Sr g ) r-���i��c������������������J�����0�U�l���������0�U�l��������SU�l��������SU�l��������SU�l��������g�)Nr����<���r.��)�cacherD����soonest�delay� max_connsr����s��� rG���r�����CacheFTPHandler.__init__��s%�������� ��������� ���rH���c�����������������������Xl���������g�rJ���)r��)r�����ts��� rG���� setTimeout�CacheFTPHandler.setTimeout&��s������� rH���c�����������������������Xl���������g�rJ���)r��)r����rV��s��� rG����setMaxConns�CacheFTPHandler.setMaxConns)��s�������rH���c������������������z����XUSR������������������U5������U4nXpR������������������;���a0��[��������R������������������"�5�������U�R������������������-���U�R������������������U'���OI[��������XX4XV5������U�R������������������U'���[��������R������������������"�5�������U�R������������������-���U�R������������������U'���U�R ������������������5������� �U�R������������������U���$�)Nra��)�joinr��r/��r��rD���r����check_cache)r����r���r���r|���r���r���rD���r����s��� rG���r����CacheFTPHandler.connect_ftp,��s��������$�������7���*�*�� $� � ��d�j�j� 8�D�L�L���(��t�)-�8�D�J�J�s�O� $� � ��d�j�j� 8�D�L�L��������z�z�#��rH���c�����������������������[���������R�������������������"�5�������nU�R������������������U::��aj��[��������U�R������������������R ������������������5�������5�������HC��u��p#X1:��d��M��U�R ������������������U���R ������������������5������� �U�R ������������������U �U�R������������������U �ME��� �[��������[��������U�R������������������R������������������5�������5������5������U�l��������[��������U�R ������������������5������U�R������������������:X��a���[��������U�R������������������R ������������������5�������5�������H0��u��p#X0R������������������:X��d��M��U�R ������������������U �U�R������������������U � �O� �[��������[��������U�R������������������R������������������5�������5������5������U�l��������g�g�rJ���)r/��r��r����rD���r����r��r�����min�valuesrb���r��)r����r��rX��rY��s��� rG���r���CacheFTPHandler.check_cache7��s������I�I�K���<�<�1���T�\�\�/�/�1�2����5��J�J�q�M�'�'�)�� � �1� ����Q�� �3� ��4���� 3� 3� 5�6�7�����t�z�z�?�d�n�n�,��T�\�\�/�/�1�2������$�� � �1� ����Q��� �3� ��t�D�L�L�$7�$7�$9�:�;�D�L� �-rH���c������������������������U�R�������������������R������������������5��������H��nUR������������������5������� �M��� �U�R�������������������R������������������5������� �U�R������������������R������������������5������� �g�rJ���)r��r��r�����clearrD���)r�����conns��� rG����clear_cache�CacheFTPHandler.clear_cacheK��sB�������J�J�%�%�'�D��J�J�L��(�� � ���������rH���)r��r��r��r��rD���N)r����r����r����r����r����r��r��r���r��r��r����r����rH���rG���r-���r-�����s ��������� �<�(rH���r-���c�������������������������\�rS�rSrS�rSrg)r.���iQ��c������������������|����UR�������������������nUR������������������SS5������u��p4UR������������������SS5������u��pT[��������U5������nUR������������������S5������(�������a��[��������R ������������������"�U5������nUS�S�nU(�������d��Sn[��������R������������������"�SU[��������U5������4-��5������n[��������[��������R������������������"�U5������Xb5������$�)Nr���rS���r@��z;base64i�����text/plain;charset=US-ASCIIz$Content-type: %s Content-length: %d )rv���r���r����endswithr����decodebytesr���r���rb���r����io�BytesIO)r����r��rB���rf��rC���� mediatyperh���s��� rG���� data_open�DataHandler.data_openR��s���������l�l���y�y��Q�'����*�*�S��+�� �� ��%�����i�(�(��%�%�d�+�D�!�#�2��I��5�I��+�+�,T� ��D� �"�-#��$����"�*�*�T�*�G�9�9rH���r����N)r����r����r����r����r"��r����r����rH���rG���r.���r.���Q��s������:rH���r.���rM���nt)r5���r4���c�����������������������U�SS�S:X��a��U�SS�n�OU�SS�S:X��a��U�SS�n�[���������R������������������"�5�������n[���������R������������������"�5�������n[��������XUS9$�) zwOS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.Nr���z///r;�������z//localhost/�����rb���errors)r ���getfilesystemencoding�getfilesystemencodeerrorsr�����pathnamerb��r)��s��� rG���r5���r5���x��sa��������B�Q�<�5� �� ���|�H� �c�r�]�n� ,����}�H��,�,�.���.�.�0���x�6�B�BrH���c�����������������������U�SS�S:X��a��SU�-���n�[���������R������������������"�5�������n[���������R������������������"�5�������n[��������XUS9$�)zwOS-specific conversion from a file system path to a relative URL of the 'file' scheme; not recommended for general use.Nr;���rw��r(��)r ��r*��r+��r ���r,��s��� rG���r4���r4������sF��������B�Q�<�4����h��H��,�,�.���.�.�0���X��@�@rH���c��������������������������\�rS�rSrSrSrS\-��rSS�jrS�r S�r S�rS �rSS �jr SS�jrSS�jrSS �jrS�rSS�jrSS�jrS�r\(�������a��S�rSS�jrS�rS�rS�rSS�jrSrg)r9���i���a��Class to open URLs. This is a class rather than just a subroutine because we may need more than one set of global protocol-specific options. Note -- this is a base class for those who don't want the automatic handling of errors type 302 (relocated) and 401 (authorization needed).Nr����c������������������r����SSU�R�������������������R������������������0-��n[��������R������������������"�U[��������SS9 �Uc ��[��������5�������nXl��������UR������������������S5������U�l��������UR������������������S5������U�l ��������SU�R������������������4S/U�l��������/�U�l��������[��������R������������������U�l��������S�U�l��������["��������U�l��������g�) NzW%(class)s style of invoking requests is deprecated. Use newer urlopen functions/methods�classr���)� stacklevel�key_file� cert_filez User-Agent)�Acceptz*/*)r���r����r���r����DeprecationWarningr6���r���r����r3��r4���versionr�����_URLopener__tempfilesrX���rp����_URLopener__unlink� tempcache�ftpcache)r����r����x509rC��s��� rG���r�����URLopener.__init__���s�������4�7>����@W�@W�6X�Y��� � �c�-�!�<��?� �l�G�������,�� ����+�.���(�$�,�,�7�9J�K������� � �� �����!�� rH���c������������������$�����U�R������������������5������� �g�rJ���)r����r����s��� rG����__del__�URLopener.__del__���s������� � �rH���c������������������$�����U�R������������������5������� �g�rJ���)�cleanupr����s��� rG���r�����URLopener.close���s���������rH���c����������������������U�R�������������������(�������a4��U�R��������������������H��n�U�R������������������U5������ �M��� �U�R�������������������S�S�2 �U�R������������������(�������a��U�R������������������R ������������������5������� �g�g�!�[���������a�� ��Mb��f�=�frJ���)r8��r9��rq���r:��r��)r����rL���s��� rG���rB���URLopener.cleanup���sn�����������(�(����M�M�$�'��)� �� � ��#��>�>��N�N� � �"����������s����A3�3 B��Bc������������������:�����U�R�������������������R������������������U5������ �g)z\Add a header to be used by the HTTP interface only e.g. u.addheader('Accept', 'sound/basic')N)r����r_���)r����r��s��� rG���� addheader�URLopener.addheader���s������� �����t�$rH���c�����������������������[��������[��������U5������5������n[��������USS9nU�R������������������(�������a8��XR������������������;���a)��U�R������������������U���u��p4[ ��������US5������n[��������XTU5������$�[ ��������U5������u��pgU(�������d��SnX`R������������������;���a-��U�R������������������U���n[ ��������U5������u��pi[��������U 5������u��p�X�4nOSnSU-���nX`l ��������UR������������������SS5������n[��������X5������(�������a��US :X��a*��U(�������a��U�R������������������X�U5������$�U�R������������������X5������$��Uc��[��������X5������"�U5������$�[��������X5������"�Xr5������$�!�[��������[ ��������4�a�� �e�["���������a��n [#��������S U 5������U eSn A ff�=�f)z6Use URLopener().open(file) instead of open(file, 'r').z%/:=&?~#+!$,;'@()*[]|�rc��r���rL���N�open_�-r����r���zsocket error)r ���r���r ���r:��rA���r���r���r���r ���r����rT��r�����open_unknown_proxy�open_unknownr����r���r���rq���)r����r��rC���rd���rh���rg����urltyperB���ry��� proxyhostr|���r����r]���rC��s��� rG���rA����URLopener.open���s[�������7�+�,����&=�>���>�>�g���7� $���w� 7��H��h��%�B��b�7�3�3�!�'�*�����G��l�l�"��L�L��)�E�!+�E�!2��G�'� �2�N�D��/�C��E��� ��� ��|�|�C��%���t�"�"�d�.?�&?���.�.�u�t�D�D��(�(��7�7� 8��|��t�*�3�/�/��t�*�3�5�5���8�$�� ���� 8��.�#�.�C�7�� 8�s����D?��.D?��?E+� E&�&E+c������������������6�����[��������U5������u��p4[��������SSU5������e)�/Overridable interface to open unknown URL type.� url errorzunknown url type�r���rq���)r����r��rC���r����rB���s��� rG���rN���URLopener.open_unknown���s�������w�'� ���k�#5�t�<�<rH���c������������������<�����[��������U5������u��pE[��������SSU-��U5������e)rS��rT��zinvalid proxy for %srU��)r����ry��r��rC���r����rB���s��� rG���rM���URLopener.open_unknown_proxy���s#�������w�'� ���k�#9�D�#@�%�H�HrH���c����������������������[��������[��������U5������5������nU�R������������������(�������a��XR������������������;���a��U�R������������������U���$�[��������U5������u��pVUcX��U(�������a��US:X��aK���U�R ������������������U5������nUR������������������5�������nUR ������������������5������� �[��������[��������U5������S���5������U4$�U�R������������������X5������n�UR������������������5�������n U(�������a ��[��������US5������n O�[��������U5������u��p�[��������U=(�������d�� �S5������u��p�[��������U=(�������d�� �S5������u��p�[��������U=(�������d�� �S5������u��p�[��������R������������������R������������������U5������S���n [ ��������R"������������������"�U 5������u��p�U�R$������������������R'������������������U5������ �[��������R(������������������"�US5������n �X)4nU�R������������������b��X�R������������������U'���SnSnSnSnSU ;���a��[+��������U S ���5������nU(�������a ��U"�UUU5������ �UR-������������������U5������=n(�������aO��U[/��������U5������- ��nU R1������������������U5������ �US- ��nU(�������a ��U"�UUU5������ �UR-������������������U5������=n(�������a��MO��U R ������������������5������� ��UR ������������������5������� �US:���a��UU:��a��[3��������S UU4-��U5������eU$�!�[���������a�� ��GN�f�=�f!�U R ������������������5������� �f�=�f!�UR ������������������5������� �f�=�f)zlretrieve(url) returns (filename, headers) for a local object or (tempfilename, headers) for a remote object.rL���rS���rM���rt���rO���rP���r���rQ���rR���rT���)r ���r���r:��r���r���rW���r����r5���r ���rq���rA���r���r���rX���rY����splitextr[����mkstempr8��r_����fdopenr`���ra���rb���rc���r���)r����rB���rd���re���rC���r�����url1rg���r����rh���ri����garbagerY����suffix�fdrj���rk���rl���ra���rm���rn���s��� rG����retrieve�URLopener.retrieve��ss�������Y�s�^�$���>�>�c�^�^�3��>�>�#�&�&���_� ����T�T�V�^� ��)�)�$�/���w�w�y����� �#�J�t�$4�Q�$7�8�$�>�>���Y�Y�s� !��" ��g�g�i�G���8�T�*�� *�3�� �� *�4�:�2� 6� �� +�D�J�B� 7� �� *�4�:�2� 6� �����)�)�$�/��2��!)�!1�!1�&�!9���� � �'�'��1��i�i��D�)�� �!�*���>�>�-�*0�N�N�3�'���������#�w�.��w�'7�8�9�D���x��T�2�!�w�w�r�{�*�e�*��C��J�&�D��I�I�e�$���M�H�!�"�8�R��6�� "�w�w�r�{�*�e�*��� � ���H�H�J���1�9����&�C���,�� &�(�� (��� ��[��� �� ��F�� � ����H�H�J�s9����"A J��>CJ6��B0J!��J6�� J�J�!J3�3J6��6Kc������������������H����SnSn[��������U[��������5������(�������a/��[��������U5������u��pgU(�������a��[��������U5������u��pF[ ��������U5������nUnOUu��pg[��������U5������u��pV[��������U5������u��p�U nSnU R ������������������5�������S:w��a��SnOF[��������U 5������u��p�U(�������a ��[��������U5������u��pHU(�������a��U <�SU<�U <�3n[��������U5������(�������a��UnU(�������d��[��������SS5������eU(�������a?��[ ��������U5������n[��������R������������������"�UR������������������5�������5������R������������������S5������nOSnU(�������a?��[ ��������U5������n[��������R������������������"�UR������������������5�������5������R������������������S5������nOSnU"�U5������n 0�nU(�������a��SU-��US'���U(�������a��SU-��US '���U(�������a��X�S '���SUS'���U�R�������������������H ��u��nnUX�'���M��� �Ub��S US'���U R������������������SXsU5������ �OU R������������������SX~S9 ��U R������������������5�������nSUR(������������������s=::��a��S:��a(��O �O%[+��������UUR,������������������SU-���UR(������������������5������$�U�R/������������������UUR0������������������UR(������������������UR2������������������UR,������������������U5������$�!�[ ��������R"������������������R$�������������������a�� �['��������S5������ef�=�f)aQ��Make an HTTP connection using connection_class. This is an internal method that should be called from open_http() or open_https(). Arguments: - connection_factory should take a host name and return an HTTPConnection instance. - url is the url to retrieval or a host, relative-path pair. - data is payload for a POST request or None. Nr��z://z http errorrw��r���zBasic %src��r���ru���r����r���rx��zContent-Typer����r����r���z$http protocol error: bad status liner@��rA���http:)r��r��r ���r���r���r���rz���r���rq���r���r���r���r���r����r{���r���r��r'��� BadStatusLiner����statusr���rC��� http_errorrg���r���)r�����connection_factoryrB���rC����user_passwd�proxy_passwdr|���r�����realhostrO��r����� proxy_authr���� http_connrh���r���r����r����s��� rG����_open_generic_http�URLopener._open_generic_httpC��sv�����������c�3���'��_�N�D��$.�t�$4�!���t�}���H� �N�D�!+�D�!1��L�&�x�0�M�G��C��K��}�}��&�(���!+�D�!1����,6�x�,@�)�K��.5�x��F�H���)�)�#�D��7�<��A�A��"�<�0�L��)�)�,�*=�*=�*?�@�G�G��P�J��J��!�+�.�K��#�#�K�$6�$6�$8�9�@�@��I�D��D�&�t�,� ����-7�*�-D�G�)�*��(2�T�(9�G�O�$��&�F�O� �!(����!�_�_�M�F�E�#�G�O��-����&I�G�N�#����f�h�g�>����e�X��?� C� �,�,�.�H���(�/�/�'�C�'��h����g��m�&�o�o�/�� /���?�?��X�[�[�������(�,�,��F�� F����{�{�(�(�� C��A�B�B� C�s����*I7��7*J!c������������������V�����U�R������������������[��������R������������������R������������������X5������$�)zUse HTTP protocol.)rn��r��r'��ri���r����rB���rC���s��� rG���� open_http�URLopener.open_http���s�������&�&�t�{�{�'A�'A�3�M�MrH���c�����������������������SU-��n[��������X5������(�������a,��[��������X5������nUc��U"�XX4U5������n O U"�XX4XV5������n U (�������a��U $�U�R������������������XX4U5������$�)z�Handle http errors. Derived class can override this, or provide specific handlers named http_error_DDD where DDD is the 3-digit error code.z http_error_%d)r����r����r��) r����rB���rg����errcode�errmsgrh���rC���r]���r����rj���s ��� rG���rg���URLopener.http_error���s`���������(���4����T�(�F��|����'�B�����'�H���f�}��&�&�s���I�IrH���c������������������<�����UR������������������5������� �[��������XXES5������e)z>Default error handler: close the connection and raise OSError.N)r����r����r����rB���rg���ru��rv��rh���s��� rG���r���URLopener.http_error_default���s������ ��� ���f�t�<�<rH���c����������������������U�R�������������������(�������d��U�R������������������(�������a~��[��������R������������������R������������������R ������������������n[��������R������������������R ������������������U5������nUR������������������U�R������������������U�R�������������������5������ �UR������������������b��SUl��������OS�n[��������R������������������R ������������������XS9$�)NTr<���) r3��r4��r��r'��r&��r���r����load_cert_chain�post_handshake_auth)r����r|���r���r=���s��� rG����_https_connection�URLopener._https_connection���s��������}�}����#�{�{�:�:�D�D���+�+�;�;�L�I���'�'����� � �F���.�.�:�26�G�/�����;�;�.�.�t�.�E�ErH���c������������������:�����U�R������������������U�R������������������X5������$�)zUse HTTPS protocol.)rn��r~��rq��s��� rG���� open_https�URLopener.open_https���s�������*�*�4�+A�+A�3�M�MrH���c������������������������[��������U[��������5������(�������d��[��������S5������eUSS�S:X��a+��USS�S:w��a"��USS�R������������������5�������S:w��a��[ ��������S 5������eU�R������������������U5������$�) z/Use local file or FTP depending on form of URL.zEfile error: proxy support for file protocol currently not implementedNr;���rw��r���ra��r&��z localhost/r���)r��r��r���rz���r����r���r����s��� rG���� open_file�URLopener.open_file���se�������#�s�#�#��b�c�c��r��7�d�?�s�1�Q�x�3��3�q��9�?�?�3D��3T��L�M�M��'�'��,�,rH���c����������������������SSK�nSSKn[��������U5������u��pE[��������U5������n�[��������R ������������������"�U5������nUR������������������n UR������������������R������������������UR������������������SS9n UR������������������U5������S���nUR������������������"�SU=(�������d�� �SX�4-��5������nU(�������d&��Un USS�S:X��a��S U-���n [!��������[#��������US 5������X�5������$�[%��������U5������u��pNU(�������dl��[&��������R(������������������"�U5������[+��������5�������4[-��������5�������-���;���a>��Un USS�S:X��a��S U-���n OUSS�S:X��a��[/��������S U-��5������e[!��������[#��������US 5������X�5������$�[��������S5������e!�[���������a%��n[��������UR������������������UR������������������5������eSnAff�=�f)zUse local file.r���NTr���z6Content-Type: %s Content-Length: %d Last-modified: %s r���rS���ra��r���r���r;���z./zAlocal file url may start with / or file:. Unknown url of type: %sz#local file error: not on local host)r���r���r ���r5���rX���r���rq���r����strerrorrd���r���r���r���r���r���r���r���rA���r���r#��r���r����thishostr����)r����rB���r���r���r|���rL���� localnamer����erl���r���r���rh����urlfiler���s��� rG���r����URLopener.open_local_file���sw���������_� �� ��&� � 3��G�G�I�&�E���}�}���;�;�)�)�%�.�.��)�F���$�$�S�)�!�,���+�+�G� � "�l�D�3� 4�5�����G��B�Q�x�3��#�d�*���d�9�d�3�W�F�F���%� ����#�#�D�)�y�{�n�x�z�.I�J��G��B�Q�x�3��#�d�*���b�q��T�!� �!d�gj�!j�k�k��d�9�d�3�W�F�F��<�=�=��-��� 3��1�:�:�q�z�z�2�2�� 3�s����E�� F� E>�>Fc����������������������[��������U[��������5������(�������d��[��������S5������eSSKn[ ��������U5������u��p4U(�������d��[��������S5������e[��������U5������u��p5[ ��������U5������u��pcU(�������a��[��������U5������u��pgOSn[��������U5������n[��������U=(�������d�� �S5������n[��������U=(�������d�� �S5������n[��������R������������������"�U5������nU(�������d��SSKnUR������������������nO[��������U5������n[��������U5������u��pI[��������U5������nUR������������������S5������n U SS�U S���p�U (�������a��U S���(�������d��U SS�n U (�������a��U S���(�������d��SU S'���XcUSR!������������������U 5������4n[#��������U�R$������������������5������[&��������:���aO��[)��������U�R$������������������5�������H6��n X�:w��d��M ��U�R$������������������U ���nU�R$������������������U �UR+������������������5������� �M8��� ��X�R$������������������;��a��[-��������XgX5U 5������U�R$������������������U'���U(�������d��S nOS nU �H?��n[/��������U5������u��nnUR1������������������5�������S:X��d��M'��US;���d��M/��UR3������������������5�������nMA��� �U�R$������������������U���R5������������������X�5������u��nnUR7������������������S U-���5������S���nSnU(�������a��USU-��- ��nUb��US:���a��USU-��- ��n[8��������R:������������������"�U5������n[=��������UUS U-���5������$�!�[?��������5��������a��n[��������SU�35������UeSnAff�=�f)zUse FTP protocol.zCftp error: proxy support for ftp protocol currently not implementedr���Nr���rt���ra��rP���rS���r���r��r����r���zftp:zContent-Type: %s zContent-Length: %d �ftp error: ) r��r��r���r���r ���r���r���r���r���r#��r���r���r���r`���r���r���r��rb���r;���MAXFTPCACHEr����r����r���r���rz���r���r���r���r���r���r���� ftperrors)r����rB���r���r|���rY���r���r���r���r���r���r���rL���r����rX��rY��r����r���r����rg���r���r���rh���r���s��� rG����open_ftp�URLopener.open_ftp���s�������#�s�#�#��`�a�a����_� ���8�$>�?�?���%� ����%� ����T� 2���v��f��t�}���t�z�r�"�����2�&���#�#�D�)�����?�?�D��t�9�D� ��&����t�}���z�z�#����#�2�Y��R��d���Q���Q�R�����Q��3��a���$������.���t�}�}���+��$�-�-�(���8�� � �a�(�A�� � �a�(��G�G�I� �)� 9��-�-�'��t�T��>��� � �c�"�����$���)�$�/���e��:�:�<�6�)��:�:� �;�;�=�D� �� �!�M�M�#�.�7�7��C�M�R���(�(��#��6�q�9�E��G���/�%�7�7���"�w�!�|��1�G�;�;���/�/��8�G��b�'�6�C�<�8�8���{�� 9��[���.�/�S�8�� 9�s&�����AJ:��J:��&BJ:��:K�K�Kc����������� �������v����[��������U[��������5������(�������d��[��������S5������e�UR������������������SS5������u��p2U(�������d��SnUR ������������������S5������nUS:���a��S X4S �;��a ��X4S-���S �nUS U�nOSn/�nUR������������������S[��������R������������������"�S [��������R������������������"�[��������R������������������"�5�������5������5������-��5������ �UR������������������SU-��5������ �US:X��a5��[��������R������������������"�UR������������������S5������5������R������������������S5������nO[��������U5������nUR������������������S[!��������U5������-��5������ �UR������������������S5������ �UR������������������U5������ �SR#������������������U5������n[$��������R&������������������"�U5������n[(��������R*������������������"�U5������n[-��������X�U5������$�!�[���������a �� �[��������SS5������ef�=�f)zUse "data" URL.zEdata error: proxy support for data protocol currently not implementedr@��rS���z data errorzbad data URLr���;r���r���Nrt���zDate: %sz%a, %d %b %Y %H:%M:%S GMTzContent-type: %sr���r���zlatin-1zContent-Length: %d� )r��r��r���r���r����rq����rfindr_���r/���strftime�gmtimer���r��r���r���r���rb���r��r���r���r���StringIOr���) r����rB���rC���r�����semirb��rC��rh����fs ��� rG���� open_data�URLopener.open_data-��s}������#�s�#�#��b�c�c� 8��9�9�S�!�,�L�T���0�D��z�z�#����1�9��D��K�/���F�G�}�H����;�D��H���� � �:�d�m�m�,G�,0�K�K�� � ��,D�F��F�� G�� � �%��,�-��x���%�%�d�k�k�'�&:�;�B�B�9�M�D��4�=�D�� � �'�#�d�)�3�4�� � �2��� � �4���i�i��n���+�+�C�0���K�K�����!�c�*�*��5��� 8��,��7�7� 8�s����F!��!F8) �__tempfiles�__unlinkr����r4��r;��r3��r���r:��r����rJ���r���)r����r����r����r����rF��r8��r����r7��r����r?��r����rB��rG��rA���rN��rM��ra��rn��rr��rg��r��� _have_sslr~��r���r���r���r���r���r����r����rH���rG���r9���r9������s����������K� �;�.�G�!�4��#�%�"8�H=� I�:�|ZF�xN�J� =� �� F� N�-�>�@89�t'+rH���r9���c�������������������������\�rS�rSrSrS�rS�rSS�jrS�rSS�jr SS �jr SS �jrSS�jr��SS�jr ��SS �jrSS�jrSS�jrSS�jrSS�jrSS�jrS�rSrg)r:���iW��z?Derived class with handlers for errors we can handle (perhaps).c������������������b�����[���������R������������������"�U�/UQ70�UD6 �0�U�l��������SU�l��������SU�l��������g�)Nr���rM��)r9���r����� auth_cache�tries�maxtries)r����r���kwargss��� rG���r�����FancyURLopener.__init__Z��s/���������4�1�$�1�&�1������ ��� rH���c������������������"�����[��������X%SU-���U5������$�)z3Default error handling -- don't raise an exception.rd��)r���ry��s��� rG���r���!FancyURLopener.http_error_default`��s�������"�w��}�g�>�>rH���Nc������������������L����U�=R�������������������S- ��sl����������U�R������������������(�������aV��U�R�������������������U�R������������������:���a<��[��������U�S5������(�������a ��U�R������������������nOU�R������������������nU"�XSSU5������SU�l���������$�U�R������������������XX4XV5������nUSU�l���������$�!�SU�l���������f�=�f)z%Error 302 -- relocated (temporarily).rS����http_error_500r2��z)Internal Server Error: Redirect Recursionr���)r���r���r����r���r���redirect_internal) r����rB���rg���ru��rv��rh���rC���r����rj���s ��� rG���rp���FancyURLopener.http_error_302d��s�������� � �a�� � ��}�}����t�}�}�!<��4�!1�2�2��.�.�D��2�2�D��C�S�G�#�%���D�J� ��+�+�C�W�,3�;�F���D�J���D�J�s����AB��>B�� B#c������������������ ����SU;���a��US���nO SU;���a��US���nOg�UR������������������5������� �[��������U�R������������������S-���U-���U5������n[��������U5������nUR������������������S;��a��[��������XsUSU-��-���XR5������eU�R ������������������U5������$�)Nr]��r^��r���r_��z( Redirection to url '%s' is not allowed.)r����r���r����r���rf��r���rA���) r����rB���rg���ru��rv��rh���rC���rU��rm��s ��� rG���r���� FancyURLopener.redirect_internalv��s��������� ��Z�(�F� �g� ��U�^�F�� ��� ������S��3�.��7���F�#����?�?�">�>��F�"�F��O�P�#�)�� )� ��y�y�� � rH���c������������������(�����U�R������������������XX4XV5������$�)z*Error 301 -- also relocated (permanently).�rp���r����rB���rg���ru��rv��rh���rC���s��� rG���rr���FancyURLopener.http_error_301�����������"�"�3�G�W�K�KrH���c������������������(�����U�R������������������XX4XV5������$�)z;Error 303 -- also relocated (essentially identical to 302).r���r���s��� rG���rs���FancyURLopener.http_error_303���r���rH���c������������������T�����Uc��U�R������������������XX4XV5������$�U�R������������������XX4U5������$�)z1Error 307 -- relocated, but turn POST into error.)rp��r��r���s��� rG���rt���FancyURLopener.http_error_307����1�������<��&�&�s���O�O��*�*�3�G�W�M�MrH���c������������������T�����Uc��U�R������������������XX4XV5������$�U�R������������������XX4U5������$�)z1Error 308 -- relocated, but turn POST into error.)rr��r��r���s��� rG���ru���FancyURLopener.http_error_308���r���rH���c�����������������������SU;��a��[���������R������������������XUX4U5������ �US���n[��������R������������������"�SU5������n U (�������d��[���������R������������������XUX4U5������ �U R ������������������5�������u��p�U R������������������5�������S:w��a��[���������R������������������XUX4U5������ �U(�������d��[���������R������������������XX#UU5������ �SU�R������������������-���S-���nUc��[��������X5������"�X5������$�[��������X5������"�XU5������$�)zWError 401 -- authentication required. This function supports Basic authentication only.r ���![ ]*([^ ]+)[ ]+realm="([^"]*)"r����retry_�_basic_auth�r9���r��r���matchr���rz���r����r����� r����rB���rg���ru��rv��rh���rC���r`���stuffr���rf��r���r]���s ��� rG���r ���FancyURLopener.http_error_401���s���������W�,��(�(��B�)0�'� C��*�+�����?��G����(�(��B�)0�'� C����� ���<�<�>�W�$��(�(��B�)0�'� C���(�(��B��� ��$�)�)�#�m�3���<��4�%�c�1�1��4�%�c�$�7�7rH���c�����������������������SU;��a��[���������R������������������XUX4U5������ �US���n[��������R������������������"�SU5������n U (�������d��[���������R������������������XUX4U5������ �U R ������������������5�������u��p�U R������������������5�������S:w��a��[���������R������������������XUX4U5������ �U(�������d��[���������R������������������XX#UU5������ �SU�R������������������-���S-���nUc��[��������X5������"�X5������$�[��������X5������"�XU5������$�)z]Error 407 -- proxy authentication required. This function supports Basic authentication only.r��r���r����retry_proxy_r���r���r���s ��� rG���r���FancyURLopener.http_error_407���s�������� �w�.��(�(��B�)0�'� C��,�-�����?��G����(�(��B�)0�'� C����� ���<�<�>�W�$��(�(��B�)0�'� C���(�(��B��� ��� � �)�M�9���<��4�%�c�1�1��4�%�c�$�7�7rH���c����������������������[��������U5������u��pESU-���U-���nU�R������������������S���n[��������U5������u��p�[��������U 5������u��p�U R������������������S5������S-���nX�S��n U�R ������������������X�U5������u��p�U(�������d��U (�������d��g�[��������USS9<�S[��������U SS9<�SU <�3n SU -���U -���U�R������������������S'���Uc��U�R ������������������U5������$�U�R ������������������Xc5������$�)N�http://r��rx��rS���rt���rJ��r����r ���r���r���r�����get_user_passwdr ���rA����r����rB���r���rC���r|���r����rU��ry��rO��rP��� proxyselectorr����r���r���s��� rG����retry_proxy_http_basic_auth�*FancyURLopener.retry_proxy_http_basic_auth���s�������#�C�����T�!�H�,�����V�$��'��.���#-�i�#8� � ��N�N�3��!�#���b�M� ��+�+�I�a�@������"'��2�"6�"'��R�"8�)�E� �(�9�4�}�D����V���<��9�9�V�$�$��9�9�V�*�*rH���c����������������������[��������U5������u��pESU-���U-���nU�R������������������S���n[��������U5������u��p�[��������U 5������u��p�U R������������������S5������S-���nX�S��n U�R ������������������X�U5������u��p�U(�������d��U (�������d��g�[��������USS9<�S[��������U SS9<�SU <�3n SU -���U -���U�R������������������S'���Uc��U�R ������������������U5������$�U�R ������������������Xc5������$�)N�https://r����rx��rS���rt���rJ��r���r���r���s��� rG����retry_proxy_https_basic_auth�+FancyURLopener.retry_proxy_https_basic_auth���s�������#�C�����d�"�X�-�����W�%��'��.���#-�i�#8� � ��N�N�3��!�#���b�M� ��+�+�I�a�@������"'��2�"6�"'��R�"8�)�E� � *�Y� 6�� F����W���<��9�9�V�$�$��9�9�V�*�*rH���c������������������&����[��������U5������u��pEUR������������������S5������S-���nXFS��nU�R������������������XBU5������u��pxU(�������d��U(�������d��g�[��������USS9<�S[��������USS9<�SU<�3nSU-���U-���n Uc��U�R ������������������U 5������$�U�R ������������������X�5������$�)Nrx��rS���rt���rJ��r���r����r ���r����r���r ���rA���� r����rB���r���rC���r|���r����r����r���r���rU��s ��� rG���r����$FancyURLopener.retry_http_basic_auth���s�������#�C�����I�I�c�N�Q����B�x���+�+�D��;������"�4�b�1�"�6��3�T�;���T�!�H�,���<��9�9�V�$�$��9�9�V�*�*rH���c������������������&����[��������U5������u��pEUR������������������S5������S-���nXFS��nU�R������������������XBU5������u��pxU(�������d��U(�������d��g�[��������USS9<�S[��������USS9<�SU<�3nSU-���U-���n Uc��U�R ������������������U 5������$�U�R ������������������X�5������$�)Nrx��rS���rt���rJ��r���r���r���r���s ��� rG����retry_https_basic_auth�%FancyURLopener.retry_https_basic_auth ��s�������#�C�����I�I�c�N�Q����B�x���+�+�D��;������"�4�b�1�"�6��3�T�;���d�"�X�-���<��9�9�V�$�$��9�9�V�*�*rH���c�����������������������US-���UR������������������5�������-���nX@R������������������;���a$��U(�������a��U�R������������������U �OU�R������������������U���$�U�R������������������X5������u��pVU(�������d��U(�������a��XV4U�R������������������U'���XV4$�)Nrx��)rz���r����prompt_user_passwd)r����r|���r���r��r����r���r���s��� rG���r����FancyURLopener.get_user_passwd ��sl�������c�k�D�J�J�L�(���/�/�!���O�O�C�(����s�+�+��.�.�t�;����6�4�.�4�?�?�3�/��|�rH���c����������� ������������SSK�n�[��������SU<�SU<�S35������nUR������������������SU<�SU<�SU<�S35������nXE4$�!�[���������a �� �[��������5������� ��gf�=�f) z#Override this in a GUI environment!r���NzEnter username for z at z: zEnter password for z in r���)�getpass�input�KeyboardInterrupt�print)r����r|���r���r���r���r���s��� rG���r����!FancyURLopener.prompt_user_passwd% ��sR������� ��E�4�H�I�D��_�_��u�d�&$��%�F��<��� �� ��G�� �s����4;��A�A)r���r���r���rJ���)NF)r���)r����r����r����r����rF��r����r��rp��r���rr��rs��rt��ru��r ��r��r���r���r���r���r���r���r����r����rH���rG���r:���r:���W��sm������I��?��$!�8L�L�N�N��FJ��8�2�FJ��8�2+�$+�$+�+� � rH���r:���c�������������������H�����[���������c��[��������R������������������"�S5������q�[���������$�)z8Return the IP address of the magic hostname 'localhost'.r���)� _localhostr#��r���r����rH���rG���r���r���5 ��s ����������)�)�+�6� ��rH���c�����������������������[���������c<���[��������[��������R������������������"�[��������R������������������"�5�������5������S���5������q�[���������$�[���������$�!�[��������R �������������������a*�� �[��������[��������R������������������"�S5������S���5������q��[���������$�f�=�f)z,Return the IP addresses of the current host.r;���r���)� _thishostr���r#��r���r���r���r����rH���rG���r���r���= ��sw��������� G��f�5�5�f�6H�6H�6J�K�A�N�O�I����9�������� G��f�5�5�k�B�1�E�F�I��� G�s����5A �� 6B�Bc�������������������<�����[���������c��SSKn�U�R������������������q�[���������$�)z1Return the set of errors raised by the FTP class.Nr���)� _ftperrorsr���r���)r���s��� rG���r���r���H ��s�����������&�&� ��rH���c�������������������H�����[���������c��[��������R������������������"�S5������q�[���������$�)z%Return an empty email Message object.rt���)� _noheadersr���r���r����rH���rG���� noheadersr���Q ��s ����������.�.�r�2� ��rH���c��������������������J�����\�rS�rSrSr��SS�jrS�rS�rS�rS�r S �r S �rSrg) r���i[ ��z;Class used by open_ftp() for cache of open FTP connections.Nc�����������������������Xl���������X l��������X0l��������X@l��������XPl��������X`l��������SU�l��������Xpl���������U�R������������������5������� �g�!� �U�R������������������5������� �e�=�fr��) r���r���r|���r���r���rD����refcount� keepalive�initr����)r����r���r���r|���r���r���rD���r���s��� rG���r�����ftpwrapper.__init__^ ��sM������� ���� �� �� ����� �#�� ��I�I�K�� ��J�J�L��s����A��Ac����������������������SS�K�nSU�l��������UR������������������5�������U�l��������U�R������������������R ������������������U�R ������������������U�R������������������U�R������������������5������ �U�R������������������R������������������U�R������������������U�R������������������5������ �SR������������������U�R������������������5������nU�R������������������R������������������U5������ �g�)Nr���ra��)r����busy�FTPr`���connectr|���r���rD����loginr���r���r��r����cwd)r����r����_targets��� rG���r����ftpwrapper.initn ��sw��������� ��:�:�<�����������D�I�I�t�|�|�<������t�y�y�$�+�+�.��(�(�4�9�9�%�������W�rH���c������������������h����SS�K�nU�R������������������5������� �US;���a��SnSnOSU-���nSn�U�R������������������R������������������U5������ �S�nU(�������a*��U(�������d#���SU-���nU�R������������������R ������������������U5������u��pgU(�������d���U�R������������������R������������������S5������ �U(�������aY��U�R������������������R������������������5�������n ��U�R������������������R������������������U5������ ��U�R������������������R������������������U 5������ �SU-���nOSnU�R������������������R ������������������U5������u��pgSU�l��������[��������UR������������������S 5������U�R������������������5������n U�=R ������������������S- ��sl��������UR#������������������5������� �U W4$�!�UR�������������������a/�� �U�R������������������5������� �U�R������������������R������������������U5������ ��GNgf�=�f!�UR�������������������a,��n[��������U5������S�S�S:w��a��[��������S U�35������Ue�S�nAGNoS�nAff�=�f!�UR�������������������a��n[��������S U-��5������UeS�nAff�=�f!�U�R������������������R������������������U 5������ �f�=�f)Nr���)rX��r���zTYPE ArS���zTYPE zRETR r����550r���z ftp error: %rzLIST �LISTr���)r����endtransferr`���voidcmdr���r����ntransfercmd� error_permr��r����pwdr���r���r����makefile� file_closer���r����)r����rL���r����r����cmd�isdirr��r���r���r���ftpobjs��� rG���r����ftpwrapper.retrfilew ��s������������:��X�s�q�u��d�N�c�A�E� "��H�H���S�!������ G���n�� $��� 5� 5�c� :� �����H�H���X�&���h�h�l�l�n��&�M������T�*���H�H�L�L��%���n���� �H�H�1�1�#�6�M�D��� ��d�m�m�D�1�4�?�?�C��� � ��� �� � ���� � ��G�� � �� "��I�I�K��H�H���S�!� "����$�$�� G��v�;�r��?�e�+�"�[���#9�:��F��,�� G���"�,�,��M�&���'?�@�f�L��M����H�H�L�L��%�sM����E,��"F.��;G-��,;F+�*F+�.G*�>!G%�%G*�-H�=H�H�H��H1c�����������������������U�R�������������������(�������d��g�SU�l����������U�R������������������R������������������5������� �g�!�[��������5��������a�� ��g�f�=�fr��)r���r`���voidrespr���r����s��� rG���r����ftpwrapper.endtransfer� ��s<�������y�y���� � ��H�H������{�� �� �s����6��A�Ac������������������T�����SU�l���������U�R������������������S::��a��U�R������������������5������� �g�g�)NFr���)r���r���� real_closer����s��� rG���r�����ftpwrapper.close� ��s$����������=�=�A���O�O���rH���c�����������������������U�R������������������5������� �U�=R������������������S-��sl��������U�R������������������S::��a#��U�R������������������(�������d��U�R������������������5������� �g�g�g�)NrS���r���)r���r���r���r ��r����s��� rG���r���ftpwrapper.file_close� ��s@����������� � ��� ��=�=�A��d�n�n��O�O���'5�rH���c�����������������������U�R������������������5������� ��U�R������������������R������������������5������� �g�!�[��������5��������a�� ��g�f�=�frJ���)r���r`��r����r���r����s��� rG���r ���ftpwrapper.real_close� ��s5���������� ��H�H�N�N����{�� �� �s����-��>�>) r���r���r`��r|���r���r���r���r���rD���r���)NT) r����r����r����r����rF��r����r���r���r���r����r��r ��r����r����rH���rG���r���r���[ ��s/������E�?C� �� �*!�X�� �rH���r���c������������������������0�n�/�n[���������R�������������������H~��n[��������U5������S:���d��M��US���S:X��d��M��USS�R������������������5�������S:X��d��M8��[���������R������������������U���nUSS�R������������������5�������nUR ������������������X#U45������ �U(�������d��Mz��X0U'���M���� �S[���������R������������������;���a��U�R������������������SS5������ �U�H0��u��p#nUSS�S :X��d��M��U(�������a��X0U'���M��U�R������������������US5������ �M2��� �U�$�) a��Return a dictionary of scheme -> proxy server URL mappings. Scan the environment for variables named <scheme>_proxy; this seems to be the standard convention. If you need a different way, you can pass a proxies dictionary to the [Fancy]URLopener constructor. r��i����r�������Nry���REQUEST_METHODr���_proxy)rX����environrb���rz���r_���r����)r����environmentr]���r����� proxy_names��� rG����getproxies_environmentr��� ��s���������G��K�� � ���t�9�q�=�T�"�X��_��b�c����1B�g�1M��J�J�t�$�E��c�r����*�J�����Z�8�9��u�&+� �#�����2�:�:�%����F�D�!�#.���Z����9�� ��&+� �#����J��-� �$/���NrH���c����������������������Uc ��[��������5�������n�US���nUS:X��a��gU�R������������������5�������n�[��������U�5������u��p4UR ������������������S5�������H|��nUR������������������5�������nU(�������d��M��UR ������������������S5������nUR������������������5�������nX5:X��d��X:X��a�� �gSU-���nUR������������������U5������(�������d��U�R������������������U5������(�������d��M|�� �g� �g!�[���������a�� ��gf�=�f)z�Test if proxies should not be used for a particular host. Checks the proxy dict for the value of no_proxy, which should be a list of comma separated DNS suffixes, or '*' for all hosts. �noF�*Tr@���.)r��rA��rz���r���r���r����lstripr��)r|���r����no_proxy�hostonlyr���r]���s��� rG����proxy_bypass_environmentr"��� ��s����������(�*����4�=����3����:�:�<�D���%�N�H����s�#���z�z�|���4��;�;�s�#�D��:�:�<�D���4�<����:�D�� � ��&�&�$�-�-��*=�*=���$����)������s����C �� C�Cc������������������@����SSK�J�n �SSKJnJn �[ ��������U�5������u��pVS�nSU�;��a��US���(�������a��gSn�[��������U"�U5������5������nUR ������������������S S 5�������H���n U (�������d��M��[��������R������������������"�SU 5������n U b���Ub���U"�U R������������������S5������5������nU R������������������S 5������nUc'��SU R������������������S5������R������������������S5������S-���-��nO[��������USS�5������nUS:��d��US:���a��M���SU- ��nX�- ��X�- ��:X��a�� �gM���U"�X 5������(�������d��M��� �g� �g!�U�a�� ��N�f�=�f)aJ�� Return True iff this host shouldn't be accessed using a proxy This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. proxy_settings come from _scproxy._get_proxy_settings or get mocked ie: { 'exclude_simple': bool, 'exceptions': ['foo.bar', '*.bar.com', '127.0.0.1', '10.1', '10.0/16'] } r�����fnmatch)�AddressValueError�IPv4Addressc������������������������U�R������������������S5������n[��������[��������[��������U5������5������n[ ��������U5������S:w��a ��U/�SQ-���S�S�nUS���S-��US���S-��-��US���S -��-��US ���-��$�)Nr��rL��)r���r���r���r���r�������rS���r.��r;���r-��r���)r���r����r���r`���rb���)�ipAddrr���s��� rG����ip2num�,_proxy_bypass_macosx_sysconf.<locals>.ip2num ��sm���������S�!���S��e�_�%���u�:��?��\�)�2�A�.�E��a��B��5��8�r�>�2�e�A�h�!�m�D�u�Q�x�O�OrH���r���exclude_simpleTN� exceptionsr����z(\d+(?:\.\d+)*)(/\d+)?rS���r;���r-��� ���F)r%��� ipaddressr&��r'��r���r`���r����r��r����group�count) r|����proxy_settingsr%��r&��r'��r!��r���r+���hostIPr����rV��r����masks ��� rG����_proxy_bypass_macosx_sysconfr6�� ��s.������ �8���%�N�H�P���$���*�+�� �F� ��[��*�+��� �#�#�L�"�5���h��H�H�.��6���=�V�/��!�'�'�!�*�%�D��7�7�1�:�D��|��A�G�G�A�J�,�,�S�1�A�5�6���4���8�}���a�x�4�"�9����9�D���D�L�1���2���T� !� !��/�6�2���9��� �� �s����D��D�Dc�����������������������SSK�J�n �[��������U�5������u��pUR������������������S5������nU�H2��nUR������������������5�������nUS:X��a ��SU�;��a�� �gM#��U"�X5������(�������d��M2�� �g� �g)z�Return True if the host should bypass the proxy server. The proxy override list is obtained from the Windows Internet settings proxy override registry value. An example of a proxy override value is: "www.example.com;*.example.net; 192.168.0.1" r���r$��r���z<local>r��TF)r%��r���r���r���)r|����overrider%��r�����proxy_overrider���s��� rG����_proxy_bypass_winreg_overrider:��I ��s`������� ����G�D��^�^�C�(�N����z�z�|���9���$����� �T� � �����rH����darwin)�_get_proxy_settings�_get_proxiesc������������������,�����[��������5�������n[��������X5������$�rJ���)r<��r6��)r|���r3��s��� rG����proxy_bypass_macosx_sysconfr?��d ��s������,�.��+�D�A�ArH���c������������������������[��������5�������$�)z�Return a dictionary of scheme -> proxy server URL mappings. This function uses the MacOSX framework SystemConfiguration to fetch the proxy information. )r=��r����rH���rG����getproxies_macosx_sysconfrA��h ��s��������~�rH���c������������������P�����[��������5�������nU(�������a��[��������X5������$�[��������U�5������$�)z�Return True, if host should be bypassed. Checks proxy settings gathered from the environment, if specified, or from the MacOSX framework SystemConfiguration. )r��r"��r?���r|���r���s��� rG���r���r���r ��s%�������)�*���+�D�:�:�.�t�4�4rH���c�������������������8�����[��������5�������=(�������d �� �[��������5�������$�rJ���)r��rA��r����rH���rG���r6���r6��� ��s������%�'�F�+D�+F�FrH���c�����������������������0�n��SSK�n�UR������������������UR������������������S5������nUR ������������������US5������S���nU(�������Ga ��[��������UR ������������������US5������S���5������nSU;��a��SU;��a��SR ������������������U5������nUR������������������S5�������HN��nUR������������������SS 5������u��pg[��������R������������������"�S U5������(�������d��US;���a��SU-���nOUS :X��a��SU-���nXpU'���MP��� �U�R������������������S 5������(�������aU��[��������R������������������"�SSU�S ���5������nU�R������������������S5������=(�������d�� �UU�S'���U�R������������������S5������=(�������d�� �UU�S'���UR������������������5������� �U�$�!�[���������a�� �U�s�$�f�=�f!�[��������[��������[��������4�a�� ��U�$�f�=�f)zhReturn a dictionary of scheme -> proxy server URL mappings. Win32 uses the registry to store proxies. r���N�;Software\Microsoft\Windows\CurrentVersion\Internet Settings�ProxyEnable�ProxyServerr���r���zhttp={0};https={0};ftp={0}rS���z (?:[^/:]+)://)r��r����r`��r����sockszsocks://z ^socks://z socks4://r��r����)�winreg�ImportError�OpenKey�HKEY_CURRENT_USER�QueryValueExr��r����r���r��r���r����ry����Closerq���r����r����)r���rJ���internetSettings�proxyEnable�proxyServer�pr�����addresss��� rG����getproxies_registryrU��� ��s��������� ��" �%�~�~�f�.F�.F�N� P�� �-�-�.>�/<�>�>?�A�K��!�&�"5�"5�6F�7D�#F�FG�#I��J���k�)�c��.D�">�"E�"E�k�"R�K�$�*�*�3�/�A�()����Q��%�H��8�8�O�W�=�=�#�'?�?�&/�'�&9�G�%��0�&0�7�&:�G�(/�H�%��0���;�;�w�'�'� �f�f�\�;���@P�Q�G�&-�k�k�&�&9�&D�W�G�F�O�'.�{�{�7�';�'F�w�G�G�$��"�"�$�����M��� ��N� ��B���Y�/�� �� ��� �s#����E��EE/��E,�+E,�/F�Fc�������������������8�����[��������5�������=(�������d �� �[��������5�������$�)z�Return a dictionary of scheme -> proxy server URL mappings. Returns settings gathered from the environment, if specified, or the registry. )r��rU��r����rH���rG���r6���r6���� ��s�������&�'�@�+>�+@�@rH���c������������������ �����SS�K�n�UR������������������UR������������������S5������nUR ������������������US5������S���n[��������UR ������������������US5������S���5������nU(�������a��U(�������d��g[��������X5������$�!�[���������a�� ��gf�=�f!�[���������a�� ��gf�=�f)Nr���FrF��rG��� ProxyOverride)rJ��rK��rL��rM��rN��r��rq���r:��)r|���rJ��rP��rQ��� proxyOverrides��� rG����proxy_bypass_registryrZ��� ��s������� �� �%�~�~�f�.F�.F�N� P�� �-�-�.>�/<�>�>?�A�K��� 3� 3�4D�5D�!F�FG�!I��J�M� ��-��,�T�A�A����� �� ����� �� �s#����A0��AB���0 A=�<A=�� B �B c������������������P�����[��������5�������nU(�������a��[��������X5������$�[��������U�5������$�)zReturn True, if host should be bypassed. Checks proxy settings gathered from the environment, if specified, or the registry. )r��r"��rZ��rC��s��� rG���r���r���� ��s%�������)�*���+�D�:�:�(��.�.rH���r���rJ���)~rF��r���r����r���r2���http.clientr��r��rX���r��r#��rh��r ��r/��r[���rU���r����urllib.errorr���r���r����urllib.parser���r���r���r ���r ���r���r���r ���r���r���r���r���r���r���r���r���r���r����urllib.responser���r����sslr���rK���__all__�version_infor����r@���r$��r1���r2���r^���r7���r8���r���ASCIIrx���r}���r���r���r3���r���r0���r���r���r���r ���r!���r"���r#���r$���r%���r&����urandomr1��r'���r(���r)���rg��r*���r����r'��r?���r_���r���r/���r"��r$��r+���r���r,���r-���r.���r���r]���� nturl2pathr5���r4���r;��r9���r:���r���r���r���r���r���r���r���r���r���r��r"��r6��r:���platform�_scproxyr<��r=��r?��rA��r���r6���rU��rZ��r����rH���rG����<module>rh�����s����C�f��� �������� �� �� �� �� �� ����������C��B�"��"��"��"��"� �5�����I���$���(�(��!�,�,�� ���F�$B�$B��3+��3+�j����:�x���z�z�(�B�H�H�-��� k"��k"�ZI+��I+�^"�H8��8�&#���#�";�k��;�o2�+��o2�d,�B)>�;��)>�V=*��=*�@G�o��G�3�#B��3�>k#��k#�^�3�[����4�k��� ��z�z��O��O�d�K�)B���$ �[�*C�� �s�+��s�l3�%��3���4�;�;�)�*�*�8�*��8�$��N�N�>�"�#�+��#�$6�[��6� �)*�V11�+��11�f�7,���7,�r3�j��3�j:�+��:�B�����7�7�d�?�5�5�C� A����+��+�DX�Y��X�z�� ��� � ���� ���� ��a��a�H#�J �J<�@�0��<�<�8��:�B��5�G���W�W��_�/�bA�B�(/��(�J�+�L��eS�����I��s����:K��K&�%K&