§
    ¸)ýfÍ. ã                   óÊ  — d Z g d¢ZddlZddlZddlZddlZddlZddlZddl	Zddl
ZddlZddlmZ dZdad„ ZdZdZ eej        j        ¦  «        Z ej        d	¦  «        Zd
ZdZd„ ZdZd„ Zg d¢Z g d¢Z!d„ e!D ¦   «         Z"dLd„Z#dLd„Z$dddddœZ% ej        dej&        ¦  «        Z'd„ Z(d„ Z) ej        dej&        ¦  «        Z* ej        dej+        ej&        z  ¦  «        Z, ej        dej-        ej&        z  ¦  «        Z.d„ Z/ ej        dej-        ej&        z  ¦  «        Z0d„ Z1d„ Z2 ej        d¦  «        Z3 ej        d ¦  «        Z4 ej        d!¦  «        Z5 ej        d"¦  «        Z6d#„ Z7 ej        d$¦  «        Z8d%„ Z9d&„ Z:d'„ Z; ej        d(ej&        ¦  «        Z<d)„ Z=d*„ Z>d+„ Z?d,„ Z@ ej        d-ej&        ¦  «        ZAd.„ ZBd/„ ZCd0„ ZDd1„ ZEd2ZF ej        d3¦  «        ZGd4„ ZHd5„ ZId6„ ZJd7„ ZK G d8„ d9¦  «        ZL G d:„ d;¦  «        ZM G d<„ d=eM¦  «        ZNd>„ ZO G d?„ d@¦  «        ZP G dA„ dB¦  «        ZQ G dC„ dDeR¦  «        ZS G dE„ dFeQ¦  «        ZTdG„ ZU G dH„ dIeT¦  «        ZV G dJ„ dKeT¦  «        ZWdS )Maª  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)ÚtimegmFc                  óp   — t           sd S t          sdd l}|                     d¦  «        at          j         | Ž S )Nr
   zhttp.cookiejar)ÚdebugÚloggerÚloggingÚ	getLogger)Úargsr   s     úZ/home/blender/git/blender-v430/install_release/4.3/python/lib/python3.11/http/cookiejar.pyÚ_debugr   ,   sA   € Ýð Øˆåð 5ØˆˆˆØ×"Ò"Ð#3Ñ4Ô4ˆÝŒ<˜ÐÐó    ÚHTTPOnlyz
#HttpOnly_z#( Netscape)? HTTP Cookie FilezQa filename was not supplied (nor was the CookieJar instance initialised with one)zr# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html
# This is a generated file!  Do not edit.

c                  óÎ   — dd l } dd l}dd l}|                      ¦   «         }|                     d |¦  «         |                     ¦   «         }|                     d|z  d¬¦  «         d S )Nr
   zhttp.cookiejar bug!
%sé   )Ú
stacklevel)ÚioÚwarningsÚ	tracebackÚStringIOÚ	print_excÚgetvalueÚwarn)r   r   r   ÚfÚmsgs        r   Ú_warn_unhandled_exceptionr"   B   sz   € ð #Ð"Ð"Ð"Ð"Ð"Ð"Ð"Ð"Ð"Ð"Ð"Ø
�Š‰Œ€AØ×Ò˜˜aÑ Ô Ð Ø
�*Š*‰,Œ,€CØ‡M‚MÐ+¨cÑ1¸a€MÑ@Ô@Ð@Ð@Ð@r   i²  c                 óü   — | d d…         \  }}}}}}|t           k    r_d|cxk    rdk    rRn nOd|cxk    rdk    rBn n?d|cxk    rdk    r2n n/d|cxk    rdk    r"n nd|cxk    rdk    rn nt          | ¦  «        S d S )	Né   é   é   é   r
   é   é;   é=   )Ú
EPOCH_YEARr   )ÚttÚyearÚmonthÚmdayÚhourÚminÚsecs          r   Ú_timegmr3   Q   sº   € Ø(*¨2¨A¨2¬Ñ%€Dˆ%��t˜S #Ø	•Ò	Ð	 ! uÐ"2Ð"2Ò"2Ð"2°Ò"2Ð"2Ð"2Ð"2Ð"2¸¸d¸¸º¸Àbº¸¸¸¸Ø	
ˆdˆˆŠˆ�bŠˆˆˆˆ˜q C˜~˜~š~˜~¨2š~˜~˜~˜~˜~°A¸°N°N²N°NÀ²N°N°N°N°NÝ�b‰zŒzÐàˆtr   )ÚMonÚTueÚWedÚThuÚFriÚSatÚSun)ÚJanÚFebÚMarÚAprÚMayÚJunÚJulÚAugÚSepÚOctÚNovÚDecc                 ó6   — g | ]}|                      ¦   «         ‘ŒS © )Úlower)Ú.0r.   s     r   ú
<listcomp>rK   \   s    € Ð2Ð2Ð2 %�—’‘”Ð2Ð2Ð2r   c                 óÔ   — | €t           j                              ¦   «         }nt           j                              | ¦  «        }d|j        |j        |j        |j        |j        |j        fz  S )aH  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 "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.   Údayr0   ÚminuteÚsecond©ÚtÚdts     r   Ú	time2isozrV   ^   sc   € ð 	€yÝÔ×%Ò%Ñ'Ô'ˆˆåÔ×/Ò/°Ñ2Ô2ˆØ+Ø
Œ�”˜2œ6 2¤7¨B¬I°r´yð/Bñ Bð Br   c                 ó,  — | €t           j                              ¦   «         }nt           j                              | ¦  «        }dt          |                     ¦   «                  |j        t          |j        dz
           |j        |j	        |j
        |j        fz  S )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%   )rM   rN   rO   ÚDAYSÚweekdayrP   ÚMONTHSr.   r-   r0   rQ   rR   rS   s     r   Útime2netscaper[   q   sy   € ð 	€yÝÔ×%Ò%Ñ'Ô'ˆˆåÔ×/Ò/°Ñ2Ô2ˆØ0ÝˆR�ZŠZ‰\Œ\Ô˜BœF¥F¨2¬8°A©:Ô$6Ø
Œ�”˜"œ) R¤Yð40ñ 0ð 0r   )ÚGMTÚUTCÚUTÚZz^([-+])?(\d\d?):?(\d\d)?$c                 óV  — d }| t           v rd}nšt                               | ¦  «        }|r~dt          |                     d¦  «        ¦  «        z  }|                     d¦  «        r(|dt          |                     d¦  «        ¦  «        z  z   }|                     d¦  «        dk    r| }|S )Nr
   i  r   é   é<   r%   ú-)Ú	UTC_ZONESÚTIMEZONE_REÚsearchÚintÚgroup)ÚtzÚoffsetÚms      r   Úoffset_from_tz_stringrl   ˆ   sž   € Ø€FØ	�Y€€Øˆˆå×Ò˜rÑ"Ô"ˆØð 	!Ø�C §¢¨¡
¤
™OœOÑ+ˆFØ�wŠw�q‰zŒzð 7Ø "¥s¨1¯7ª7°1©:¬:¡¤Ñ"6Ñ6�Ø�wŠw�q‰zŒz˜SÒ Ð Ø ˜�Ø€Mr   c           	      ó.  — t          |¦  «        }|t          j        k    rd S 	 t                               |                     ¦   «         ¦  «        dz   }nI# t          $ r< 	 t          |¦  «        }n# t          $ r Y Y d S w xY wd|cxk    rdk    rn n|}nY d S Y nw xY w|€d}|€d}|€d}t          | ¦  «        } t          |¦  «        }t          |¦  «        }t          |¦  «        }|dk     rct          j        t          j        ¦   «         ¦  «        d         }|dz  }	|}
||z   |	z
  }|	|
z
  }	t          |	¦  «        dk    r|	dk    r|dz   }n|dz
  }t          ||| ||||f¦  «        }|�0|€d}|                     ¦   «         }t          |¦  «        }|€d S ||z
  }|S )Nr%   r&   r
   iè  éd   é2   r]   )rg   rM   ÚMAXYEARÚMONTHS_LOWERÚindexrI   Ú
ValueErrorÚtimeÚ	localtimeÚabsr3   Úupperrl   )rP   ÚmonÚyrÚhrr1   r2   ri   ÚimonÚcur_yrrk   ÚtmprT   rj   s                r   Ú	_str2timer~   –   sà  € Ý	ˆR‰Œ€BØ	�HÔÒÐØˆtðÝ× Ò  §¢¡¤Ñ-Ô-¨aÑ/ˆˆøÝð 	ð 	ð 	ð	Ý�s‘8”8ˆDˆDøÝð 	ð 	ð 	Ø�4�4�4ð	øøøà�ˆ?ˆ?Š?ˆ?˜Š?ˆ?ˆ?ˆ?ˆ?ØˆCˆCà�4�4ð ˆCð	øøøð 
€z˜�2Ø
€{˜!�CØ
€{˜!�Cå
ˆc‰(Œ(€CÝ	ˆR‰Œ€BÝ
ˆc‰(Œ(€CÝ
ˆc‰(Œ(€Cà	ˆD‚y€yå”¥¤	¡¤Ñ,Ô,¨QÔ/ˆØ�S‰LˆØˆØ�&‰[˜1‰_ˆØ�‰GˆÝˆq‰6Œ6�BŠ;ˆ;Ø�1Šuˆu˜2 ™8�b�bØ˜C‘x�"õ 	��S˜#˜r 3¨¨RÐ0Ñ1Ô1€Aà€}àˆ:ØˆBØ�XŠX‰ZŒZˆÝ& rÑ*Ô*ˆØˆ>Ø�4Ø�‰Jˆà€Hs5   £/A Á
BÁA.Á-BÁ.
A=Á8BÁ<A=Á=BÂBzV^[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*
    )?$c           	      óÔ  — t                                | ¦  «        }|r¿|                     ¦   «         }t                               |d                              ¦   «         ¦  «        dz   }t          |d         ¦  «        |t          |d         ¦  «        t          |d         ¦  «        t          |d         ¦  «        t          |d         ¦  «        f}t          |¦  «        S |  	                    ¦   «         } t                               d| d¦  «        } dgd	z  \  }}}}}}	}
t                               | ¦  «        }|�|                     ¦   «         \  }}}}}}	}
ndS t          ||||||	|
¦  «        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.

    r%   r   r
   ra   é   é   Ú Né   )ÚSTRICT_DATE_RErf   Úgroupsrq   rr   rI   rg   Úfloatr3   ÚlstripÚ
WEEKDAY_REÚsubÚLOOSE_HTTP_DATE_REr~   )Útextrk   Úgrx   r,   rP   ry   rz   r1   r2   ri   s              r   Ú	http2timer�   è   s:  € õ< 	×Ò˜dÑ#Ô#€AØð Ø�HŠH‰JŒJˆÝ× Ò   1¤§¢¡¤Ñ.Ô.°Ñ2ˆÝ�!�A”$‰iŒi˜�c ! A¤$™iœiÝ�!�A”$‰iŒi�˜Q˜qœT™œ¥E¨!¨A¬$¡K¤Kð1ˆå�r‰{Œ{Ðð
 �;Š;‰=Œ=€DÝ�>Š>˜"˜d AÑ&Ô&€Dð '+ V¨A¡XÑ"€Cˆˆb�"�c˜3 õ 	×!Ò! $Ñ'Ô'€AØ€}Ø)*¯ª©¬Ñ&ˆˆS�"�b˜#˜s B Bàˆtå�S˜#˜r 2 s¨C°Ñ4Ô4Ð4r   aÖ  ^
    (\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           	      óè   — |                       ¦   «         } dgdz  \  }}}}}}}t                               | ¦  «        }|�|                     ¦   «         \  }}}}}}}}	ndS t	          |||||||¦  «        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

    Nrƒ   )r‡   ÚISO_DATE_RErf   r…   r~   )
r‹   rP   rx   ry   rz   r1   r2   ri   rk   Ú_s
             r   Úiso2timer‘   2  sˆ   € ð �;Š;‰=Œ=€Dð '+ V¨A¡XÑ"€Cˆˆb�"�c˜3 õ 	×Ò˜4Ñ Ô €AØ€}ð -.¯HªH©J¬JÑ)ˆˆC��b˜#˜s B¨¨àˆtå�S˜#˜r 2 s¨C°Ñ4Ô4Ð4r   c                 óp   — |                       d¦  «        \  }}| j        d|…         | j        |d…         z   S )z)Return unmatched part of re.Match object.r
   N)ÚspanÚstring)ÚmatchÚstartÚends      r   Ú	unmatchedr˜   S  s6   € à—’˜A‘”�J€Eˆ3ØŒ<˜˜˜Ô ¤¨S¨T¨TÔ 2Ñ2Ð2r   z^\s*([^=\s;,]+)z&^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"z^\s*=\s*([^\s;,]*)z\\(.)c                 óÀ  — t          | t          ¦  «        rJ ‚g }| D �]À}|}g }|�rŸt                               |¦  «        }|rït	          |¦  «        }|                     d¦  «        }t                               |¦  «        }|r@t	          |¦  «        }|                     d¦  «        }t                               d|¦  «        }nWt                               |¦  «        }|r9t	          |¦  «        }|                     d¦  «        }| 
                    ¦   «         }nd}|                     ||f¦  «         n‘|                     ¦   «                              d¦  «        r6|                     ¦   «         dd…         }|r|                     |¦  «         g }n4t          j        dd|¦  «        \  }}	|	dk    sJ d|›d	|›d
|›�¦   «         ‚|}|�°Ÿ|r|                     |¦  «         �ŒÂ|S )am  Parse 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"')]]

    r%   z\1Nú,z^[=\s;]*r‚   r
   zsplit_header_words bug: 'z', 'z', )Ú
isinstanceÚstrÚHEADER_TOKEN_RErf   r˜   rh   ÚHEADER_QUOTED_VALUE_REÚHEADER_ESCAPE_REr‰   ÚHEADER_VALUE_REÚrstripÚappendr‡   Ú
startswithÚreÚsubn)
Úheader_valuesÚresultr‹   Ú	orig_textÚpairsrk   ÚnameÚvalueÚnon_junkÚnr_junk_charss
             r   Úsplit_header_wordsr®   \  sõ  € õZ ˜-­Ñ-Ô-Ð-Ð-Ð-Ø€FØð #'ñ #'ˆØˆ	ØˆØñ 	 Ý×&Ò& tÑ,Ô,ˆAØð  Ý  ‘|”|�Ø—w’w˜q‘z”z�Ý*×1Ò1°$Ñ7Ô7�Øð %Ý$ Q™<œ<�DØŸGšG A™JœJ�EÝ,×0Ò0°¸Ñ>Ô>�E�Eå'×.Ò.¨tÑ4Ô4�AØð %Ý(¨™|œ|˜Ø !§¢¨¡
¤
˜Ø %§¢¡¤˜˜ð !%˜Ø—’˜d E˜]Ñ+Ô+Ð+Ð+Ø—’‘”×)Ò)¨#Ñ.Ô.ð  à—{’{‘}”} Q R RÔ(�ØÐ.˜&Ÿ-š-¨Ñ.Ô.Ð.Ø��õ +-¬'°+¸rÀ4Ñ*HÔ*HÑ'�˜-Ø$ qÒ(Ð(Ð(Ð(à�Y�Y    e eð-ñ )Ô(Ð(ð  �ð? ñ 	 ð@ Ð&�&—-’- Ñ&Ô&Ð&ùØ€Mr   ú([\"\\])c                 óH  — g }| D ]‰}g }|D ]X\  }}|�<t          j        d|¦  «        s t                               d|¦  «        }d|z  }|›d|›�}|                     |¦  «         ŒY|r(|                     d                     |¦  «        ¦  «         ŒŠd                     |¦  «        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"ú=ú; ú, )r¤   rf   ÚHEADER_JOIN_ESCAPE_REr‰   r¢   Újoin)ÚlistsÚheadersr©   ÚattrÚkÚvs         r   Újoin_header_wordsr¼   ²  s¼   € ð €GØð 	1ð 	1ˆØˆØð 	ð 	‰DˆAˆqØˆ}Ý”y ¨1Ñ-Ô-ð #Ý-×1Ò1°'¸1Ñ=Ô=�AØ ™
�AØ ˜q˜q ! !Ð$�Ø�KŠK˜‰NŒNˆNˆNØÐ0�—’ §	¢	¨$¡¤Ñ0Ô0Ð0øØ�9Š9�WÑÔÐr   c                 ó‚   — |                       d¦  «        r
| dd …         } |                      d¦  «        r
| d d…         } | S )Nú"r%   éÿÿÿÿ)r£   Úendswith©r‹   s    r   Ústrip_quotesrÂ   Ë  sI   € Ø‡‚�sÑÔð Ø�A�B�BŒxˆØ‡}‚}�SÑÔð Ø�C�R�CŒyˆØ€Kr   c                 ó‚  — d}g }| D �]6}g }d}t          |                     d¦  «        ¦  «        D ]Þ\  }}|                     ¦   «         }|                     d¦  «        \  }}	}
|                     ¦   «         }|s	|dk    r n�ŒQ|	r|
                     ¦   «         nd}
|dk    rX|                     ¦   «         }||v r|}|dk    r|
�t          |
¦  «        }
d}n$|d	k    r|
�t          t          |
¦  «        ¦  «        }
|                     ||
f¦  «         Œß|r,|s|                     d
¦  «         |                     |¦  «         �Œ8|S )a5  Ad-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²   r
   NrÈ   TrÄ   )rÈ   Ú0)Ú	enumerateÚsplitÚstripÚ	partitionrI   rÂ   r�   r¢   )Ú
ns_headersÚknown_attrsr§   Ú	ns_headerr©   Úversion_setÚiiÚparamÚkeyÚsepÚvalÚlcs               r   Úparse_ns_headersrÛ   Ò  sw  € ð1€Kð €FØð +!ñ +!ˆ	ØˆØˆõ # 9§?¢?°3Ñ#7Ô#7Ñ8Ô8ð 	%ð 	%‰IˆB�Ø—K’K‘M”MˆEà!ŸOšO¨CÑ0Ô0‰MˆC��cØ—)’)‘+”+ˆCàð Ø˜’7�7Ø�Eàð "%Ð.�#—)’)‘+”+�+¨$ˆCà�QŠwˆwØ—Y’Y‘[”[�Ø˜Ð$Ð$Ø�Cà˜)Ò#Ð#à�Ý*¨3Ñ/Ô/˜Ø"&�K�KØ˜IÒ%Ð%à�Ý'­°SÑ(9Ô(9Ñ:Ô:˜Ø�LŠL˜#˜s˜Ñ$Ô$Ð$Ð$àð 	!Øð /Ø—’Ð-Ñ.Ô.Ð.Ø�MŠM˜%Ñ Ô Ð ùà€Mr   z\.\d+$c                 ó‚   — t                                | ¦  «        rdS | dk    rdS | d         dk    s| d         dk    rdS dS )z*Return True if text is a host domain name.Fr‚   r
   ú.r¿   T©ÚIPV4_RErf   rÁ   s    r   Úis_HDNrà     sN   € õ ‡~‚~�dÑÔð ØˆuØˆr‚z€zØˆuØˆA„w�#‚~€~˜˜bœ Sš˜ØˆuØˆ4r   c                 ó.  — |                       ¦   «         } |                      ¦   «         }| |k    rdS t          | ¦  «        sdS |                      |¦  «        }|dk    s|dk    rdS |                     d¦  «        sdS t          |dd…         ¦  «        sdS dS )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Ý   r%   N)rI   rà   Úrfindr£   )ÚAÚBÚis      r   Údomain_matchræ   &  s�   € ð. 	
�Š‰	Œ	€AØ	�Š‰	Œ	€AØˆA‚v€vØˆtÝ�!‰9Œ9ð ØˆuØ	�Š�‰
Œ
€AØˆB‚w€w�!�q’&�&àˆuØ�<Š<˜ÑÔð ØˆuÝ�!�A�B�B”%‰=Œ=ð ØˆuØˆ4r   c                 ó>   — t                                | ¦  «        rdS dS )zdReturn True if text is a sort-of-like a host domain name.

    For accepting/blocking domains.

    FTrÞ   rÁ   s    r   Úliberal_is_HDNrè   M  s"   € õ ‡~‚~�dÑÔð ØˆuØˆ4r   c                 ó  — |                       ¦   «         } |                      ¦   «         }t          | ¦  «        rt          |¦  «        s
| |k    rdS dS |                     d¦  «        }|r|                      |¦  «        rdS |s| |k    rdS dS )z\For blocking/accepting domains.

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

    TFrÝ   )rI   rè   r£   rÀ   )rã   rä   Úinitial_dots      r   Úuser_domain_matchrë   W  s™   € ð 	
�Š‰	Œ	€AØ	�Š‰	Œ	€AÝ˜1ÑÔð ¥.°Ñ"3Ô"3ð Ø�Š6ˆ6à�4ØˆuØ—,’,˜sÑ#Ô#€KØð �q—z’z !‘}”}ð ØˆtØð ˜1 š6˜6ØˆtØˆ5r   z:\d+$c                 ó  — |                       ¦   «         }t          j                             |¦  «        d         }|dk    r|                      dd¦  «        }t
                               d|d¦  «        }|                     ¦   «         S )zˆReturn request-host, as defined by RFC 2965.

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

    r%   r‚   ÚHost)Úget_full_urlÚurllibÚparseÚurlparseÚ
get_headerÚcut_port_rer‰   rI   )ÚrequestÚurlÚhosts      r   Úrequest_hostr÷   l  sr   € ð ×
Ò
Ñ
 Ô
 €CÝŒ<× Ò  Ñ%Ô% aÔ(€DØˆr‚z€zØ×!Ò! &¨"Ñ-Ô-ˆõ �?Š?˜2˜t QÑ'Ô'€DØ�:Š:‰<Œ<Ðr   c                 óœ   — t          | ¦  «        x}}|                     d¦  «        dk    rt                               |¦  «        s|dz   }||fS )zzReturn a tuple (request-host, effective request-host name).

    As defined by RFC 2965, except both are lowercased.

    rÝ   r¿   ú.local)r÷   Úfindrß   rf   )rô   ÚerhnÚreq_hosts      r   Úeff_request_hostrý   |  sR   € õ # 7Ñ+Ô+Ð+€Dˆ8Ø‡}‚}�SÑÔ˜RÒÐ­¯ª°xÑ(@Ô(@ÐØ˜(Ñ"ˆØ�Tˆ>Ðr   c                 óÈ   — |                       ¦   «         }t          j                             |¦  «        }t	          |j        ¦  «        }|                     d¦  «        sd|z   }|S )z6Path component of request-URI, as defined by RFC 2965.ú/)rî   rï   rð   ÚurlsplitÚescape_pathrÆ   r£   )rô   rõ   ÚpartsrÆ   s       r   Úrequest_pathr  ‡  sY   € à
×
Ò
Ñ
 Ô
 €CÝŒL×!Ò! #Ñ&Ô&€EÝ�u”zÑ"Ô"€DØ�?Š?˜3ÑÔð à�T‰zˆØ€Kr   c                 óÖ   — | j         }|                     d¦  «        }|dk    r?||dz   d …         }	 t          |¦  «         n(# t          $ r t	          d|¦  «         Y d S w xY wt
          }|S )Nú:r
   r%   znonnumeric port: '%s')rö   rú   rg   rs   r   ÚDEFAULT_HTTP_PORT)rô   rö   rå   rÉ   s       r   Úrequest_portr  ‘  sƒ   € ØŒ<€DØ�	Š	�#‰Œ€AØˆA‚v€vØ�A�a‘C�D�DŒzˆð	Ý�‰IŒIˆIˆIøÝð 	ð 	ð 	ÝÐ*¨DÑ1Ô1Ð1Ø�4�4ð	øøøõ !ˆØ€Ks   ±A ÁAÁAz%/;:@&=+$,!~*'()z%([0-9a-fA-F][0-9a-fA-F])c                 óV   — d|                       d¦  «                             ¦   «         z  S )Nz%%%sr%   )rh   rw   )r•   s    r   Úuppercase_escaped_charr	  £  s#   € Ø�E—K’K ‘N”N×(Ò(Ñ*Ô*Ñ*Ð*r   c                 ó�   — t           j                             | t          ¦  «        } t                               t          | ¦  «        } | S )zEEscape any invalid characters in HTTP URL, and uppercase all escapes.)rï   rð   ÚquoteÚHTTP_PATH_SAFEÚESCAPED_CHAR_REr‰   r	  )rÆ   s    r   r  r  ¥  s6   € õ Œ<×Ò˜d¥NÑ3Ô3€DÝ×ÒÕ5°tÑ<Ô<€DØ€Kr   c                 óÀ   — |                       d¦  «        }|dk    rB| |dz   d…         }|                      d¦  «        }t          | ¦  «        r|dk    s|dk    rd|z   S | S )aB  Return 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
   r%   NÚlocal)rú   rà   )Úhrå   Úbs      r   Úreachr  ³  sh   € ð4 	
�Šˆs‰Œ€AØˆA‚v€vàˆa�‰cˆdˆdŒGˆØ�FŠF�3‰KŒKˆÝ�!‰9Œ9ð 	˜!˜qš&˜& A¨¢L LØ�q‘5ˆLØ€Hr   c                 ól   — t          | ¦  «        }t          |t          | j        ¦  «        ¦  «        sdS dS )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.

    TF)r÷   ræ   r  Úorigin_req_host)rô   rü   s     r   Úis_third_partyr  Ö  s8   € õ ˜GÑ$Ô$€HÝ˜¥%¨Ô(?Ñ"@Ô"@ÑAÔAð Øˆtàˆur   c                   óD   — e Zd ZdZ	 dd„Zd„ Zdd„Zd„ Zdd„Zd	„ Z	d
„ Z
dS )r   aÐ  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.

    Fc                 óÄ  — |�t          |¦  «        }|�t          t          |¦  «        ¦  «        }|€|du rt          d¦  «        ‚|| _        || _        || _        || _        || _        |                     ¦   «         | _	        || _
        || _        |	| _        |
| _        || _        || _        || _        || _        || _        || _        t)          j        |¦  «        | _        d S )NTz-if port is None, port_specified must be false)rg   r†   rs   rÈ   rª   r«   rÉ   Úport_specifiedrI   rÅ   Ú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  s                     r   Ú__init__zCookie.__init__ù  sÜ   € ð Ð­#¨g©,¬, ØÐ­#­e°G©n¬nÑ*=Ô*= Øˆ<˜N¨dÐ2Ð2ÝÐLÑMÔMÐMàˆŒØˆŒ	ØˆŒ
ØˆŒ	Ø,ˆÔà—l’l‘n”nˆŒØ 0ˆÔð
 #5ˆÔØˆŒ	Ø,ˆÔØˆŒØˆŒØˆŒØˆŒØ&ˆÔØˆŒå”Y˜t‘_”_ˆŒ
ˆ
ˆ
r   c                 ó   — || j         v S ©N©r!  )r"  rª   s     r   Úhas_nonstandard_attrzCookie.has_nonstandard_attr#  s   € Ø�t”zÐ!Ð!r   Nc                 ó8   — | j                              ||¦  «        S r&  )r!  Úget)r"  rª   Údefaults      r   Úget_nonstandard_attrzCookie.get_nonstandard_attr%  s   € ØŒz�~Š~˜d GÑ,Ô,Ð,r   c                 ó   — || j         |<   d S r&  r'  )r"  rª   r«   s      r   Úset_nonstandard_attrzCookie.set_nonstandard_attr'  s   € Ø ˆŒ
�4ÑÐÐr   c                 óX   — |€t          j         ¦   «         }| j        �| j        |k    rdS dS ©NTF)rt   rÄ   )r"  Únows     r   Ú
is_expiredzCookie.is_expired*  s/   € Øˆ;�dœi™kœk˜ØŒLÐ$¨4¬<¸3Ò+>Ð+>Ø�4Øˆur   c                 ó    — | j         €d}n
d| j         z   }| j        |z   | j        z   }| j        �| j        ›d| j        ›�}n| j        }d|›d|›d�S )Nr‚   r  r²   z<Cookie z for ú>)rÉ   rÅ   rÆ   r«   rª   )r"  ÚpÚlimitÚ	namevalues       r   Ú__str__zCookie.__str__0  sf   € ØŒ9Ð "˜a˜aØ�d”i‘-ˆaØ”˜a‘ $¤)Ñ+ˆØŒ:Ð!Ø#'¤9 9 9¨d¬j¨jÐ9ˆIˆIàœ	ˆIøØ'0 y y°%°%°%Ð8Ð8r   c                 óp  — g }dD ]9}t          | |¦  «        }|                     |›dt          |¦  «        ›�¦  «         Œ:|                     dt          | j        ¦  «        z  ¦  «         |                     dt          | j        ¦  «        z  ¦  «         | j        j        ›dd                     |¦  «        ›d�S )N)rÈ   rª   r«   rÉ   r  rÅ   r  r  rÆ   r  rÇ   rÄ   r  r  r  r²   zrest=%sz
rfc2109=%sú(r´   ú))Úgetattrr¢   Úreprr!  r  Ú	__class__Ú__name__r¶   )r"  r   rª   r¹   s       r   Ú__repr__zCookie.__repr__:  sµ   € Øˆðð 	6ð 	6ˆDõ ˜4 Ñ&Ô&ˆDØ�KŠK 4 4 4­¨d©¬¨Ð4Ñ5Ô5Ð5Ð5Ø�Š�I¥ T¤ZÑ 0Ô 0Ñ0Ñ1Ô1Ð1Ø�Š�L¥4¨¬Ñ#5Ô#5Ñ5Ñ6Ô6Ð6Øœ>Ô2Ð2Ð2°D·I²I¸d±O´O°O°OÐDÐDr   )Fr&  )r?  Ú
__module__Ú__qualname__Ú__doc__r$  r(  r,  r.  r2  r8  r@  rH   r   r   r   r   ç  s¡   € € € € € ðð ð6 ð(%ð (%ð (%ð (%ðT"ð "ð "ð-ð -ð -ð -ð!ð !ð !ðð ð ð ð9ð 9ð 9ðEð Eð Eð Eð Er   r   c                   ó*   — e Zd ZdZd„ Zd„ Zd„ Zd„ ZdS )r   a   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.

    c                 ó   — t          ¦   «         ‚)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.

        ©ÚNotImplementedError©r"  Úcookierô   s      r   Úset_okzCookiePolicy.set_okR  s   € õ "Ñ#Ô#Ð#r   c                 ó   — t          ¦   «         ‚)zAReturn true if (and only if) cookie should be returned to server.rF  rH  s      r   Ú	return_okzCookiePolicy.return_ok[  ó   € å!Ñ#Ô#Ð#r   c                 ó   — dS )zMReturn false if cookies should not be returned, given cookie domain.
        TrH   )r"  rÅ   rô   s      r   Údomain_return_okzCookiePolicy.domain_return_ok_  ó	   € ð ˆtr   c                 ó   — dS )zKReturn false if cookies should not be returned, given cookie path.
        TrH   )r"  rÆ   rô   s      r   Úpath_return_okzCookiePolicy.path_return_okd  rP  r   N)r?  rA  rB  rC  rJ  rL  rO  rR  rH   r   r   r   r   I  sZ   € € € € € ðð ð$ð $ð $ð$ð $ð $ðð ð ð
ð ð ð ð r   r   c                   óÒ   — e Zd ZdZdZdZdZdZeez  Zdddddddddeddd	fd
„Z	d„ Z
d„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd „ ZdS )!r   zBImplements the standard rules for accepting and returning cookies.r%   r   r€   r
   NTF)ÚhttpsÚwssc                 ó  — || _         || _        || _        || _        || _        || _        |	| _        |
| _        || _        || _	        || _
        |�t          |¦  «        | _        nd| _        |�t          |¦  «        }|| _        dS )zAConstructor arguments should be passed as keyword arguments only.NrH   )Ú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_domainsrW  rX  rY  rZ  r[  r\  r]  r^  r_  r`  ra  s                 r   r$  zDefaultCookiePolicy.__init__t  sœ   € ð !ˆŒØˆŒØ#6ˆÔ Ø(ˆÔØ*ˆÔØ+FˆÔ(Ø&<ˆÔ#Ø 0ˆÔØ,HˆÔ)Ø"4ˆÔØ 0ˆÔàÐ&Ý$)¨/Ñ$:Ô$:ˆDÔ!Ð!à$&ˆDÔ!àÐ&Ý# OÑ4Ô4ˆOØ /ˆÔÐÐr   c                 ó   — | j         S )z4Return the sequence of blocked domains (as a tuple).)rc  ©r"  s    r   re  z#DefaultCookiePolicy.blocked_domains—  ó   € àÔ$Ð$r   c                 ó.   — t          |¦  «        | _        dS )z$Set the sequence of blocked domains.N)rb  rc  )r"  re  s     r   Úset_blocked_domainsz'DefaultCookiePolicy.set_blocked_domainsš  s   € å % oÑ 6Ô 6ˆÔÐÐr   c                 ó@   — | j         D ]}t          ||¦  «        r dS ŒdS r0  )rc  rë   )r"  rÅ   Úblocked_domains      r   Ú
is_blockedzDefaultCookiePolicy.is_blockedž  s7   € Ø"Ô3ð 	ð 	ˆNÝ  ¨Ñ8Ô8ð Ø�t�tðàˆur   c                 ó   — | j         S )z=Return None, or the sequence of allowed domains (as a tuple).)rd  rh  s    r   rf  z#DefaultCookiePolicy.allowed_domains¤  ri  r   c                 ó6   — |�t          |¦  «        }|| _        dS )z-Set the sequence of allowed domains, or None.N)rb  rd  )r"  rf  s     r   Úset_allowed_domainsz'DefaultCookiePolicy.set_allowed_domains§  s#   € àÐ&Ý# OÑ4Ô4ˆOØ /ˆÔÐÐr   c                 óR   — | j         €dS | j         D ]}t          ||¦  «        r dS ŒdS )NFT)rd  rë   )r"  rÅ   Úallowed_domains      r   Úis_not_allowedz"DefaultCookiePolicy.is_not_allowed­  sE   € ØÔ Ð(Ø�5Ø"Ô3ð 	ð 	ˆNÝ  ¨Ñ8Ô8ð Ø�u�uðàˆtr   c                 ó    — t          d|j        |j        ¦  «         |j        €J ‚dD ]&}d|z   }t          | |¦  «        } |||¦  «        s dS Œ'dS )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É   Úset_ok_FT©r   rª   r«   r<  ©r"  rI  rô   ÚnÚfn_nameÚfns         r   rJ  zDefaultCookiePolicy.set_okµ  sw   € õ 	Ð)¨6¬;¸¼ÑEÔEÐEàŒ{Ð&Ð&Ð&àMð 	ð 	ˆAØ ‘kˆGÝ˜˜wÑ'Ô'ˆBØ�2�f˜gÑ&Ô&ð Ø�u�uðð ˆtr   c                 óÚ   — |j         €t          d|j        |j        ¦  «         dS |j         dk    r| j        st          d¦  «         dS |j         dk    r| j        st          d¦  «         dS dS )Nz0   Set-Cookie2 without version attribute (%s=%s)Fr
   ú$   RFC 2965 cookies are switched offú$   Netscape cookies are switched offT)rÈ   r   rª   r«   rX  rW  rH  s      r   Úset_ok_versionz"DefaultCookiePolicy.set_ok_versionÈ  s„   € ØŒ>Ð!õ ÐEØ”; ¤ñ.ô .ð .à�5ØŒ>˜AÒÐ d¤lÐÝÐ9Ñ:Ô:Ð:Ø�5ØŒ^˜qÒ Ð ¨¬Ð ÝÐ9Ñ:Ô:Ð:Ø�5Øˆtr   c                 ó¾   — |j         rUt          |¦  «        rF|j        dk    r| j        rt	          d¦  «         dS |j        dk    r| j        rt	          d¦  «         dS dS ©Nr
   z>   third-party RFC 2965 cookie during unverifiable transactionFz>   third-party Netscape cookie during unverifiable transactionT©Úunverifiabler  rÈ   r\  r   r]  rH  s      r   Úset_ok_verifiabilityz(DefaultCookiePolicy.set_ok_verifiability×  sƒ   € ØÔð 	¥N°7Ñ$;Ô$;ð 	ØŒ~ Ò!Ð! dÔ&FÐ!Ýð 8ñ 9ô 9ð 9à�uØ” 1Ò$Ð$¨Ô)DÐ$Ýð 8ñ 9ô 9ð 9à�uØˆtr   c                 óŒ   — |j         dk    r8| j        r1|j                             d¦  «        rt	          d|j        ¦  «         dS dS )Nr
   ú$z'   illegal name (starts with '$'): '%s'FT)rÈ   r_  rª   r£   r   rH  s      r   Úset_ok_namezDefaultCookiePolicy.set_ok_nameã  sN   € ð ŒN˜aÒÐ DÔ$EÐØŒK×"Ò" 3Ñ'Ô'ð  åÐ<¸f¼kÑJÔJÐJØ�5Øˆtr   c                 óÒ   — |j         r_t          |¦  «        }|j        dk    s|j        dk    r:| j        r3|                      |j        |¦  «        st          d|j        |¦  «         dS dS )Nr
   z7   path attribute %s is not a prefix of request path %sFT)r  r  rÈ   r`  rR  rÆ   r   )r"  rI  rô   Úreq_paths       r   Úset_ok_pathzDefaultCookiePolicy.set_ok_pathì  s~   € ØÔ ð 	Ý# GÑ,Ô,ˆHØ” !Ò#Ð#Ø”. AÒ%Ð%¨$Ô*AÐ%Ø×'Ò'¨¬°WÑ=Ô=ð &åð !Ø"(¤+¨xñ9ô 9ð 9à�uØˆtr   c                 ó|  — |                       |j        ¦  «        rt          d|j        ¦  «         dS |                      |j        ¦  «        rt          d|j        ¦  «         dS |j        �rQt          |¦  «        \  }}|j        }| j        r |                     d¦  «        dk    r‡|                     d¦  «        }|                     dd|¦  «        }|dk    rU||dz   d …         }||dz   |…         }	|	 	                    ¦   «         dv r%t          |¦  «        dk    rt          d	|¦  «         dS |                     d¦  «        r|dd …         }
n|}
|
                     d¦  «        dk    }|s'|                     d
¦  «        st          d|¦  «         dS |j        dk    rm|                     |¦  «        sX|                     |
› d
�¦  «        s@|                     d¦  «        s+d|z                        |¦  «        st          d||¦  «         dS |j        dk    s| j        | j        z  r#t#          ||¦  «        st          d||¦  «         dS |j        dk    s| j        | j        z  r^|d t          |¦  «         …         }|                     d¦  «        dk    r-t&                               |¦  «        st          d||¦  «         dS dS )Nú"   domain %s is in user block-listFú&   domain %s is not in user allow-listrÝ   r   r
   r%   )ÚcoÚacÚcomÚeduÚorgÚnetÚgovÚmilrg   ÚaeroÚbizÚcatÚcoopÚinfoÚjobsÚmobiÚmuseumrª   ÚproÚtravelÚeuz&   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)rn  rÅ   r   rt  r  rý   r[  Úcountrâ   rI   Úlenr£   rú   rÀ   rÈ   r^  ÚDomainRFC2965Matchræ   ÚDomainStrictNoDotsrß   rf   )r"  rI  rô   rü   rû   rÅ   rå   ÚjÚtldÚsldÚundotted_domainÚembedded_dotsÚhost_prefixs                r   Úset_ok_domainz!DefaultCookiePolicy.set_ok_domain÷  s  € Ø�?Š?˜6œ=Ñ)Ô)ð 	ÝÐ7¸¼ÑGÔGÐGØ�5Ø×Ò˜vœ}Ñ-Ô-ð 	ÝÐ;¸V¼]ÑKÔKÐKØ�5ØÔ"ñ 2	!Ý-¨gÑ6Ô6‰NˆH�dØ”]ˆFØÔ!ð % v§|¢|°CÑ'8Ô'8¸AÒ'=Ð'=ð —L’L Ñ%Ô%�Ø—L’L  a¨Ñ+Ô+�Ø˜’6�6Ø   1¡  œ,�CØ   1¡ Q œ-�CØ—y’y‘{”{ð ''ð 'ð 'õ ,/¨s©8¬8°qª=¨=åÐGÈÑPÔPÐPØ$˜uØ× Ò  Ñ%Ô%ð )Ø"(¨¨¨¤*��à"(�Ø,×1Ò1°#Ñ6Ô6¸!Ò;ˆMØ ð ¨¯ª°xÑ)@Ô)@ð ÝÐHØñô ð à�uØŒ~ Ò"Ð"ØŸš vÑ.Ô.ð !ØŸš¨/Ð'AÐ'AÐ'AÑBÔBð!àŸš¨Ñ-Ô-ð!ð ˜d™(×,Ò,¨VÑ4Ô4ð!õ ð ?à ñ)ô )ð )ð !˜5Ø” Ò"Ð"ØÔ&¨Ô)@Ñ@ð #å# D¨&Ñ1Ô1ð !Ýð  Ø!% vñ/ô /ð /à ˜5Ø” Ò"Ð"ØÔ&¨Ô)@Ñ@ð #à& }­¨V©¬¨ }Ô5�Ø×$Ò$ SÑ)Ô)¨QÒ.Ð.ÝŸš xÑ0Ô0ð /åÐKØ&¨ñ0ô 0ð 0à ˜5Øˆtr   c                 ó:  — |j         r“t          |¦  «        }|€d}nt          |¦  «        }|j                             d¦  «        D ]=}	 t          |¦  «         n"# t          $ r t          d|¦  «         Y  dS w xY w||k    r nŒ>t          d||j        ¦  «         dS dS )NÚ80rš   z   bad port %s (not numeric)Fz$   request port (%s) not found in %sT)r  r  rœ   rÉ   rÎ   rg   rs   r   ©r"  rI  rô   Úreq_portr5  s        r   Úset_ok_portzDefaultCookiePolicy.set_ok_port3  sÕ   € ØÔ ð 	Ý# GÑ,Ô,ˆHØÐØ��å˜x™=œ=�Ø”[×&Ò& sÑ+Ô+ð ð �ð!Ý˜‘F”F�F�FøÝ!ð !ð !ð !ÝÐ9¸1Ñ=Ô=Ð=Ø ˜5˜5˜5ð!øøøð ˜’=�=Ø�Eð !õ Ð=Ø ¤ñ.ô .ð .à�uØˆts   ÁAÁA7Á6A7c                 óŽ   — t          d|j        |j        ¦  «         dD ]&}d|z   }t          | |¦  «        } |||¦  «        s dS Œ'dS )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).

        rv  )rÈ   rw  rÇ   rÄ   rÉ   rÅ   Ú
return_ok_FTry  rz  s         r   rL  zDefaultCookiePolicy.return_okH  sg   € õ 	Ð)¨6¬;¸¼ÑEÔEÐEàRð 	ð 	ˆAØ" 1‘nˆGÝ˜˜wÑ'Ô'ˆBØ�2�f˜gÑ&Ô&ð Ø�u�uðàˆtr   c                 ó’   — |j         dk    r| j        st          d¦  «         dS |j         dk    r| j        st          d¦  «         dS dS )Nr
   r  Fr€  T)rÈ   rX  r   rW  rH  s      r   Úreturn_ok_versionz%DefaultCookiePolicy.return_ok_versionZ  sW   € ØŒ>˜AÒÐ d¤lÐÝÐ9Ñ:Ô:Ð:Ø�5ØŒ^˜qÒ Ð ¨¬Ð ÝÐ9Ñ:Ô:Ð:Ø�5Øˆtr   c                 ó¾   — |j         rUt          |¦  «        rF|j        dk    r| j        rt	          d¦  «         dS |j        dk    r| j        rt	          d¦  «         dS dS rƒ  r„  rH  s      r   Úreturn_ok_verifiabilityz+DefaultCookiePolicy.return_ok_verifiabilityc  sƒ   € ØÔð 	¥N°7Ñ$;Ô$;ð 	ØŒ~ Ò!Ð! dÔ&FÐ!Ýð %ñ &ô &ð &à�uØ” 1Ò$Ð$¨Ô)DÐ$Ýð %ñ &ô &ð &à�uØˆtr   c                 óR   — |j         r|j        | j        vrt          d¦  «         dS dS )Nz(   secure cookie with non-secure requestFT)rÇ   Útypera  r   rH  s      r   Úreturn_ok_securez$DefaultCookiePolicy.return_ok_secureo  s4   € ØŒ=ð 	˜Wœ\°Ô1FÐFÐFÝÐ=Ñ>Ô>Ð>Ø�5Øˆtr   c                 ó\   — |                      | j        ¦  «        rt          d¦  «         dS dS )Nz   cookie expiredFT)r2  Ú_nowr   rH  s      r   Úreturn_ok_expiresz%DefaultCookiePolicy.return_ok_expiresu  s3   € Ø×Ò˜TœYÑ'Ô'ð 	ÝÐ&Ñ'Ô'Ð'Ø�5Øˆtr   c                 ó´   — |j         rPt          |¦  «        }|€d}|j                              d¦  «        D ]
}||k    r nŒt          d||j         ¦  «         dS dS )Nr¯  rš   z0   request port %s does not match cookie port %sFT)rÉ   r  rÎ   r   r°  s        r   Úreturn_ok_portz"DefaultCookiePolicy.return_ok_port{  s~   € ØŒ;ð 
	Ý# GÑ,Ô,ˆHØÐØ�Ø”[×&Ò& sÑ+Ô+ð ð �Ø˜’=�=Ø�Eð !õ ÐIØ ¤ñ.ô .ð .à�uØˆtr   c                 ó®  — t          |¦  «        \  }}|j        }|r|                     d¦  «        sd|z   }n|}|j        dk    r-| j        | j        z  r|j        s||k    rt          d¦  «         dS |j        dk    r#t          ||¦  «        st          d||¦  «         dS |j        dk    r+d|z    	                    |¦  «        st          d||¦  «         dS dS )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Å   r£   rÈ   r^  ÚDomainStrictNonDomainr  r   ræ   rÀ   )r"  rI  rô   rü   rû   rÅ   Ú	dotdomains          r   Úreturn_ok_domainz$DefaultCookiePolicy.return_ok_domain‰  s   € Ý)¨'Ñ2Ô2‰ˆ�$Ø”ˆàð 	˜&×+Ò+¨CÑ0Ô0ð 	Ø˜f™ˆIˆIàˆIð ŒN˜aÒÐØÔ" TÔ%?Ñ?ð  àÔ'ð  à,2°dªN¨NÝð -ñ .ô .ð .à�5àŒ>˜AÒÐ¥l°4¸Ñ&@Ô&@ÐÝð /Ø04°fñ>ô >ð >à�5ØŒ>˜QÒÐ¨¨D©×':Ò':¸9Ñ'EÔ'EÐÝð Ø! 6ñ+ô +ð +à�5Øˆtr   c                 óÄ  — t          |¦  «        \  }}|                     d¦  «        sd|z   }|                     d¦  «        sd|z   }|r|                     d¦  «        sd|z   }n|}|                     |¦  «        s|                     |¦  «        sdS |                      |¦  «        rt	          d|¦  «         dS |                      |¦  «        rt	          d|¦  «         dS dS )NrÝ   FrŽ  r�  T)rý   r£   rÀ   rn  r   rt  )r"  rÅ   rô   rü   rû   rÃ  s         r   rO  z$DefaultCookiePolicy.domain_return_ok¤  s	  € õ *¨'Ñ2Ô2‰ˆ�$Ø×"Ò" 3Ñ'Ô'ð 	$Ø˜8‘|ˆHØ�Š˜sÑ#Ô#ð 	Ø�t‘8ˆDØð 	˜&×+Ò+¨CÑ0Ô0ð 	Ø˜f™ˆIˆIàˆIØ×!Ò! )Ñ,Ô,ð 	°·²¸iÑ0HÔ0Hð 	ð �5à�?Š?˜6Ñ"Ô"ð 	ÝÐ7¸Ñ@Ô@Ð@Ø�5Ø×Ò˜vÑ&Ô&ð 	ÝÐ;¸VÑDÔDÐDØ�5àˆtr   c                 ó  — t          d|¦  «         t          |¦  «        }t          |¦  «        }||k    rdS |                     |¦  «        r(|                     d¦  «        s|||dz   …         dk    rdS t          d||¦  «         dS )Nz- checking cookie path=%sTrÿ   r%   z  %s does not path-match %sF)r   r  r¤  r£   rÀ   )r"  rÆ   rô   r‹  Úpathlens        r   rR  z"DefaultCookiePolicy.path_return_ok¾  s›   € ÝÐ*¨DÑ1Ô1Ð1Ý Ñ(Ô(ˆÝ�d‘)”)ˆØ�tÒÐØ�4Ø×!Ò! $Ñ'Ô'ð 	Ø�}Š}˜SÑ!Ô!ð	Ø%-¨g°g¸a±iÐ.?Ô%@ÀCÒ%GÐ%GØ�4åÐ,¨h¸Ñ=Ô=Ð=Øˆur   ) r?  rA  rB  rC  r¦  rÂ  r¥  ÚDomainLiberalÚDomainStrictr$  re  rk  rn  rf  rq  rt  rJ  r�  r†  r‰  rŒ  r­  r²  rL  r¶  r¸  r»  r¾  rÀ  rÄ  rO  rR  rH   r   r   r   r   j  sÃ  € € € € € ØLÐLàÐØÐØÐà€MØ%Ð&;Ñ;€Lð "&°tØ¨Ø%)Ø#Ø$Ø-1Ø(-Ø"/Ø.3Ø$)Ø"2ð!0ð !0ð !0ð !0ðF%ð %ð %ð7ð 7ð 7ðð ð ð%ð %ð %ð0ð 0ð 0ðð ð ðð ð ð&ð ð ð
ð 
ð 
ðð ð ð	ð 	ð 	ð:ð :ð :ðxð ð ð*ð ð ð$ð ð ð
ð 
ð 
ðð ð ðð ð ðð ð ðð ð ð6ð ð ð4ð ð ð ð r   r   c              #   óÂ   K  — t          |                      ¦   «         ¦  «        D ]:}d} 	 |j         d} t          |¦  «        E d{V —† n# t          $ r Y nw xY w| s|V — Œ;dS )z)Iterates over nested mapping, depth-firstFTN)ÚlistÚvaluesÚitemsÚ
deepvaluesÚAttributeError)ÚmappingÚobjs     r   rÎ  rÎ  Ë  s    è è € å�G—N’NÑ$Ô$Ñ%Ô%ð 
ð 
ˆØˆð	'ØŒIˆIð ˆGÝ! #‘”Ð&Ð&Ð&Ð&Ð&Ð&Ð&Ð&øõ	 ð 	ð 	ð 	ØˆDð	øøøð
 ð 	ØˆIˆIˆIøð
ð 
s   ©AÁ
AÁAc                   ó   — e Zd ZdS )ÚAbsentN©r?  rA  rB  rH   r   r   rÓ  rÓ  Ü  ó   € € € € € € € r   rÓ  c                   ó`  — e Zd ZdZ ej        d¦  «        Z ej        d¦  «        Z ej        d¦  «        Z ej        d¦  «        Z	 ej        d¦  «        Z
 ej        dej        ¦  «        Zdd	„Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zdd„Zd„ Zd„ Zd„ Zd„ Zd„ Z d„ Z!dS ) r   z”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+)Nc                 ór   — |€t          ¦   «         }|| _        t          j        ¦   «         | _        i | _        d S r&  )r   Ú_policyÚ
_threadingÚRLockÚ_cookies_lockÚ_cookies©r"  Úpolicys     r   r$  zCookieJar.__init__í  s5   € Øˆ>Ý(Ñ*Ô*ˆFØˆŒå'Ô-Ñ/Ô/ˆÔØˆŒˆˆr   c                 ó   — || _         d S r&  )rØ  rÝ  s     r   Ú
set_policyzCookieJar.set_policyõ  s   € ØˆŒˆˆr   c                 óÀ  — g }| j                              ||¦  «        sg S t          d|¦  «         | j        |         }|                     ¦   «         D ]Œ}| j                              ||¦  «        sŒ||         }|                     ¦   «         D ]Q}| j                              ||¦  «        st          d¦  «         Œ-t          d¦  «         |                     |¦  «         ŒRŒ�|S )Nz!Checking %s for cookies to returnz   not returning cookiez   it's a match)	rØ  rO  r   rÜ  ÚkeysrR  rÌ  rL  r¢   )r"  rÅ   rô   ÚcookiesÚcookies_by_pathrÆ   Úcookies_by_namerI  s           r   Ú_cookies_for_domainzCookieJar._cookies_for_domainø  sü   € ØˆØŒ|×,Ò,¨V°WÑ=Ô=ð 	ØˆIÝÐ2°FÑ;Ô;Ð;Øœ-¨Ô/ˆØ#×(Ò(Ñ*Ô*ð 		'ð 		'ˆDØ”<×.Ò.¨t°WÑ=Ô=ð ØØ-¨dÔ3ˆOØ)×0Ò0Ñ2Ô2ð 'ð '�Ø”|×-Ò-¨f°gÑ>Ô>ð ÝÐ4Ñ5Ô5Ð5ØÝÐ(Ñ)Ô)Ð)Ø—’˜vÑ&Ô&Ð&Ð&ð'ð ˆr   c                 ó”   — g }| j                              ¦   «         D ]+}|                     |                      ||¦  «        ¦  «         Œ,|S )z2Return a list of cookies to be returned to server.)rÜ  râ  Úextendræ  )r"  rô   rã  rÅ   s       r   Ú_cookies_for_requestzCookieJar._cookies_for_request
  sP   € àˆØ”m×(Ò(Ñ*Ô*ð 	Fð 	FˆFØ�NŠN˜4×3Ò3°F¸GÑDÔDÑEÔEÐEÐEØˆr   c                 ó>  — |                      d„ d¬¦  «         d}g }|D �]|}|j        }|s d}|dk    r|                     d|z  ¦  «         |j        �F| j                             |j        ¦  «        r'|dk    r!| j                             d|j        ¦  «        }n|j        }|j        €|                     |j        ¦  «         n|                     |j        ›d	|›�¦  «         |dk    rµ|j	        r|                     d
|j
        z  ¦  «         |j                             d¦  «        rE|j        }|j        s|                     d¦  «        r
|dd…         }|                     d|z  ¦  «         |j        �+d}|j        r|d|j        z  z   }|                     |¦  «         �Œ~|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).

        c                 ó*   — t          | j        ¦  «        S r&  )r¤  rÆ   )Úas    r   ú<lambda>z)CookieJar._cookie_attrs.<locals>.<lambda>  s   € ¥3 q¤v¡;¤;€ r   T)r×   ÚreverseFr
   z$Version=%sNr±   r²   z
$Path="%s"rÝ   r%   z$Domain="%s"z$Portz="%s")ÚsortrÈ   r¢   r«   Únon_word_rerf   Úquote_rer‰   rª   r  rÆ   rÅ   r£   r  rÉ   r  )	r"  rã  rÔ   ÚattrsrI  rÈ   r«   rÅ   r5  s	            r   Ú_cookie_attrszCookieJar._cookie_attrs  sÌ  € ð 	�ŠÐ.Ð.¸ˆÑ=Ô=Ð=àˆàˆØð (	$ñ (	$ˆFð ”nˆGØð :Ø"�Ø˜Q’;�;Ø—L’L °Ñ!8Ñ9Ô9Ð9ð
 ”Ð)ØÔ ×'Ò'¨¬Ñ5Ô5ð *Ø:AÀAº+¸+Øœ×)Ò)¨'°6´<Ñ@Ô@��àœ�ð Œ|Ð#Ø—’˜Vœ[Ñ)Ô)Ð)Ð)à—’¨¬¨¨°U°UÐ;Ñ<Ô<Ð<Ø˜Š{ˆ{ØÔ(ð =Ø—L’L °´Ñ!;Ñ<Ô<Ð<Ø”=×+Ò+¨CÑ0Ô0ð :Ø#œ]�FØ"Ô5ð ,Ø×)Ò)¨#Ñ.Ô.ð,à!'¨¨¨¤˜Ø—L’L °&Ñ!8Ñ9Ô9Ð9Ø”;Ð*Ø�AØÔ,ð 8Ø ¨6¬;Ñ!6Ñ7˜Ø—L’L ‘O”O�Oùàˆr   c                 óÐ  — t          d¦  «         | j                             ¦   «          	 t          t	          j        ¦   «         ¦  «        x| j        _        | _        |                      |¦  «        }|                      |¦  «        }|r>| 	                    d¦  «        s)| 
                    dd                     |¦  «        ¦  «         | j        j        rI| j        j        s=| 	                    d¦  «        s(|D ]%}|j        dk    r| 
                    dd¦  «          nŒ&| j                             ¦   «          n# | j                             ¦   «          w xY w|                      ¦   «          dS )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_headerr   r³   ÚCookie2r%   z$Version="1"N)r   rÛ  Úacquirerg   rt   rØ  r½  ré  ró  Ú
has_headerÚadd_unredirected_headerr¶   rX  rZ  rÈ   ÚreleaseÚclear_expired_cookies)r"  rô   rã  rò  rI  s        r   rõ  zCookieJar.add_cookie_headerL  ss  € õ 	Ð"Ñ#Ô#Ð#ØÔ×"Ò"Ñ$Ô$Ð$ð	)å,/µ´	±´Ñ,<Ô,<Ð<ˆDŒLÔ ¤	à×/Ò/°Ñ8Ô8ˆGà×&Ò& wÑ/Ô/ˆEØð 4Ø×)Ò)¨(Ñ3Ô3ð 4Ø×3Ò3Ø  $§)¢)¨EÑ"2Ô"2ñ4ô 4ð 4ð ”Ô$ð ¨T¬\Ô-Fð Ø×&Ò& yÑ1Ô1ðà%ð ð �FØ”~¨Ò*Ð*Ø×7Ò7¸	À>ÑRÔRÐRØ˜ð +ð
 Ô×&Ò&Ñ(Ô(Ð(Ð(øˆDÔ×&Ò&Ñ(Ô(Ð(Ð(øøøà×"Ò"Ñ$Ô$Ð$Ð$Ð$s   ªC0D4 Ä4Ec                 óv  — g }d}d}|D �].}|d         \  }}d}d}	i }
i }|dd…         D ]ð\  }}|                      ¦   «         }||v s||v r|}||v r|€d}||
v rŒ0|dk    r)|€t          d	¦  «         d}	 n¦|                      ¦   «         }|d
k    r|rŒh|€t          d¦  «         Œz|dk    rAd}	 t          |¦  «        }n"# t          $ r t          d¦  «         d}	Y  n@w xY wd
}| j        |z   }||v s||v r"|€|dvrt          d|z  ¦  «         d}	 n||
|<   Œë|||<   Œñ|	r�Œ|                     |||
|f¦  «         �Œ0|S )a  Return 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
   Fr%   NTrÅ   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  rý  z!   missing value for %s attribute)rI   r   rg   rs   r½  r¢   )r"  Ú	attrs_setÚcookie_tuplesÚboolean_attrsÚvalue_attrsÚcookie_attrsrª   r«   Úmax_age_setÚ
bad_cookieÚstandardr#  rº   r»   rÚ   s                  r   Ú_normalized_cookie_tuplesz#CookieJar._normalized_cookie_tuplesm  s  € ð ˆà+ˆð0ˆð
 &ð H	@ñ H	@ˆLØ& qœ/‰KˆD�%ð  ˆKàˆJàˆHØˆDØ$ Q R RÔ(ð 2 ð 2 ‘��1Ø—W’W‘Y”Y�à˜Ð$Ð$¨¨mÐ(;Ð(;Ø�AØ˜Ð%Ð%¨!¨)ð �AØ˜�=�=àØ˜’=�=Ø�yÝÐFÑGÔGÐGØ%)˜
Ø˜àŸš™	œ	�AØ˜	’>�>Ø"ð !à Ø�yÝð  Fñ Gô Gð Gà Ø˜	’>�>Ø"&�KðÝ ™FœF˜˜øÝ%ð ð ð Ýð  2ñ 3ô 3ð 3à%)˜
Ø˜˜ð	øøøð "�AØœ	 A™�AØ˜Ð$Ð$¨!¨}Ð*<Ð*<Ø˜	ØÐ!BÐBÐBÝÐBÀQÑFÑGÔGÐGØ%)˜
Ø˜Ø"#�H˜Q‘K�Kà�D˜‘G�Gàð Ùà× Ò  $¨¨x¸Ð!>Ñ?Ô?Ð?Ñ?àÐs   Â,B<Â<CÃCc                 ó2  — |\  }}}}|                      dt          ¦  «        }|                      dt          ¦  «        }|                      dt          ¦  «        }	|                      dt          ¦  «        }
|                      dd ¦  «        }|�"	 t          |¦  «        }n# t          $ r Y d S w xY w|                      dd¦  «        }|                      dd¦  «        }|                      d	d ¦  «        }|                      d
d ¦  «        }|t          ur|dk    rd}t	          |¦  «        }n_d}t          |¦  «        }|                     d¦  «        }|dk    r|dk    r|d |…         }n|d |dz   …         }t          |¦  «        dk    rd}|t          u}d}|r"t          | 	                    d¦  «        ¦  «        }|t          u rt          |¦  «        \  }}|}n| 	                    d¦  «        sd|z   }d}|	t          ur+|	€t          |¦  «        }	nd}t          j        dd|	¦  «        }	nd }	|
t          u rd }
d}nH|
| j        k    r=	 |                      |||¦  «         n# t           $ r Y nw xY wt#          d|||¦  «         d S t%          ||||	||||||||
||||¦  «        S )NrÅ   rÆ   rÉ   rÄ   rÈ   rÇ   Fr  r  rý  r‚   Trÿ   r¿   r
   r%   rÝ   z\s+z2Expiring cookie, domain='%s', path='%s', name='%s')r*  rÓ  rg   rs   r  r  râ   r¤  Úboolr£   rý   r  r¤   r‰   r½  ÚclearÚKeyErrorr   r   )r"  Útuprô   rª   r«   r  r#  rÅ   rÆ   rÉ   rÄ   rÈ   rÇ   r  r  r  r  rå   r  r  rü   rû   r  s                          r   Ú_cookie_from_cookie_tuplez#CookieJar._cookie_from_cookie_tupleÎ  s  € ð '*Ñ#ˆˆe�X˜tà—’˜h­Ñ/Ô/ˆØ�|Š|˜F¥FÑ+Ô+ˆØ�|Š|˜F¥FÑ+Ô+ˆØ—,’,˜y­&Ñ1Ô1ˆð —,’,˜y¨$Ñ/Ô/ˆØÐðÝ˜g™,œ,��øÝð ð ð Ø�t�tðøøøà—’˜h¨Ñ.Ô.ˆà—,’,˜y¨%Ñ0Ô0ˆØ—,’,˜y¨$Ñ/Ô/ˆØ—l’l <°Ñ6Ô6ˆð •vÐÐ $¨"¢* *Ø!ˆNÝ˜tÑ$Ô$ˆDˆDà"ˆNÝ Ñ(Ô(ˆDØ—
’
˜3‘”ˆAØ�BŠwˆwØ˜a’<�<à   œ8�D�Dà   1¡ œ:�DÝ�4‰yŒy˜AŠ~ˆ~ c˜tð "­Ð/Ðà"ÐØð 	>Ý!% f×&7Ò&7¸Ñ&<Ô&<Ñ!=Ô!=ÐØ•VÐÐÝ-¨gÑ6Ô6‰NˆH�dØˆFˆFØ×"Ò" 3Ñ'Ô'ð 	 Ø˜‘ZˆFð ˆØ•vÐÐØˆ|õ $ GÑ,Ô,��à!%�Ý”v˜f b¨$Ñ/Ô/��ð ˆDð •fÐÐØˆGØˆGˆGØ˜œ	Ò!Ð!ðØ—
’
˜6 4¨Ñ.Ô.Ð.Ð.øÝð ð ð Ø�ðøøøåÐGØ˜4 ñ'ô 'ð 'à�4å�gØ˜EØ˜NØÐ.Ð0BØ˜NØØØØØ!Øñ
ô 
ð 
	s$   ÂB Â
B+Â*B+È?I É
I$É#I$c                 ó˜   — |                       |¦  «        }g }|D ]/}|                      ||¦  «        }|r|                     |¦  «         Œ0|S r&  )r  r  r¢   )r"  rþ  rô   rÿ  rã  r  rI  s          r   Ú_cookies_from_attrs_setz!CookieJar._cookies_from_attrs_set*  s[   € Ø×6Ò6°yÑAÔAˆàˆØ ð 	.ð 	.ˆCØ×3Ò3°C¸ÑAÔAˆFØÐ-�w—~’~ fÑ-Ô-Ð-øØˆr   c                 ó�   — t          | j        dd ¦  «        }|€| j        j         }|D ]}|j        dk    rd|_        |rd|_        Œd S )NrY  r%   Tr
   )r<  rØ  rX  rÈ   r  )r"  rã  Úrfc2109_as_nsrI  s       r   Ú_process_rfc2109_cookiesz"CookieJar._process_rfc2109_cookies3  sh   € Ý ¤Ð.CÀTÑJÔJˆØÐ Ø $¤Ô 4Ð4ˆMØð 	'ð 	'ˆFØŒ~ Ò"Ð"Ø!%�”Ø ð 'ð &'�F”Nøð	'ð 	'r   c                 ó  — |                      ¦   «         }|                     dg ¦  «        }|                     dg ¦  «        }t          t          j        ¦   «         ¦  «        x| j        _        | _        | j        j        }| j        j        }|s|r|s|r|s|r|s|sg S 	 |                      t          |¦  «        |¦  «        }n # t          $ r t          ¦   «          g }Y nw xY w|r¨|r¦	 |                      t          |¦  «        |¦  «        }	n # t          $ r t          ¦   «          g }	Y nw xY w|                      |	¦  «         |r3i }
|D ]}d|
|j        |j        |j        f<   Œ|
fd„}t#          ||	¦  «        }	|	r|                     |	¦  «         |S )zAReturn sequence of Cookie objects extracted from response object.zSet-Cookie2z
Set-CookieNc                 ó2   — | j         | j        | j        f}||vS r&  )rÅ   rÆ   rª   )Ú	ns_cookieÚlookupr×   s      r   Úno_matching_rfc2965z3CookieJar.make_cookies.<locals>.no_matching_rfc2965l  s    € Ø#Ô*¨I¬N¸I¼NÐJ�CØ fÐ,Ð,r   )rœ  Úget_allrg   rt   rØ  r½  rX  rW  r  r®   Ú	Exceptionr"   rÛ   r  rÅ   rÆ   rª   Úfilterrè  )r"  Úresponserô   r¸   Úrfc2965_hdrsÚns_hdrsrX  rW  rã  Ú
ns_cookiesr  rI  r  s                r   Úmake_cookieszCookieJar.make_cookies?  s  € ð —-’-‘/”/ˆØ—’ }°bÑ9Ô9ˆØ—/’/ ,°Ñ3Ô3ˆÝ(+­D¬I©K¬KÑ(8Ô(8Ð8ˆŒÔ˜DœIà”,Ô&ˆØ”<Ô(ˆàð 	 gð 	Øð	Ø!(ð	àð	à&.ð	ð ð	ð #*ð	ð ˆIð	Ø×2Ò2Ý" <Ñ0Ô0°'ñ;ô ;ˆGˆGøåð 	ð 	ð 	Ý%Ñ'Ô'Ð'ØˆGˆGˆGð	øøøð ð 	+�xð 	+ð à!×9Ò9Ý$ WÑ-Ô-¨wñ8ô 8�
�
øåð  ð  ð  Ý)Ñ+Ô+Ð+Ø�
�
�
ð øøøð ×)Ò)¨*Ñ5Ô5Ð5ð ð EØ�Ø%ð Mð M�FØHL�F˜FœM¨6¬;¸¼ÐDÑEÐEà:@ð -ð -ð -ð -õ $Ð$7¸ÑDÔD�
àð +Ø—’˜zÑ*Ô*Ð*àˆs$   Â#C ÃCÃCÃ&#D
 Ä
D'Ä&D'c                 ój  — | j                              ¦   «          	 t          t          j        ¦   «         ¦  «        x| j        _        | _        | j                             ||¦  «        r|                      |¦  «         | j                              ¦   «          dS # | j                              ¦   «          w xY w)z-Set a cookie if policy says it's OK to do so.N)	rÛ  r÷  rg   rt   rØ  r½  rJ  Ú
set_cookierú  rH  s      r   Úset_cookie_if_okzCookieJar.set_cookie_if_okv  sŸ   € àÔ×"Ò"Ñ$Ô$Ð$ð	)Ý,/µ´	±´Ñ,<Ô,<Ð<ˆDŒLÔ ¤	àŒ|×"Ò" 6¨7Ñ3Ô3ð (Ø—’ Ñ'Ô'Ð'ð Ô×&Ò&Ñ(Ô(Ð(Ð(Ð(øˆDÔ×&Ò&Ñ(Ô(Ð(Ð(øøøs   ›A!B ÂB2c                 óJ  — | j         }| j                             ¦   «          	 |j        |vr
i ||j        <   ||j                 }|j        |vr
i ||j        <   ||j                 }|||j        <   | j                             ¦   «          dS # | j                             ¦   «          w xY w)z?Set a cookie, without checking whether or not it should be set.N)rÜ  rÛ  r÷  rÅ   rÆ   rª   rú  )r"  rI  ÚcÚc2Úc3s        r   r   zCookieJar.set_cookieƒ  sª   € àŒMˆØÔ×"Ò"Ñ$Ô$Ð$ð	)ØŒ} AÐ%Ð%¸" q¨¬Ñ'7Ø�6”=Ô!ˆBØŒ{ "Ð$Ð$¸ b¨¬¡oØ�F”K”ˆBØ$ˆBˆvŒ{‰OàÔ×&Ò&Ñ(Ô(Ð(Ð(Ð(øˆDÔ×&Ò&Ñ(Ô(Ð(Ð(øøøs   ¢A
B ÂB"c                 ó   — t          d|                     ¦   «         ¦  «         | j                             ¦   «          	 |                      ||¦  «        D ]B}| j                             ||¦  «        r%t          d|¦  «         |                      |¦  «         ŒC	 | j                             ¦   «          dS # | j                             ¦   «          w xY w)zAExtract cookies from response, where allowable given the request.zextract_cookies: %sz setting cookie: %sN)	r   rœ  rÛ  r÷  r  rØ  rJ  r   rú  )r"  r  rô   rI  s       r   Úextract_cookieszCookieJar.extract_cookies�  sÏ   € åÐ$ h§m¢m¡o¤oÑ6Ô6Ð6ØÔ×"Ò"Ñ$Ô$Ð$ð	)Ø×+Ò+¨H°gÑ>Ô>ð ,ð ,�Ø”<×&Ò& v¨wÑ7Ô7ð ,ÝÐ0°&Ñ9Ô9Ð9Ø—O’O FÑ+Ô+Ð+øð,ð
 Ô×&Ò&Ñ(Ô(Ð(Ð(Ð(øˆDÔ×&Ò&Ñ(Ô(Ð(Ð(øøøs   ½AB2 Â2Cc                 óÈ   — |�)|�|€t          d¦  «        ‚| j        |         |         |= dS |�!|€t          d¦  «        ‚| j        |         |= dS |�
| j        |= dS i | _        dS )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)rs   rÜ  )r"  rÅ   rÆ   rª   s       r   r	  zCookieJar.clearœ  sž   € ð ÐØ� D LÝ ØNñPô Pð Pà”˜fÔ% dÔ+¨DÐ1Ð1Ð1ØÐØˆ~Ý ØDñFô Fð Fà”˜fÔ% dÐ+Ð+Ð+ØÐØ”˜fÐ%Ð%Ð%àˆDŒMˆMˆMr   c                 ó  — | j                              ¦   «          	 | D ]/}|j        r&|                      |j        |j        |j        ¦  «         Œ0	 | j                              ¦   «          dS # | j                              ¦   «          w xY w)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)rÛ  r÷  r  r	  rÅ   rÆ   rª   rú  )r"  rI  s     r   Úclear_session_cookieszCookieJar.clear_session_cookies·  s•   € ð 	Ô×"Ò"Ñ$Ô$Ð$ð	)Øð Hð H�Ø”>ð HØ—J’J˜vœ}¨f¬k¸6¼;ÑGÔGÐGøðHð Ô×&Ò&Ñ(Ô(Ð(Ð(Ð(øˆDÔ×&Ò&Ñ(Ô(Ð(Ð(øøøs   ›2A) Á)Bc                 óP  — | j                              ¦   «          	 t          j        ¦   «         }| D ]=}|                     |¦  «        r&|                      |j        |j        |j        ¦  «         Œ>	 | j                              ¦   «          dS # | j                              ¦   «          w xY w)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)	rÛ  r÷  rt   r2  r	  rÅ   rÆ   rª   rú  )r"  r1  rI  s      r   rû  zCookieJar.clear_expired_cookiesÆ  s¬   € ð 	Ô×"Ò"Ñ$Ô$Ð$ð	)Ý”)‘+”+ˆCØð Hð H�Ø×$Ò$ SÑ)Ô)ð HØ—J’J˜vœ}¨f¬k¸6¼;ÑGÔGÐGøðHð Ô×&Ò&Ñ(Ô(Ð(Ð(Ð(øˆDÔ×&Ò&Ñ(Ô(Ð(Ð(øøøs   ›AB
 Â
B%c                 ó*   — t          | j        ¦  «        S r&  )rÎ  rÜ  rh  s    r   Ú__iter__zCookieJar.__iter__Ù  s   € Ý˜$œ-Ñ(Ô(Ð(r   c                 ó   — d}| D ]}|dz   }Œ|S )z#Return number of contained cookies.r
   r%   rH   )r"  rå   rI  s      r   Ú__len__zCookieJar.__len__Ü  s!   € àˆØÐ%Ð%ˆF  A¡˜A˜AØˆr   c                 ó    — g }| D ]$}|                      t          |¦  «        ¦  «         Œ%d| j        j        ›dd                     |¦  «        ›d�S ©Nú<ú[r´   z]>)r¢   r=  r>  r?  r¶   ©r"  ÚrrI  s      r   r@  zCookieJar.__repr__â  sS   € ØˆØÐ2Ð2ˆF˜AŸHšH¥T¨&¡\¤\Ñ2Ô2Ð2Ð2Ð2Ø!œ^Ô4Ð4Ð4°d·i²iÀ±l´l°l°lÐCÐCr   c                 ó    — g }| D ]$}|                      t          |¦  «        ¦  «         Œ%d| j        j        ›dd                     |¦  «        ›d�S r1  )r¢   rœ   r>  r?  r¶   r4  s      r   r8  zCookieJar.__str__ç  sS   € ØˆØÐ1Ð1ˆF˜AŸHšH¥S¨¡[¤[Ñ1Ô1Ð1Ð1Ð1Ø!œ^Ô4Ð4Ð4°d·i²iÀ±l´l°l°lÐCÐCr   r&  )NNN)"r?  rA  rB  rC  r¤   Úcompilerð  rñ  Ústrict_domain_reÚ	domain_reÚdots_reÚASCIIÚmagic_rer$  rà  ræ  ré  ró  rõ  r  r  r  r  r  r!  r   r'  r	  r*  rû  r-  r/  r@  r8  rH   r   r   r   r   Þ  sä  € € € € € ðð ð �"”*˜UÑ#Ô#€KØˆrŒz˜+Ñ&Ô&€HØ!�r”z +Ñ.Ô.ÐØ�”
˜8Ñ$Ô$€IØˆbŒj˜Ñ!Ô!€GàˆrŒzÐ6¸¼ÑAÔA€Hðð ð ð ðð ð ðð ð ð$ð ð ð9ð 9ð 9ðv%ð %ð %ðB_ð _ð _ðBZð Zð Zðxð ð ð
'ð 
'ð 
'ð5ð 5ð 5ðn)ð )ð )ð)ð )ð )ð
)ð 
)ð 
)ðð ð ð ð6)ð )ð )ð)ð )ð )ð&)ð )ð )ðð ð ðDð Dð Dð
Dð Dð Dð Dð Dr   r   c                   ó   — e Zd ZdS )r   NrÔ  rH   r   r   r   r   î  rÕ  r   r   c                   ó6   — e Zd ZdZdd„Zd	d„Zd	d„Z	 	 d	d„ZdS )
r   z6CookieJar that can be loaded from and saved to a file.NFc                 óž   — t                                | |¦  «         |�t          j        |¦  «        }|| _        t          |¦  «        | _        dS )z}
        Cookies are NOT loaded from the named file until either the .load() or
        .revert() method is called.

        N)r   r$  ÚosÚfspathÚfilenamer  Ú	delayload)r"  rB  rC  rÞ  s       r   r$  zFileCookieJar.__init__ó  sG   € õ 	×Ò˜4 Ñ(Ô(Ð(ØÐÝ”y Ñ*Ô*ˆHØ ˆŒÝ˜i™œˆŒˆˆr   c                 ó   — t          ¦   «         ‚)zSave cookies to a file.rF  )r"  rB  Úignore_discardÚignore_expiress       r   ÚsavezFileCookieJar.saveÿ  rM  r   c                 óÐ   — |€#| j         �| j         }nt          t          ¦  «        ‚t          |¦  «        5 }|                      ||||¦  «         ddd¦  «         dS # 1 swxY w Y   dS )zLoad cookies from a file.N)rB  rs   ÚMISSING_FILENAME_TEXTÚopenÚ_really_load©r"  rB  rE  rF  r    s        r   ÚloadzFileCookieJar.load  sÁ   € àÐØŒ}Ð(°T´]¨(¨(Ý"Õ#8Ñ9Ô9Ð9å�(‰^Œ^ð 	K˜qØ×Ò˜a ¨>¸>ÑJÔJÐJð	Kð 	Kð 	Kñ 	Kô 	Kð 	Kð 	Kð 	Kð 	Kð 	Kð 	Kð 	Køøøð 	Kð 	Kð 	Kð 	Kð 	Kð 	Ks   µAÁAÁ"Ac                 ó’  — |€#| j         �| j         }nt          t          ¦  «        ‚| j                             ¦   «          	 t          j        | j        ¦  «        }i | _        	 |                      |||¦  «         n# t          $ r	 || _        ‚ w xY w	 | j         
                    ¦   «          dS # | j         
                    ¦   «          w xY w)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)rB  rs   rI  rÛ  r÷  r   ÚdeepcopyrÜ  rM  ÚOSErrorrú  )r"  rB  rE  rF  Ú	old_states        r   ÚrevertzFileCookieJar.revert  sÜ   € ð ÐØŒ}Ð(°T´]¨(¨(Ý"Õ#8Ñ9Ô9Ð9àÔ×"Ò"Ñ$Ô$Ð$ð	)åœ d¤mÑ4Ô4ˆIØˆDŒMðØ—	’	˜( N°NÑCÔCÐCÐCøÝð ð ð Ø )�”Øðøøøð Dð Ô×&Ò&Ñ(Ô(Ð(Ð(Ð(øˆDÔ×&Ò&Ñ(Ô(Ð(Ð(øøøs$   Á  B+ Á!A9 Á8B+ Á9BÂB+ Â+C)NFN©NFF)r?  rA  rB  rC  r$  rG  rM  rR  rH   r   r   r   r   ð  sv   € € € € € Ø@Ð@ð
)ð 
)ð 
)ð 
)ð$ð $ð $ð $ðKð Kð Kð Kð #Ø49ð)ð )ð )ð )ð )ð )r   r   c                 óÊ  — | j         | j        fd| j        fd| j        fg}| j        �|                     d| j        f¦  «         | j        r|                     d¦  «         | j        r|                     d¦  «         | j        r|                     d¦  «         | j	        r|                     d¦  «         | j
        r6|                     d	t          t          | j
        ¦  «        ¦  «        f¦  «         | j        r|                     d
¦  «         | j        r|                     d| j        f¦  «         | j        r|                     d| j        f¦  «         t!          | j                             ¦   «         ¦  «        }|D ]1}|                     |t'          | j        |         ¦  «        f¦  «         Œ2|                     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  rý  rÈ   )rª   r«   rÆ   rÅ   rÉ   r¢   r  r  r  rÇ   rÄ   rV   r†   r  r  r  Úsortedr!  râ  rœ   rÈ   r¼   )rI  r  râ  rº   s       r   Úlwp_cookie_strrY  '  s×  € ð Œ+�v”|Ð	$Ø
�&”+Ð	Ø
�F”MÐ	"ð	$€Að „{Ð §¢¨&°&´+Ð)>Ñ ?Ô ?Ð ?ØÔÐ;˜aŸhšhÐ':Ñ;Ô;Ð;ØÔÐ;˜aŸhšhÐ':Ñ;Ô;Ð;ØÔ Ð@ !§(¢(Ð+?Ñ"@Ô"@Ð"@Ø„}Ð0�a—h’hÐ/Ñ0Ô0Ð0Ø„~ð B�q—x’x Ý(­¨v¬~Ñ)>Ô)>Ñ?Ô?ð!Añ Bô Bð Bà„~Ð2�q—x’xÐ 1Ñ2Ô2Ð2Ø„~Ð<�q—x’x ¨F¬NÐ ;Ñ<Ô<Ð<ØÔÐG˜1Ÿ8š8 \°6Ô3EÐ$FÑGÔGÐGå�&”,×#Ò#Ñ%Ô%Ñ&Ô&€DØð ,ð ,ˆØ	�Š�!•S˜œ aœÑ)Ô)Ð*Ñ+Ô+Ð+Ð+à‡H‚Hˆi�˜Vœ^Ñ,Ô,Ð-Ñ.Ô.Ð.å˜a˜SÑ!Ô!Ð!r   c                   ó(   — e Zd ZdZdd„Zd	d„Zd„ ZdS )
r   a[  
    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)

    Tc                 óö   — t          j         ¦   «         }g }| D ]I}|s|j        rŒ|s|                     |¦  «        rŒ$|                     dt	          |¦  «        z  ¦  «         ŒJd                     |dgz   ¦  «        S )zžReturn cookies as a string of "\n"-separated "Set-Cookie3" headers.

        ignore_discard and ignore_expires: see docstring for FileCookieJar.save

        zSet-Cookie3: %sú
r‚   )rt   r  r2  r¢   rY  r¶   )r"  rE  rF  r1  r5  rI  s         r   Ú
as_lwp_strzLWPCookieJar.as_lwp_strP  s”   € õ Œi‰kŒkˆØˆØð 	Að 	AˆFØ!ð  f¤nð ØØ!ð  f×&7Ò&7¸Ñ&<Ô&<ð ØØ�HŠHÐ&­¸Ñ)?Ô)?Ñ?Ñ@Ô@Ð@Ð@Ø�yŠy˜˜B˜4™Ñ Ô Ð r   NFc                 ó˜  — |€#| j         �| j         }nt          t          ¦  «        ‚t          j        t          j        |t          j        t          j        z  t          j        z  d¦  «        d¦  «        5 }| 	                    d¦  «         | 	                    |  
                    ||¦  «        ¦  «         d d d ¦  «         d S # 1 swxY w Y   d S )Né€  Úwz#LWP-Cookies-2.0
)rB  rs   rI  r@  ÚfdopenrJ  ÚO_CREATÚO_WRONLYÚO_TRUNCÚwriter]  rL  s        r   rG  zLWPCookieJar.save`  s	  € ØÐØŒ}Ð(°T´]¨(¨(Ý"Õ#8Ñ9Ô9Ð9åŒYÝŒG�H�bœj­2¬;Ñ6½¼ÑCÀUÑKÔKØñ
ô 
ð 	Eð ð �GŠGÐ(Ñ)Ô)Ð)Ø�GŠG�D—O’O N°NÑCÔCÑDÔDÐDð	Eð 	Eð 	Eñ 	Eô 	Eð 	Eð 	Eð 	Eð 	Eð 	Eð 	Eð 	Eøøøð 	Eð 	Eð 	Eð 	Eð 	Eð 	Es   Á3?B?Â?CÃCc                 óÜ  — |                      ¦   «         }| j                             |¦  «        sd|z  }t          |¦  «        ‚t	          j        ¦   «         }d}d}	d}
	 	 |                      ¦   «         }|dk    rd S |                     |¦  «        sŒ3|t          |¦  «        d …                              ¦   «         }t          |g¦  «        D �]f}|d         \  }}i }i }|	D ]}d||<   Œ|dd …         D ]E\  }}|�| 	                    ¦   «         }nd }||
v s||	v r|}||	v r
|€d	}|||<   Œ6||
v r|||<   Œ@|||<   ŒF|j
        } |d
¦  «        } |d¦  «        }|�t          |¦  «        }|€d	} |d¦  «        }|                     d¦  «        }t           |d¦  «        || |d¦  «         |d¦  «        || |d¦  «         |d¦  «         |d¦  «         |d¦  «        || |d¦  «         |d¦  «        |¦  «        }|s	|j        r�Œ8|s|                     |¦  «        r�ŒQ|                      |¦  «         �Œh�ŒÕ# t           $ r ‚ t"          $ r$ t%          ¦   «          t          d|›d|›�¦  «        ‚w xY w)Nz5%r does not look like a Set-Cookie3 (LWP) format filezSet-Cookie3:)rV  rU  rW  rÇ   r  )rÈ   rÉ   rÆ   rÅ   rÄ   r  rý  r%   r‚   r
   FTrÄ   r  rÅ   rÝ   rÈ   rÉ   rV  rW  rÆ   rU  rÇ   r  rý  z invalid Set-Cookie3 format file ú: )Úreadliner<  rf   r   rt   r£   r¤  rÏ   r®   rI   r*  r‘   r   r  r2  r   rP  r  r"   )r"  r    rB  rE  rF  Úmagicr!   r1  Úheaderr   r  ÚlineÚdatarª   r«   r  r#  rº   r»   rÚ   r  rÄ   r  rÅ   r  r#  s                             r   rK  zLWPCookieJar._really_loado  s%  € Ø—
’
‘”ˆØŒ}×#Ò# EÑ*Ô*ð 	!ðØ$ñ%ˆCå˜C‘.”.Ð åŒi‰kŒkˆàˆð.ˆð0ˆð
;	.ð4'Ø—z’z‘|”|�Ø˜2’:�:˜u˜uØ—’ vÑ.Ô.ð ØØ�C ™KœK˜L˜LÔ)×/Ò/Ñ1Ô1�å.°¨vÑ6Ô6ð -'ñ -'�DØ"& q¤'‘K�D˜%Ø!�HØ�DØ*ð ,ð ,˜Ø&+˜ ™˜Ø $ Q R R¤ð (ð (™˜˜1Ø˜=Ø!"§¢¡¤˜B˜Bà!%˜Bà +Ð-Ð-°2¸Ð3FÐ3FØ "˜AØ Ð-Ð-Ø ˜y¨d¨!Ø*+˜H Q™K˜KØ +Ð-Ð-Ø*+˜H Q™K˜Kà&'˜D ™G˜Gà œ�AØ˜a 	™lœl�GØ˜a 	™lœl�GØÐ*Ý"*¨7Ñ"3Ô"3˜Ø�Ø"&˜Ø˜Q˜x™[œ[�FØ'-×'8Ò'8¸Ñ'=Ô'=Ð$Ý˜q˜q ™|œ|¨T°5Ø ˜q ™yœy¨!¨!¨K©.¬.Ø%Ð'7¸¸¸<¹¼Ø ˜q ™yœy¨!¨!¨K©.¬.Ø ˜q ™{œ{Ø&Ø&Ø ˜q ™|œ|Ø ˜q ™œØ#ñ	%ô 	%�Að *ð !¨a¬ið !Ù Ø)ð !¨a¯lªl¸3Ñ.?Ô.?ð !Ù Ø—O’O AÑ&Ô&Ð&Ñ&ñi4'øõj ð 	ð 	ð 	ØÝð 	.ð 	.ð 	.Ý%Ñ'Ô'Ð'Ý�)Ø%˜X˜X t tð-ñ .ô .ð .ð	.øøøs   ÁH3 Á:F9H3 È38I+)TTrS  )r?  rA  rB  rC  r]  rG  rK  rH   r   r   r   r   C  s^   € € € € € ð
ð 
ð!ð !ð !ð !ð Eð Eð Eð EðL.ð L.ð L.ð L.ð L.r   r   c                   ó    — e Zd ZdZd„ Zdd„ZdS )r	   aš  

    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.  curl and lynx use 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).

    c                 ó  — t          j         ¦   «         }t                               |                     ¦   «         ¦  «        st	          d|z  ¦  «        ‚	 	 |                     ¦   «         }i }|dk    rd S |                     t          ¦  «        r&d|t          <   |t          t          ¦  «        d …         }| 	                    d¦  «        r
|d d…         }| 
                    ¦   «                              d¦  «        s| 
                    ¦   «         dk    rŒ¾|                     d¦  «        \  }}	}
}}}}|dk    }|	dk    }	|dk    r|}d }|                     d	¦  «        }|	|k    sJ ‚d
}|dk    rd }d}t          d||d d
||	||
d
|||d d |¦  «        }|s	|j        r�ŒC|s|                     |¦  «        r�Œ\|                      |¦  «         �Œr# t           $ r ‚ t"          $ r$ t%          ¦   «          t	          d|›d|›�¦  «        ‚w xY w)Nz4%r does not look like a Netscape format cookies filer%   r‚   r\  r¿   )ú#rˆ  ú	ÚTRUErÝ   FTr
   z%invalid Netscape format cookies file rg  )rt   ÚNETSCAPE_MAGIC_RGXr•   rh  r   r£   ÚHTTPONLY_PREFIXÚHTTPONLY_ATTRr¤  rÀ   rÏ   rÎ   r   r  r2  r   rP  r  r"   )r"  r    rB  rE  rF  r1  rk  r#  rÅ   r  rÆ   rÇ   rÄ   rª   r«   rê   r  r#  s                     r   rK  zMozillaCookieJar._really_loadÞ  su  € ÝŒi‰kŒkˆå!×'Ò'¨¯
ª
©¬Ñ5Ô5ð 	ÝØFØññô ð ð?	.ð7#Ø—z’z‘|”|�Ø�à˜2’:�:˜u˜uð
 —?’?¥?Ñ3Ô3ð 7Ø*,�D�Ñ'Ø¥¥OÑ 4Ô 4Ð 5Ð 5Ô6�Dð —=’= Ñ&Ô&Ð8¨t°C°R°C¬y¨ð —J’J‘L”L×+Ò+¨JÑ7Ô7ð Ø—J’J‘L”L BÒ&Ð&Øð Ÿ
š
 4Ñ(Ô(ñ M�Ð(¨$°¸ÀÀuà  FÒ*�Ø$4¸Ò$>Ð Ø˜2’:�:ð !�DØ �Eà$×/Ò/°Ñ4Ô4�Ø'¨;Ò6Ð6Ð6Ð6à�Ø˜b’=�=Ø"�GØ"�Gõ ˜1˜d EØ Ø!Ð#3°[Ø Ø!Ø"Ø"ØØØñ	!ô 	!�ð &ð ¨!¬)ð ÙØ%ð ¨!¯,ª,°sÑ*;Ô*;ð ÙØ—’ Ñ"Ô"Ð"ño7#øõr ð 	ð 	ð 	ØÝð 	.ð 	.ð 	.Ý%Ñ'Ô'Ð'Ý�)Ø%˜X˜X t tð-ñ .ô .ð .ð	.øøøs   ÁG Á2EG Ç8G>NFc                 óP  — |€#| j         �| j         }nt          t          ¦  «        ‚t          j        t          j        |t          j        t          j        z  t          j        z  d¦  «        d¦  «        5 }| 	                    t          ¦  «         t          j        ¦   «         }| D ]é}|j        }|s|j        rŒ|s|                     |¦  «        rŒ+|j        rd}nd}|                     d¦  «        rd}	nd}	|j        �t%          |j        ¦  «        }
nd}
|j        €
d}|j        }n|j        }|j        }|                     t,          ¦  «        r
t.          |z   }| 	                    d                     ||	|j        ||
||g¦  «        dz   ¦  «         Œê	 d d d ¦  «         d S # 1 swxY w Y   d S )	Nr_  r`  rq  ÚFALSErÝ   r‚   rp  r\  )rB  rs   rI  r@  ra  rJ  rb  rc  rd  re  ÚNETSCAPE_HEADER_TEXTrt   rÅ   r  r2  rÇ   r£   rÄ   rœ   r«   rª   r(  rt  rs  r¶   rÆ   )r"  rB  rE  rF  r    r1  rI  rÅ   rÇ   rê   rÄ   rª   r«   s                r   rG  zMozillaCookieJar.save'  s  € ØÐØŒ}Ð(°T´]¨(¨(Ý"Õ#8Ñ9Ô9Ð9åŒYÝŒG�H�bœj­2¬;Ñ6½¼ÑCÀUÑKÔKØñ
ô 
ð "	ð Ø�GŠGÕ(Ñ)Ô)Ð)Ý”)‘+”+ˆCØð ð �Øœ�Ø%ð ¨&¬.ð ØØ%ð ¨&×*;Ò*;¸CÑ*@Ô*@ð ØØ”=ð '¨6 & &Ø&�fØ×$Ò$ SÑ)Ô)ð ,¸¨;¨;Ø$+�kØ”>Ð-Ý! &¤.Ñ1Ô1�G�Gà �GØ”<Ð'ð �DØ"œK�E�Eà!œ;�DØ"œL�EØ×.Ò.­}Ñ=Ô=ð 6Ý,¨vÑ5�FØ—’Ø—I’I˜v {°F´KØ% w°°eð=ñ >ô >àññô ð ð ð3ð"	ð "	ð "	ñ "	ô "	ð "	ð "	ð "	ð "	ð "	ð "	ð "	øøøð "	ð "	ð "	ð "	ð "	ð "	s   Á3DFÆFÆ"FrS  )r?  rA  rB  rC  rK  rG  rH   r   r   r	   r	   ¾  sE   € € € € € ðð ð>G.ð G.ð G.ðR'ð 'ð 'ð 'ð 'ð 'r   r	   r&  )XrC  Ú__all__r@  r   rM   r¤   rt   Úurllib.parserï   Úurllib.requestÚ	threadingrÙ  Úhttp.clientÚhttpÚcalendarr   r   r   r   rt  rs  rœ   ÚclientÚ	HTTP_PORTr  r7  rr  rI  rw  r"   r+   r3   rX   rZ   rq   rV   r[   rd   r;  re   rl   r~   r„   ÚIrˆ   ÚXrŠ   r�   r�   r‘   r˜   r�   rž   r    rŸ   r®   rµ   r¼   rÂ   rÛ   rß   rà   ræ   rè   rë   ró   r÷   rý   r  r  r  r  r	  r  r  r  r   r   r   rÎ  rÓ  r   rP  r   r   rY  r   r	   rH   r   r   ú<module>rƒ     sÜ  ððð ð6Mð Mð M€ð 
€	€	€	Ø €€€Ø €€€Ø 	€	€	€	Ø €€€Ø #Ð #Ð #Ð #Ð #Ð #Ð #Ð #Ø Ð Ð Ð Ø Ð Ð Ð Ø Ð Ð Ð Ð Ð à€Ø	€ðð ð ð €Ø€Ø�C˜œÔ-Ñ.Ô.Ð Ø�R”ZÐ @ÑAÔAÐ ð:Ð ðÐ ðAð Að Að €
ðð ð ð 9Ð8Ð8€ð
4ð 
4ð 
4€à2Ð2¨6Ð2Ñ2Ô2€ðBð Bð Bð Bð&0ð 0ð 0ð 0ð(  ¨T¸Ð=Ð=€	àˆbŒjÐ5°r´xÑ@Ô@€ðð ð ð6ð 6ð 6ðp �”ð,Ø-/¬Xñ7ô 7€ð ˆRŒZØ2°B´D¸2¼8±OñEô E€
à�R”Zðð& ŒD�2”8‰Oñ)ô Ð ð*65ð 65ð 65ðp ˆbŒjð
ð  Œ4�"”)Ññ#ô €ð$5ð 5ð 5ðB3ð 3ð 3ð
 $˜œÐ$6Ñ7Ô7€Ø#˜œÐ$MÑNÔNÐ Ø#˜œÐ$9Ñ:Ô:€Ø�2”:˜hÑ'Ô'Ð ðSð Sð Sðj #˜œ
 ;Ñ/Ô/Ð ðð ð ð2ð ð ðAð Að AðH ˆ"Œ*�Y ¤Ñ
)Ô
)€ðð ð ð%ð %ð %ðNð ð ðð ð ð( ˆbŒj˜ 2¤8Ñ,Ô,€ðð ð ð 	ð 	ð 	ðð ð ðð ð ð  $€Ø�"”*Ð9Ñ:Ô:€ð+ð +ð +ðð ð ð!ð !ð !ðFð ð ð"_Eð _Eð _Eð _Eð _Eñ _Eô _Eð _EðDð ð ð ð ñ ô ð ðB_ð _ð _ð _ð _˜,ñ _ô _ð _ðBð ð ð" Ð Ð Ð Ð Ñ Ô Ð ðLDð LDð LDð LDð LDñ LDô LDð LDð` Ð Ð Ð Ð �Ñ Ô Ð ð4)ð 4)ð 4)ð 4)ð 4)�Iñ 4)ô 4)ð 4)ðn"ð "ð "ð8x.ð x.ð x.ð x.ð x.�=ñ x.ô x.ð x.ðvPð Pð Pð Pð P�}ñ Pô Pð Pð Pð Pr   