ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python39/lib64/python3.9/http/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python39/lib64/python3.9/http/__pycache__/cookiejar.cpython-39.pyc

a

���e#,�@s�dZgd�ZddlZddlZddlZddlZddlZddlZddl	Zddl
ZddlZ
ddlmZdZdadd�Zee
jj�ZdZd	d
�ZdZdd
�Zgd�Zgd�ZgZeD]Ze�e� ��q�dedd�Z!dfdd�Z"ddddd�Z#e�$dej%�Z&dd�Z'dd�Z(e�$dej%�Z)e�$dej*ej%B�Z+e�$dej,ej%B�Z-dd�Z.e�$dej,ej%B�Z/d d!�Z0d"d#�Z1e�$d$�Z2e�$d%�Z3e�$d&�Z4e�$d'�Z5d(d)�Z6e�$d*�Z7d+d,�Z8d-d.�Z9d/d0�Z:e�$d1ej%�Z;d2d3�Z<d4d5�Z=d6d7�Z>d8d9�Z?e�$d:ej%�Z@d;d<�ZAd=d>�ZBd?d@�ZCdAdB�ZDdCZEe�$dD�ZFdEdF�ZGdGdH�ZHdIdJ�ZIdKdL�ZJGdMdN�dN�ZKGdOdP�dP�ZLGdQdR�dReL�ZMdSdT�ZNdUdV�ZOGdWdX�dX�ZPGdYdZ�dZ�ZQGd[d\�d\eR�ZSGd]d^�d^eQ�ZTd_d`�ZUGdadb�dbeT�ZVGdcdd�ddeT�ZWdS)ga�HTTP cookie handling for web clients.

This module has (now fairly distant) origins in Gisle Aas' Perl module
HTTP::Cookies, from the libwww-perl library.

Docstrings, comments and debug strings in this code refer to the
attributes of the HTTP cookie system as cookie-attributes, to distinguish
them clearly from Python attributes.

Class diagram (note that BSDDBCookieJar and the MSIE* classes are not
distributed with the Python standard library, but are available from
http://wwwsearch.sf.net/):

                        CookieJar____
                        /     \      \
            FileCookieJar      \      \
             /    |   \         \      \
 MozillaCookieJar | LWPCookieJar \      \
                  |               |      \
                  |   ---MSIEBase |       \
                  |  /      |     |        \
                  | /   MSIEDBCookieJar BSDDBCookieJar
                  |/
               MSIECookieJar

)�Cookie�	CookieJar�CookiePolicy�DefaultCookiePolicy�
FileCookieJar�LWPCookieJar�	LoadError�MozillaCookieJar�N)�timegmFcGs(tsdStsddl}|�d�atj|�S)Nr	zhttp.cookiejar)�debug�logger�loggingZ	getLogger)�argsr
�r�3/opt/alt/python39/lib64/python3.9/http/cookiejar.py�_debug,s
rzQa filename was not supplied (nor was the CookieJar instance initialised with one)cCsJddl}ddl}ddl}|��}|�d|�|��}|jd|dd�dS)Nr	zhttp.cookiejar bug!
%s�)�
stacklevel)�io�warnings�	traceback�StringIO�	print_exc�getvalue�warn)rrr�f�msgrrr�_warn_unhandled_exception:s
ri�cCs�|dd�\}}}}}}|tkr�d|kr4dkr�nnhd|krLdkr�nnPd|krddkr�nn8d|kr|dkr�nn d|kr�dkr�nnt|�SdSdS)	N����r	��;�=)�
EPOCH_YEARr
)�tt�year�monthZmday�hour�min�secrrr�_timegmIs 8��
��
��
r,)ZMonZTueZWedZThuZFriZSatZSun)ZJanZFebZMarZAprZMayZJunZJulZAugZSepZOctZNovZDeccCs@|durtj��}ntj�|�}d|j|j|j|j|j|jfS)aHReturn a string representing time in seconds since epoch, t.

    If the function is called without an argument, it will use the current
    time.

    The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ",
    representing Universal Time (UTC, aka GMT).  An example of this format is:

    1994-11-24 08:49:37Z

    Nz%04d-%02d-%02d %02d:%02d:%02dZ)	�datetime�utcnow�utcfromtimestampr'r(�dayr)�minute�second��tZdtrrr�	time2isozWs�r5cCsR|durtj��}ntj�|�}dt|��|jt|jd|j|j	|j
|jfS)z�Return a string representing time in seconds since epoch, t.

    If the function is called without an argument, it will use the current
    time.

    The format of the returned string is like this:

    Wed, DD-Mon-YYYY HH:MM:SS GMT

    Nz#%s, %02d-%s-%04d %02d:%02d:%02d GMTr)r-r.r/�DAYSZweekdayr0�MONTHSr(r'r)r1r2r3rrr�
time2netscapejs�r8)ZGMT�UTCZUT�Zz^([-+])?(\d\d?):?(\d\d)?$cCsjd}|tvrd}nTt�|�}|rfdt|�d��}|�d�rR|dt|�d��}|�d�dkrf|}|S)Nr	ir��<r�-)�	UTC_ZONES�TIMEZONE_RE�search�int�group)�tz�offset�mrrr�offset_from_tz_string�s

rFc
Cs�t|�}|tjkrdSzt�|���d}WnZty�zt|�}Wnty\YYdS0d|krrdkr|nn|}nYdSYn0|dur�d}|dur�d}|dur�d}t|�}t|�}t|�}t|�}|dk�r2t�t���d}|d}	|}
|||	}|	|
}	t	|	�dk�r2|	dk�r*|d}n|d}t
|||||||f�}|du�r�|du�r`d}|��}t|�}|du�r~dS||}|S)Nrr r	i��d�2r9)
rAr-ZMAXYEAR�MONTHS_LOWER�index�lower�
ValueError�time�	localtime�absr,�upperrF)
r0�mon�yr�hrr*r+rCZimonZcur_yrrE�tmpr4rDrrr�	_str2time�sN





rUzV^[SMTWF][a-z][a-z], (\d\d) ([JFMASOND][a-z][a-z]) (\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$z+^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*a�^
    (\d\d?)            # day
       (?:\s+|[-\/])
    (\w+)              # month
        (?:\s+|[-\/])
    (\d+)              # year
    (?:
          (?:\s+|:)    # separator before clock
       (\d\d?):(\d\d)  # hour:min
       (?::(\d\d))?    # optional seconds
    )?                 # optional clock
       \s*
    (?:
       ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+) # timezone
       \s*
    )?
    (?:
       \(\w+\)         # ASCII representation of timezone in parens.
       \s*
    )?$cCs�t�|�}|rl|��}t�|d���d}t|d�|t|d�t|d�t|d�t|d�f}t|�S|�	�}t
�d|d�}dgd	\}}}}}}	}
t�|�}|dur�|��\}}}}}}	}
ndSt
||||||	|
�S)
a�Returns time in seconds since epoch of time represented by a string.

    Return value is an integer.

    None is returned if the format of str is unrecognized, the time is outside
    the representable range, or the timezone string is not recognized.  If the
    string contains no timezone, UTC is assumed.

    The timezone in the string may be numerical (like "-0800" or "+0100") or a
    string timezone (like "UTC", "GMT", "BST" or "EST").  Currently, only the
    timezone strings equivalent to UTC (zero offset) are known to the function.

    The function loosely parses the following formats:

    Wed, 09 Feb 1994 22:23:32 GMT       -- HTTP format
    Tuesday, 08-Feb-94 14:15:29 GMT     -- old rfc850 HTTP format
    Tuesday, 08-Feb-1994 14:15:29 GMT   -- broken rfc850 HTTP format
    09 Feb 1994 22:23:32 GMT            -- HTTP format (no weekday)
    08-Feb-94 14:15:29 GMT              -- rfc850 format (no weekday)
    08-Feb-1994 14:15:29 GMT            -- broken rfc850 format (no weekday)

    The parser ignores leading and trailing whitespace.  The time may be
    absent.

    If the year is given with only 2 digits, the function will select the
    century that makes the year closest to the current date.

    rrr	r;���N�)�STRICT_DATE_REr@�groupsrIrJrKrA�floatr,�lstrip�
WEEKDAY_RE�sub�LOOSE_HTTP_DATE_RErU)�textrE�grQr&r0rRrSr*r+rCrrr�	http2time�s 
�
rca�^
    (\d{4})              # year
       [-\/]?
    (\d\d?)              # numerical month
       [-\/]?
    (\d\d?)              # day
   (?:
         (?:\s+|[-:Tt])  # separator before clock
      (\d\d?):?(\d\d)    # hour:min
      (?::?(\d\d(?:\.\d*)?))?  # optional seconds (and fractional)
   )?                    # optional clock
      \s*
   (?:
      ([-+]?\d\d?:?(:?\d\d)?
       |Z|z)             # timezone  (Z is "zero meridian", i.e. GMT)
      \s*
   )?$c
Csd|��}dgd\}}}}}}}t�|�}|durL|��\}}}}}}}}	ndSt|||||||�S)av
    As for http2time, but parses the ISO 8601 formats:

    1994-02-03 14:15:29 -0100    -- ISO 8601 format
    1994-02-03 14:15:29          -- zone is optional
    1994-02-03                   -- only date
    1994-02-03T14:15:29          -- Use T as separator
    19940203T141529Z             -- ISO 8601 compact format
    19940203                     -- only date

    NrY)r]�ISO_DATE_REr@r[rU)
rar0rQrRrSr*r+rCrE�_rrr�iso2time+s

rfcCs*|�d�\}}|jd|�|j|d�S)z)Return unmatched part of re.Match object.r	N)�span�string)�match�start�endrrr�	unmatchedLsrlz^\s*([^=\s;,]+)z&^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"z^\s*=\s*([^\s;,]*)z\\(.)c
Cs0t|t�rJ�g}|D�]}|}g}|�rt�|�}|r�t|�}|�d�}t�|�}|rxt|�}|�d�}t�d|�}n.t	�|�}|r�t|�}|�d�}|�
�}nd}|�||f�q$|���
d�r�|��dd�}|r�|�|�g}q$t�dd|�\}}	|	dk�sJd|||f��|}q$|r|�|�q|S)	amParse header values into a list of lists containing key,value pairs.

    The function knows how to deal with ",", ";" and "=" as well as quoted
    values after "=".  A list of space separated tokens are parsed as if they
    were separated by ";".

    If the header_values passed as argument contains multiple values, then they
    are treated as if they were a single value separated by comma ",".

    This means that this function is useful for parsing header fields that
    follow this syntax (BNF as from the HTTP/1.1 specification, but we relax
    the requirement for tokens).

      headers           = #header
      header            = (token | parameter) *( [";"] (token | parameter))

      token             = 1*<any CHAR except CTLs or separators>
      separators        = "(" | ")" | "<" | ">" | "@"
                        | "," | ";" | ":" | "\" | <">
                        | "/" | "[" | "]" | "?" | "="
                        | "{" | "}" | SP | HT

      quoted-string     = ( <"> *(qdtext | quoted-pair ) <"> )
      qdtext            = <any TEXT except <">>
      quoted-pair       = "\" CHAR

      parameter         = attribute "=" value
      attribute         = token
      value             = token | quoted-string

    Each header is represented by a list of key/value pairs.  The value for a
    simple token (not part of a parameter) is None.  Syntactically incorrect
    headers will not necessarily be parsed as you would want.

    This is easier to describe with some examples:

    >>> split_header_words(['foo="bar"; port="80,81"; discard, bar=baz'])
    [[('foo', 'bar'), ('port', '80,81'), ('discard', None)], [('bar', 'baz')]]
    >>> split_header_words(['text/html; charset="iso-8859-1"'])
    [[('text/html', None), ('charset', 'iso-8859-1')]]
    >>> split_header_words([r'Basic realm="\"foo\bar\""'])
    [[('Basic', None), ('realm', '"foobar"')]]

    rz\1N�,z^[=\s;]*rXr	z&split_header_words bug: '%s', '%s', %s)�
isinstance�str�HEADER_TOKEN_REr@rlrB�HEADER_QUOTED_VALUE_RE�HEADER_ESCAPE_REr_�HEADER_VALUE_RE�rstrip�appendr]�
startswith�re�subn)
Z
header_values�resultraZ	orig_text�pairsrE�name�valueZnon_junkZ
nr_junk_charsrrr�split_header_wordsUsF-







��r}�([\"\\])cCs|g}|D]h}g}|D]F\}}|durPt�d|�sDt�d|�}d|}d||f}|�|�q|r|�d�|��qd�|�S)a�Do the inverse (almost) of the conversion done by split_header_words.

    Takes a list of lists of (key, value) pairs and produces a single header
    value.  Attribute values are quoted if needed.

    >>> join_header_words([[("text/plain", None), ("charset", "iso-8859-1")]])
    'text/plain; charset="iso-8859-1"'
    >>> join_header_words([[("text/plain", None)], [("charset", "iso-8859-1")]])
    'text/plain, charset="iso-8859-1"'

    Nz^\w+$�\\\1z"%s"�%s=%s�; �, )rwr@�HEADER_JOIN_ESCAPE_REr_ru�join)Zlists�headersrz�attr�k�vrrr�join_header_words�sr�cCs0|�d�r|dd�}|�d�r,|dd�}|S)N�"r���)rv�endswith�rarrr�strip_quotes�s


r�cCs�d}g}|D]�}g}d}t|�d��D]�\}}|��}|�d�\}}	}
|��}|sb|dkr&q�nq&|	rn|
��nd}
|dkr�|��}||vr�|}|dkr�|
dur�t|
�}
d}n|d	kr�|
dur�tt|
��}
|�||
f�q&|r|s�|�d
�|�|�q|S)a5Ad-hoc parser for Netscape protocol cookie-attributes.

    The old Netscape cookie format for Set-Cookie can for instance contain
    an unquoted "," in the expires field, so we have to use this ad-hoc
    parser instead of split_header_words.

    XXX This may not make the best possible effort to parse all the crap
    that Netscape Cookie headers contain.  Ronald Tschalar's HTTPClient
    parser is probably better, so could do worse than following that if
    this ever gives any trouble.

    Currently, this is also used for parsing RFC 2109 cookies.

    )�expires�domain�path�secure�version�port�max-ageF�;�=r	Nr�Tr�)r��0)�	enumerate�split�strip�	partitionrKr�rcru)Z
ns_headersZknown_attrsryZ	ns_headerrz�version_setZiiZparam�key�sep�val�lcrrr�parse_ns_headers�s>
r�z\.\d+$cCs:t�|�rdS|dkrdS|ddks2|ddkr6dSdS)z*Return True if text is a host domain name.FrXr	�.r�T��IPV4_REr@r�rrr�is_HDNs
r�cCsl|��}|��}||krdSt|�s(dS|�|�}|dksB|dkrFdS|�d�sTdSt|dd��shdSdS)a�Return True if domain A domain-matches domain B, according to RFC 2965.

    A and B may be host domain names or IP addresses.

    RFC 2965, section 1:

    Host names can be specified either as an IP address or a HDN string.
    Sometimes we compare one host name with another.  (Such comparisons SHALL
    be case-insensitive.)  Host A's name domain-matches host B's if

         *  their host name strings string-compare equal; or

         * A is a HDN string and has the form NB, where N is a non-empty
            name string, B has the form .B', and B' is a HDN string.  (So,
            x.y.com domain-matches .Y.com but not Y.com.)

    Note that domain-match is not a commutative operation: a.b.c.com
    domain-matches .c.com, but not the reverse.

    TFr�r	r�rN)rKr��rfindrv)�A�B�irrr�domain_matchs

r�cCst�|�rdSdS)zdReturn True if text is a sort-of-like a host domain name.

    For accepting/blocking domains.

    FTr�r�rrr�liberal_is_HDNFs
r�cCs`|��}|��}t|�r t|�s0||kr,dSdS|�d�}|rL|�|�rLdS|s\||kr\dSdS)z\For blocking/accepting domains.

    A and B may be host domain names or IP addresses.

    TFr�)rKr�rvr�)r�r��initial_dotrrr�user_domain_matchPs
r�z:\d+$cCsB|��}tj�|�d}|dkr,|�dd�}t�d|d�}|��S)z�Return request-host, as defined by RFC 2965.

    Variation from RFC: returned value is lowercased, for convenient
    comparison.

    rrXZHost)�get_full_url�urllib�parseZurlparseZ
get_header�cut_port_rer_rK)�request�url�hostrrr�request_hostesr�cCs4t|�}}|�d�dkr,t�|�s,|d}||fS)zzReturn a tuple (request-host, effective request-host name).

    As defined by RFC 2965, except both are lowercased.

    r�r��.local)r��findr�r@)r��erhn�req_hostrrr�eff_request_hostusr�cCs4|��}tj�|�}t|j�}|�d�s0d|}|S)z6Path component of request-URI, as defined by RFC 2965.�/)r�r�r�Zurlsplit�escape_pathr�rv)r�r��partsr�rrr�request_path�s

r�cCs^|j}|�d�}|dkrV||dd�}zt|�WqZtyRtd|�YdS0nt}|S)N�:r	rznonnumeric port: '%s')r�r�rArLr�DEFAULT_HTTP_PORT)r�r�r�r�rrr�request_port�s


r�z%/;:@&=+$,!~*'()z%([0-9a-fA-F][0-9a-fA-F])cCsd|�d���S)Nz%%%sr)rBrP)rirrr�uppercase_escaped_char�sr�cCstj�|t�}t�t|�}|S)zEEscape any invalid characters in HTTP URL, and uppercase all escapes.)r�r�Zquote�HTTP_PATH_SAFE�ESCAPED_CHAR_REr_r�)r�rrrr��s
r�cCsP|�d�}|dkrL||dd�}|�d�}t|�rL|dksD|dkrLd|S|S)aBReturn reach of host h, as defined by RFC 2965, section 1.

    The reach R of a host name H is defined as follows:

       *  If

          -  H is the host domain name of a host; and,

          -  H has the form A.B; and

          -  A has no embedded (that is, interior) dots; and

          -  B has at least one embedded dot, or B is the string "local".
             then the reach of H is .B.

       *  Otherwise, the reach of H is H.

    >>> reach("www.acme.com")
    '.acme.com'
    >>> reach("acme.com")
    'acme.com'
    >>> reach("acme.local")
    '.local'

    r�r	rNZlocal)r�r�)�hr��brrr�reach�s

r�cCs$t|�}t|t|j��sdSdSdS)z�

    RFC 2965, section 3.3.6:

        An unverifiable transaction is to a third-party host if its request-
        host U does not domain-match the reach R of the request-host O in the
        origin transaction.

    TFN)r�r�r�Zorigin_req_host)r�r�rrr�is_third_party�s
r�c@sNeZdZdZddd�Zdd�Zddd	�Zd
d�Zddd
�Zdd�Z	dd�Z
dS)ra�HTTP Cookie.

    This class represents both Netscape and RFC 2965 cookies.

    This is deliberately a very simple class.  It just holds attributes.  It's
    possible to construct Cookie instances that don't comply with the cookie
    standards.  CookieJar.make_cookies is the factory function for Cookie
    objects -- it deals with cookie parsing, supplying defaults, and
    normalising to the representation used in this class.  CookiePolicy is
    responsible for checking them to see whether they should be accepted from
    and returned to the server.

    Note that the port may be present in the headers, but unspecified ("Port"
    rather than"Port=80", for example); if this is the case, port is None.

    FcCs�|durt|�}|dur$tt|��}|dur<|dur<td��||_||_||_||_||_|��|_	||_
||_|	|_|
|_
||_||_|
|_||_||_||_t�|�|_dS)NTz-if port is None, port_specified must be false)rAr\rLr�r{r|r��port_specifiedrKr��domain_specified�domain_initial_dotr��path_specifiedr�r��discard�comment�comment_url�rfc2109�copy�_rest)�selfr�r{r|r�r�r�r�r�r�r�r�r�r�r�r��restr�rrr�__init__�s*

zCookie.__init__cCs
||jvS�N�r�)r�r{rrr�has_nonstandard_attrszCookie.has_nonstandard_attrNcCs|j�||�Sr�)r��get)r�r{�defaultrrr�get_nonstandard_attrszCookie.get_nonstandard_attrcCs||j|<dSr�r�)r�r{r|rrr�set_nonstandard_attr szCookie.set_nonstandard_attrcCs,|durt��}|jdur(|j|kr(dSdS�NTF)rMr�)r��nowrrr�
is_expired#szCookie.is_expiredcCsX|jdurd}n
d|j}|j||j}|jdurFd|j|jf}n|j}d||fS)NrXr�r�z<Cookie %s for %s>)r�r�r�r|r{)r��p�limitZ	namevaluerrr�__str__)s

zCookie.__str__cCslg}dD]$}t||�}|�d|t|�f�q|�dt|j��|�dt|j��d|jjd�|�fS)N)r�r{r|r�r�r�r�r�r�r�r�r�r�r�r�r�zrest=%sz
rfc2109=%sz%s(%s)r�)�getattrru�reprr�r��	__class__�__name__r�)r�rr{r�rrr�__repr__3s
zCookie.__repr__)F)N)N)r��
__module__�__qualname__�__doc__r�r�r�r�r�r�r�rrrrr�s�
*


rc@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)ra Defines which cookies get accepted from and returned to server.

    May also modify cookies, though this is probably a bad idea.

    The subclass DefaultCookiePolicy defines the standard rules for Netscape
    and RFC 2965 cookies -- override that if you want a customized policy.

    cCs
t��dS)z�Return true if (and only if) cookie should be accepted from server.

        Currently, pre-expired cookies never get this far -- the CookieJar
        class deletes such cookies itself.

        N��NotImplementedError�r��cookier�rrr�set_okKszCookiePolicy.set_okcCs
t��dS)zAReturn true if (and only if) cookie should be returned to server.Nr�r�rrr�	return_okTszCookiePolicy.return_okcCsdS)zMReturn false if cookies should not be returned, given cookie domain.
        Tr)r�r�r�rrr�domain_return_okXszCookiePolicy.domain_return_okcCsdS)zKReturn false if cookies should not be returned, given cookie path.
        Tr)r�r�r�rrr�path_return_ok]szCookiePolicy.path_return_okN)r�r�r�r�r�r�r�r�rrrrrBs
	rc
@s�eZdZdZdZdZdZdZeeBZdddddddddeddd	f
d
d�Z	dd
�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�Zd6d7�ZdS)8rzBImplements the standard rules for accepting and returning cookies.rrrVr	NTF)ZhttpsZwsscCsv||_||_||_||_||_||_|	|_|
|_||_||_	|
|_
|durVt|�|_nd|_|durlt|�}||_
dS)zAConstructor arguments should be passed as keyword arguments only.Nr)�netscape�rfc2965�rfc2109_as_netscape�hide_cookie2�
strict_domain�strict_rfc2965_unverifiable�strict_ns_unverifiable�strict_ns_domain�strict_ns_set_initial_dollar�strict_ns_set_path�secure_protocols�tuple�_blocked_domains�_allowed_domains)r��blocked_domains�allowed_domainsr�r�r�r�r�r�r�r�r�r�r�rrrr�ms"zDefaultCookiePolicy.__init__cCs|jS)z4Return the sequence of blocked domains (as a tuple).)r�r�rrrr�sz#DefaultCookiePolicy.blocked_domainscCst|�|_dS)z$Set the sequence of blocked domains.N)r�r)r�rrrr�set_blocked_domains�sz'DefaultCookiePolicy.set_blocked_domainscCs |jD]}t||�rdSqdSr�)rr�)r�r�Zblocked_domainrrr�
is_blocked�s

zDefaultCookiePolicy.is_blockedcCs|jS)z=Return None, or the sequence of allowed domains (as a tuple).)rrrrrr�sz#DefaultCookiePolicy.allowed_domainscCs|durt|�}||_dS)z-Set the sequence of allowed domains, or None.N)r�r)r�rrrr�set_allowed_domains�sz'DefaultCookiePolicy.set_allowed_domainscCs.|jdurdS|jD]}t||�rdSqdS)NFT)rr�)r�r�Zallowed_domainrrr�is_not_allowed�s


z"DefaultCookiePolicy.is_not_allowedcCsNtd|j|j�|jdusJ�dD]&}d|}t||�}|||�s"dSq"dS)z�
        If you override .set_ok(), be sure to call this method.  If it returns
        false, so should your subclass (assuming your subclass wants to be more
        strict about which cookies to accept).

        � - checking cookie %s=%sN)r��
verifiabilityr{r�r�r�Zset_ok_FT�rr{r|r��r�r�r��nZfn_name�fnrrrr��s

zDefaultCookiePolicy.set_okcCsZ|jdurtd|j|j�dS|jdkr:|js:td�dS|jdkrV|jsVtd�dSdS)Nz0   Set-Cookie2 without version attribute (%s=%s)Fr	�$   RFC 2965 cookies are switched off�$   Netscape cookies are switched offT)r�rr{r|r�r�r�rrr�set_ok_version�s
�z"DefaultCookiePolicy.set_ok_versioncCsJ|jrFt|�rF|jdkr*|jr*td�dS|jdkrF|jrFtd�dSdS�Nr	z>   third-party RFC 2965 cookie during unverifiable transactionFz>   third-party Netscape cookie during unverifiable transactionT�Zunverifiabler�r�r�rr�r�rrr�set_ok_verifiability�sz(DefaultCookiePolicy.set_ok_verifiabilitycCs0|jdkr,|jr,|j�d�r,td|j�dSdS)Nr	�$z'   illegal name (starts with '$'): '%s'FT)r�r�r{rvrr�rrr�set_ok_name�s
�zDefaultCookiePolicy.set_ok_namecCsL|jrHt|�}|jdks(|jdkrH|jrH|�|j|�sHtd|j|�dSdS)Nr	z7   path attribute %s is not a prefix of request path %sFT)r�r�r�r�r�r�r)r�r�r��req_pathrrr�set_ok_path�s
����zDefaultCookiePolicy.set_ok_pathc
Cs�|�|j�rtd|j�dS|�|j�r8td|j�dS|j�r�t|�\}}|j}|jr�|�d�dkr�|�d�}|�dd|�}|dkr�||dd�}||d|�}	|	�	�dvr�t
|�dkr�td	|�dS|�d�r�|dd�}
n|}
|
�d�dk}|�s|d
k�rtd|�dS|j
dk�rX|�|��sX|�d��sXd|�|��sXtd||�dS|j
dk�sr|j|j@�r�t||��s�td
||�dS|j
dk�s�|j|j@�r�|dt
|��}|�d�dk�r�t�|��s�td||�dSdS)N�"   domain %s is in user block-listF�&   domain %s is not in user allow-listr�rr	r)�coZacZcomZeduZorgZnetZgovZmilrAZaeroZbiz�catZcoop�infoZjobsZmobiZmuseumr{ZproZtravelZeuz&   country-code second level domain %sr�z/   non-local domain %s contains no embedded dotzO   effective request-host %s (even with added initial dot) does not end with %sz5   effective request-host %s does not domain-match %sz.   host prefix %s for domain %s contains a dotT)rr�rrr�r�r��countr�rK�lenrvr�r�r�r��DomainRFC2965Matchr��DomainStrictNoDotsr�r@)
r�r�r�r�r�r�r��jZtldZsldZundotted_domainZ
embedded_dotsZhost_prefixrrr�
set_ok_domain�sv

�

����
��
���z!DefaultCookiePolicy.set_ok_domainc	Cs�|jr�t|�}|durd}nt|�}|j�d�D]>}zt|�Wn ty`td|�YdS0||kr0q�q0td||j�dSdS)N�80rmz   bad port %s (not numeric)Fz$   request port (%s) not found in %sT)r�r�ror�r�rArLr�r�r�r�Zreq_portr�rrr�set_ok_port+s$

�zDefaultCookiePolicy.set_ok_portcCs@td|j|j�dD]&}d|}t||�}|||�sdSqdS)z�
        If you override .return_ok(), be sure to call this method.  If it
        returns false, so should your subclass (assuming your subclass wants to
        be more strict about which cookies to return).

        r	)r�r
r�r�r�r�Z
return_ok_FTrrrrrr�@s	

zDefaultCookiePolicy.return_okcCs<|jdkr|jstd�dS|jdkr8|js8td�dSdS)Nr	rFrT)r�r�rr�r�rrr�return_ok_versionRsz%DefaultCookiePolicy.return_ok_versioncCsJ|jrFt|�rF|jdkr*|jr*td�dS|jdkrF|jrFtd�dSdSrrr�rrr�return_ok_verifiability[sz+DefaultCookiePolicy.return_ok_verifiabilitycCs"|jr|j|jvrtd�dSdS)Nz(   secure cookie with non-secure requestFT)r��typer�rr�rrr�return_ok_securegsz$DefaultCookiePolicy.return_ok_securecCs|�|j�rtd�dSdS)Nz   cookie expiredFT)r��_nowrr�rrr�return_ok_expiresmsz%DefaultCookiePolicy.return_ok_expirescCsN|jrJt|�}|durd}|j�d�D]}||kr&qJq&td||j�dSdS)Nr$rmz0   request port %s does not match cookie port %sFT)r�r�r�rr%rrr�return_ok_portss�z"DefaultCookiePolicy.return_ok_portcCs�t|�\}}|j}|r*|�d�s*d|}n|}|jdkr^|j|j@r^|js^||kr^td�dS|jdkr�t||�s�td||�dS|jdkr�d|�	|�s�td||�dSdS)Nr�r	zQ   cookie with unspecified domain does not string-compare equal to request domainFzQ   effective request-host name %s does not domain-match RFC 2965 cookie domain %sz;   request-host %s does not match Netscape cookie domain %sT)
r�r�rvr�r��DomainStrictNonDomainr�rr�r�)r�r�r�r�r�r��	dotdomainrrr�return_ok_domain�s2


�����z$DefaultCookiePolicy.return_ok_domaincCs�t|�\}}|�d�sd|}|�d�s0d|}|rH|�d�sHd|}n|}|�|�sd|�|�sddS|�|�r|td|�dS|�|�r�td|�dSdS)Nr�FrrT)r�rvr�rrr)r�r�r�r�r�r/rrrr��s"






z$DefaultCookiePolicy.domain_return_okcCsbtd|�t|�}t|�}||kr&dS|�|�rR|�d�sN|||d�dkrRdStd||�dS)Nz- checking cookie path=%sTr�rz  %s does not path-match %sF)rr�rrvr�)r�r�r�rZpathlenrrrr��s

��z"DefaultCookiePolicy.path_return_ok) r�r�r�r�r!r.r Z
DomainLiberalZDomainStrictr�rrrrrrr�rrrrr#r&r�r'r(r*r,r-r0r�r�rrrrrcsP�
#	;	rcCst|���}t|j|�Sr�)�sorted�keys�mapr�)Zadictr2rrr�vals_sorted_by_key�sr4c	csTt|�}|D]B}d}z
|jWnty0Yn0d}t|�EdH|s|VqdS)zBIterates over nested mapping, depth-first, in sorted order by key.FTN)r4�items�AttributeError�
deepvalues)�mapping�values�objrrrr7�s
r7c@seZdZdS)�AbsentN�r�r�r�rrrrr;��r;c@s�eZdZdZe�d�Ze�d�Ze�d�Ze�d�Z	e�d�Z
e�dej�Zd3d	d
�Z
dd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd4d%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Z d1d2�Z!dS)5rz�Collection of HTTP cookies.

    You may not need to know about this class: try
    urllib.request.build_opener(HTTPCookieProcessor).open(url).
    z\Wr~z\.?[^.]*z[^.]*z^\.+z^\#LWP-Cookies-(\d+\.\d+)NcCs(|durt�}||_t��|_i|_dSr�)r�_policy�
_threading�RLock�
_cookies_lock�_cookies�r��policyrrrr��s

zCookieJar.__init__cCs
||_dSr�)r>rCrrr�
set_policy�szCookieJar.set_policycCs�g}|j�||�sgStd|�|j|}|��D]T}|j�||�sFq2||}|��D].}|j�||�srtd�qVtd�|�|�qVq2|S)Nz!Checking %s for cookies to returnz   not returning cookiez   it's a match)	r>r�rrBr2r�r9r�ru)r�r�r��cookiesZcookies_by_pathr�Zcookies_by_namer�rrr�_cookies_for_domain�s 

zCookieJar._cookies_for_domaincCs*g}|j��D]}|�|�||��q|S)z2Return a list of cookies to be returned to server.)rBr2�extendrG)r�r�rFr�rrr�_cookies_for_requestszCookieJar._cookies_for_requestc	Cs<|jdd�dd�d}g}|D�]}|j}|sHd}|dkrH|�d|�|jdurz|j�|j�rz|dkrz|j�d	|j�}n|j}|jdur�|�|j�n|�d
|j|f�|dkr|j	r�|�d|j
�|j�d��r|j}|j
s�|�d�r�|d
d�}|�d|�|jdurd}|j�r,|d|j}|�|�q|S)z�Return a list of cookie-attributes to be returned to server.

        like ['foo="bar"; $Path="/"', ...]

        The $Version attribute is also added when appropriate (currently only
        once per request).

        cSs
t|j�Sr�)rr�)�arrr�<lambda>r=z)CookieJar._cookie_attrs.<locals>.<lambda>T)r��reverseFr	z$Version=%sNrr�z
$Path="%s"r�rz$Domain="%s"z$Portz="%s")�sortr�rur|�non_word_rer@�quote_rer_r{r�r�r�rvr�r�r�)	r�rFr��attrsr�r�r|r�r�rrr�
_cookie_attrssF


��
�
zCookieJar._cookie_attrscCs�td�|j��z�tt���|j_|_|�|�}|�|�}|r^|�	d�s^|�
dd�|��|jjr�|jj
s�|�	d�s�|D]}|jdkr||�
dd�q�q|W|j��n|j��0|��dS)z�Add correct Cookie: header to request (urllib.request.Request object).

        The Cookie2 header is also added unless policy.hide_cookie2 is true.

        �add_cookie_headerrr�ZCookie2rz$Version="1"N)rrA�acquirerArMr>r+rIrQZ
has_headerZadd_unredirected_headerr�r�r�r��release�clear_expired_cookies)r�r�rFrPr�rrrrRIs(




��
zCookieJar.add_cookie_headerc
Cs�g}d}d}|D�]x}|d\}}d}d}	i}
i}|dd�D�].\}}
|��}||vs`||vrd|}||vrx|
durxd}
||
vr�q>|dkr�|
dur�td	�d}	�qp|
��}
|d
kr�|r�q>|
dur�td�q>|dk�rd}zt|
�}
Wn(t�ytd
�d}	Y�qpYn0d
}|j|
}
||v�s2||v�rf|
du�r\|dv�r\td|�d}	�qp|
|
|<q>|
||<q>|	�rxq|�|||
|f�q|S)aReturn list of tuples containing normalised cookie information.

        attrs_set is the list of lists of key,value pairs extracted from
        the Set-Cookie or Set-Cookie2 headers.

        Tuples are name, value, standard, rest, where name and value are the
        cookie name and value, standard is a dictionary containing the standard
        cookie-attributes (discard, secure, version, expires or max-age,
        domain, path and port) and rest is a dictionary containing the rest of
        the cookie-attributes.

        )r�r�)r�r�r�r�r�r�r��
commenturlr	FrNTr�z%   missing value for domain attributer�zM   missing or invalid value for expires attribute: treating as session cookier�z?   missing or invalid (non-numeric) value for max-age attribute)r�r�rVz!   missing value for %s attribute)rKrrArLr+ru)r��	attrs_set�
cookie_tuples�
boolean_attrs�value_attrsZcookie_attrsr{r|Zmax_age_setZ
bad_cookie�standardr�r�r�r�rrr�_normalized_cookie_tuplesjsh





�

z#CookieJar._normalized_cookie_tuplescCs"|\}}}}|�dt�}|�dt�}|�dt�}	|�dt�}
|�dd�}|durrzt|�}WntypYdS0|�dd�}|�dd�}
|�d	d�}|�d
d�}|tur�|dkr�d}t|�}nXd}t|�}|�d
�}|dk�r|dkr�|d|�}n|d|d�}t|�dk�rd
}|tu}d}|�r8t|�	d��}|tu�rTt
|�\}}|}n|�	d��shd|}d}|	tu�r�|	du�r�t|�}	nd}t�
dd|	�}	nd}	|
tu�r�d}
d}
nF|
|jk�r�z|�|||�Wnt�y�Yn0td|||�dSt||||	||||||||
|
|||�S)Nr�r�r�r�r�r�Fr�r�rVrXTr�r�r	rr�z\s+z2Expiring cookie, domain='%s', path='%s', name='%s')r�r;rArLr�r�r�r�boolrvr�r�rwr_r+�clear�KeyErrorrr)r��tupr�r{r|r[r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr�_cookie_from_cookie_tuple�s�







��z#CookieJar._cookie_from_cookie_tuplecCs6|�|�}g}|D]}|�||�}|r|�|�q|Sr�)r\raru)r�rWr�rXrFr`r�rrr�_cookies_from_attrs_set's
z!CookieJar._cookies_from_attrs_setcCsHt|jdd�}|dur |jj}|D]}|jdkr$d|_|r$d|_q$dS)Nr�rTr	)r�r>r�r�r�)r�rFZ
rfc2109_as_nsr�rrr�_process_rfc2109_cookies0s

z"CookieJar._process_rfc2109_cookiesc
Cs6|��}|�dg�}|�dg�}tt���|j_|_|jj}|jj}|sN|rf|sV|rf|s^|rf|sj|sjgSz|�t	|�|�}Wnt
y�t�g}Yn0|�r2|�r2z|�t|�|�}	Wnt
y�t�g}	Yn0|�
|	�|�r"i}
|D]}d|
|j|j|jf<q�|
fdd�}t||	�}	|	�r2|�|	�|S)zAReturn sequence of Cookie objects extracted from response object.zSet-Cookie2z
Set-CookieNcSs|j|j|jf}||vSr�)r�r�r{)Z	ns_cookie�lookupr�rrr�no_matching_rfc2965isz3CookieJar.make_cookies.<locals>.no_matching_rfc2965)rZget_allrArMr>r+r�r�rbr}�	Exceptionrr�rcr�r�r{�filterrH)
r��responser�r�Zrfc2965_hdrsZns_hdrsr�r�rFZ
ns_cookiesrdr�rerrr�make_cookies<sZ�������
�



zCookieJar.make_cookiescCsX|j��z<tt���|j_|_|j�||�r:|�|�W|j��n|j��0dS)z-Set a cookie if policy says it's OK to do so.N)	rArSrArMr>r+r��
set_cookierTr�rrr�set_cookie_if_okss
zCookieJar.set_cookie_if_okcCsv|j}|j��zT|j|vr&i||j<||j}|j|vrDi||j<||j}|||j<W|j��n|j��0dS)z?Set a cookie, without checking whether or not it should be set.N)rBrArSr�r�r{rT)r�r��cZc2Zc3rrrrj�s


zCookieJar.set_cookiecCsltd|���|j��zB|�||�D]&}|j�||�r&td|�|�|�q&W|j��n|j��0dS)zAExtract cookies from response, where allowable given the request.zextract_cookies: %sz setting cookie: %sN)	rrrArSrir>r�rjrT)r�rhr�r�rrr�extract_cookies�s

zCookieJar.extract_cookiescCst|dur2|dus|dur td��|j|||=n>|durX|durJtd��|j||=n|durj|j|=ni|_dS)a�Clear some cookies.

        Invoking this method without arguments will clear all cookies.  If
        given a single argument, only cookies belonging to that domain will be
        removed.  If given two arguments, cookies belonging to the specified
        path within that domain are removed.  If given three arguments, then
        the cookie with the specified name, path and domain is removed.

        Raises KeyError if no matching cookie exists.

        Nz8domain and path must be given to remove a cookie by namez.domain must be given to remove cookies by path)rLrB)r�r�r�r{rrrr^�s��
zCookieJar.clearcCsN|j��z2|D]}|jr|�|j|j|j�qW|j��n|j��0dS)z�Discard all session cookies.

        Note that the .save() method won't save session cookies anyway, unless
        you ask otherwise by passing a true ignore_discard argument.

        N)rArSr�r^r�r�r{rT)r�r�rrr�clear_session_cookies�s
zCookieJar.clear_session_cookiescCsZ|j��z>t��}|D]"}|�|�r|�|j|j|j�qW|j��n|j��0dS)a�Discard all expired cookies.

        You probably don't need to call this method: expired cookies are never
        sent back to the server (provided you're using DefaultCookiePolicy),
        this method is called by CookieJar itself every so often, and the
        .save() method won't save expired cookies anyway (unless you ask
        otherwise by passing a true ignore_expires argument).

        N)	rArSrMr�r^r�r�r{rT)r�r�r�rrrrU�s


zCookieJar.clear_expired_cookiescCs
t|j�Sr�)r7rBrrrr�__iter__�szCookieJar.__iter__cCsd}|D]}|d}q|S)z#Return number of contained cookies.r	rr)r�r�r�rrr�__len__�szCookieJar.__len__cCs2g}|D]}|�t|��qd|jjd�|�fS�Nz<%s[%s]>r�)rur�r�r�r��r��rr�rrrr��szCookieJar.__repr__cCs2g}|D]}|�t|��qd|jjd�|�fSrq)ruror�r�r�rrrrrr��szCookieJar.__str__)N)NNN)"r�r�r�r�rw�compilerNrOZstrict_domain_reZ	domain_reZdots_re�ASCII�magic_rer�rErGrIrQrRr\rarbrcrirkrjrmr^rnrUrorpr�r�rrrrr�s8





;!a\	7


rc@seZdZdS)rNr<rrrrr�r=rc@s8eZdZdZddd�Zd
dd�Zddd	�Zdd
d�ZdS)rz6CookieJar that can be loaded from and saved to a file.NFcCs2t�||�|durt�|�}||_t|�|_dS)z}
        Cookies are NOT loaded from the named file until either the .load() or
        .revert() method is called.

        N)rr��os�fspath�filenamer]�	delayload)r�ryrzrDrrrr��s

zFileCookieJar.__init__cCs
t��dS)zSave cookies to a file.Nr�)r�ry�ignore_discard�ignore_expiresrrr�save�szFileCookieJar.savecCs^|dur"|jdur|j}ntt��t|�� }|�||||�Wd�n1sP0YdS)zLoad cookies from a file.N)ryrL�MISSING_FILENAME_TEXT�open�_really_load�r�ryr{r|rrrr�loads

zFileCookieJar.loadcCs�|dur"|jdur|j}ntt��|j��zNt�|j�}i|_z|�|||�Wnt	yl||_�Yn0W|j�
�n|j�
�0dS)z�Clear all cookies and reload cookies from a saved file.

        Raises LoadError (or OSError) if reversion is not successful; the
        object's state will not be altered if this happens.

        N)ryrLr~rArSr�ZdeepcopyrBr��OSErrorrT)r�ryr{r|Z	old_staterrr�revert	s

zFileCookieJar.revert)NFN)NFF)NFF)NFF)r�r�r�r�r�r}r�r�rrrrr�s


	�rcCs |j|jfd|jfd|jfg}|jdur8|�d|jf�|jrH|�d�|jrX|�d�|jrh|�d�|j	rx|�d�|j
r�|�d	tt|j
��f�|j
r�|�d
�|jr�|�d|jf�|jr�|�d|jf�t|j���}|D]}|�|t|j|�f�q�|�d
t|j�f�t|g�S)z�Return string representation of Cookie in the LWP cookie file format.

    Actually, the format is extended a bit -- see module docstring.

    r�r�Nr�)�	path_specN)�	port_specN)�
domain_dotN)r�Nr�)r�Nr�rVr�)r{r|r�r�r�rur�r�r�r�r�r5r\r�r�r�r1r�r2ror�r�)r�r�r2r�rrr�lwp_cookie_str$s(
��r�c@s,eZdZdZddd�Zddd�Zd	d
�ZdS)
ra[
    The LWPCookieJar saves a sequence of "Set-Cookie3" lines.
    "Set-Cookie3" is the format used by the libwww-perl library, not known
    to be compatible with any browser, but which is easy to read and
    doesn't lose information about RFC 2965 cookies.

    Additional methods

    as_lwp_str(ignore_discard=True, ignore_expired=True)

    TcCsTt��}g}|D]2}|s |jr q|s0|�|�r0q|�dt|��qd�|dg�S)z�Return cookies as a string of "\n"-separated "Set-Cookie3" headers.

        ignore_discard and ignore_expires: see docstring for FileCookieJar.save

        zSet-Cookie3: %s�
rX)rMr�r�rur�r�)r�r{r|r�rsr�rrr�
as_lwp_strMs
zLWPCookieJar.as_lwp_strNFcCsl|dur"|jdur|j}ntt��t|d��,}|�d�|�|�||��Wd�n1s^0YdS)N�wz#LWP-Cookies-2.0
)ryrLr~r�writer�r�rrrr}]s
zLWPCookieJar.savecCs,|��}|j�|�s$d|}t|��t��}d}d}	d}
�z�|��}|dkrP�q�|�|�s\q<|t|�d���}t|g�D�]f}|d\}
}i}i}|	D]}d||<q�|dd�D]n\}}|dur�|�	�}nd}||
vs�||	vr�|}||	v�r|dur�d	}|||<q�||
v�r|||<q�|||<q�|j
}|d
�}|d�}|du�rJt|�}|du�rXd	}|d�}|�d
�}t|d�|
||d�|d�|||d�|d�|d�|d�|||d�|d�|�}|�s�|j
�r�qz|�s�|�|��r�qz|�|�qzq<Wn>t�y��Yn*t�y&t�td||f��Yn0dS)Nz5%r does not look like a Set-Cookie3 (LWP) format filezSet-Cookie3:)r�r�r�r�r�)r�r�r�r�r�r�rVrXr	FrTr�r�r�r�r�r�r�r�r�r�r�r�rVz&invalid Set-Cookie3 format file %r: %r)�readlinervr@rrMrvrr�r}rKr�rfrr�r�rjr�rfr)r�rryr{r|�magicrr��headerrYrZ�line�datar{r|r[r�r�r�r�r�r�r�r�r�rlrrrr�is��











�
�zLWPCookieJar._really_load)TT)NFF)r�r�r�r�r�r}r�rrrrr@s

rc@s0eZdZdZe�d�ZdZdd�Zd
dd	�Z	dS)ra�

    WARNING: you may want to backup your browser's cookies file if you use
    this class to save cookies.  I *think* it works, but there have been
    bugs in the past!

    This class differs from CookieJar only in the format it uses to save and
    load cookies to and from a file.  This class uses the Mozilla/Netscape
    `cookies.txt' format.  lynx uses this file format, too.

    Don't expect cookies saved while the browser is running to be noticed by
    the browser (in fact, Mozilla on unix will overwrite your saved cookies if
    you change them on disk while it's running; on Windows, you probably can't
    save at all while the browser is running).

    Note that the Mozilla/Netscape format will downgrade RFC2965 cookies to
    Netscape cookies on saving.

    In particular, the cookie version and port number information is lost,
    together with information about whether or not Path, Port and Discard were
    specified by the Set-Cookie2 (or Set-Cookie) header, and whether or not the
    domain as set in the HTTP header started with a dot (yes, I'm aware some
    domains in Netscape files start with a dot and some don't -- trust me, you
    really don't want to know any more about this).

    Note that though Mozilla and Netscape use the same format, they use
    slightly different headers.  The class saves cookies using the Netscape
    header by default (Mozilla can cope with that).

    z#( Netscape)? HTTP Cookie Filezr# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This is a generated file!  Do not edit.

cCspt��}|��}|j�|�s(td|���z|��}|dkr@�q*|�d�rV|dd�}|���d�s,|��dkrrq,|�d�\}}	}
}}}
}|dk}|	dk}	|
dkr�|}
d}|�d�}|	|ks�J�d	}|dkr�d}d
}t	d|
|dd	||	||
d	|||ddi�}|�s
|j
�r
q,|�s|�|��rq,|�|�q,Wn>t
�yB�Yn*t�yjt�td||f��Yn0dS)
Nz4%r does not look like a Netscape format cookies filerXr�r�)�#r�	�TRUEr�FTr	z+invalid Netscape format cookies file %r: %r)rMr�rvr@rr�r�rvr�rr�r�rjr�rfr)r�rryr{r|r�r�r�r�r�r�r�r�r{r|r�r�rlrrrr��sh��
��
�
�zMozillaCookieJar._really_loadNFc
Cs|dur"|jdur|j}ntt��t|d���}|�|j�t��}|D]�}|sV|jrVqF|sf|�|�rfqF|j	rrd}nd}|j
�d�r�d}nd}|jdur�t
|j�}	nd}	|jdur�d}
|j}n|j}
|j}|�d�|j
||j||	|
|g�d�qFWd�n1�s0YdS)Nr�r�ZFALSEr�rXr�r�)ryrLr~rr�r�rMr�r�r�r�rvr�ror|r{r�r�)r�ryr{r|rr�r�r�r�r�r{r|rrrr} s<


���zMozillaCookieJar.save)NFF)
r�r�r�r�rwrtrvr�r�r}rrrrr�s

Ar)N)N)Xr��__all__rwr�r-rwrMZurllib.parser�Zurllib.requestZ	threadingr?Zhttp.clientZhttpZcalendarr
rrrroZclientZ	HTTP_PORTr�r~rr%r,r6r7rIr(rurKr5r8r>rtrur?rFrUrZ�Ir^�Xr`rcrdrfrlrprqrsrrr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrrr4r7r;rr�rrr�rrrrrr�<module>s�


8��
�8
�!



U
D'


#b!b7x

Zerion Mini Shell 1.0