PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home2/bookbymarye/mail/ans_sym/root/opt/alt/python27/lib64/python2.7/
Server: Linux server1.superfastcloudhosting.com 5.14.0-687.31.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Aug 1 05:38:01 EDT 2026 x86_64
IP: 65.109.111.76
Choose File :

Url:
Dir : /home2/bookbymarye/mail/ans_sym/root/opt/alt/python27/lib64/python2.7/HTMLParser.pyo

�
��jc@s)dZddlZddlZejd�Zejd�Zejd�Zejd�Zejd�Zejd�Z	ejd	�Z
ejd
�Zejd�Zejd�Z
ejd
�Zejdej�Zejd	�Zejd�Zdefd��YZdejfd��YZdS(sA parser for HTML and XHTML.i����Ns[&<]s
&[a-zA-Z#]s%&([a-zA-Z][-.a-zA-Z0-9]*)[^a-zA-Z0-9]s)&#(?:[0-9]+|[xX][0-9a-fA-F]+)[^0-9a-fA-F]s	<[a-zA-Z]s
</[a-zA-Z]t>s--\s*>s$([a-zA-Z][^	

 />]*)(?:\s|/(?!>))*s[a-zA-Z][^	

 />]*s]((?<=[\'"\s/])[^\s/>][^\s/=>]*)(\s*=+\s*(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?(?:\s|/(?!>))*s
  <[a-zA-Z][^\t\n\r\f />\x00]*       # tag name
  (?:[\s/]*                          # optional whitespace before attribute name
    (?:(?<=['"\s/])[^\s/>][^\s/=>]*  # attribute name
      (?:\s*=+\s*                    # value indicator
        (?:'[^']*'                   # LITA-enclosed value
          |"[^"]*"                   # LIT-enclosed value
          |(?!['"])[^>\s]*           # bare value
         )
       )?(?:\s|/(?!>))*
     )*
   )?
  \s*                                # trailing whitespace
s#</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>tHTMLParseErrorcBs#eZdZdd�Zd�ZRS(s&Exception raised for all parse errors.cCs'||_|d|_|d|_dS(Nii(tmsgtlinenotoffset(tselfRtposition((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyt__init__=s	
cCsW|j}|jdk	r,|d|j}n|jdk	rS|d|jd}n|S(Ns, at line %ds, column %di(RRtNoneR(Rtresult((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyt__str__Cs	N(NN(t__name__t
__module__t__doc__RRR
(((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyR:st
HTMLParsercBs
eZdZdZd�Zd�Zd�Zd�Zd�ZdZ
d�Zd	�Zd
�Z
d�Zd�Zd
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdZd�Z RS( s�Find tags and other markup and call handler functions.

    Usage:
        p = HTMLParser()
        p.feed(data)
        ...
        p.close()

    Start tags are handled by calling self.handle_starttag() or
    self.handle_startendtag(); end tags by self.handle_endtag().  The
    data between tags is passed from the parser to the derived class
    by calling self.handle_data() with the data as argument (the data
    may be split up in arbitrary chunks).  Entity references are
    passed by calling self.handle_entityref() with the entity
    reference as the argument.  Numeric character references are
    passed to self.handle_charref() with the string containing the
    reference as the argument.
    tscripttstylecCs|j�dS(s#Initialize and reset this instance.N(treset(R((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRcscCsSd|_d|_t|_d|_g|_d|_d|_t	j
j|�dS(s1Reset this instance.  Loses all unprocessed data.ts???iiN(trawdatatlasttagtinteresting_normaltinterestingRt
cdata_elemt_pendingt_pending_lent_parse_thresholdt
markupbaset
ParserBaseR(R((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRgs							cCs�|jt|�7_|j|jkr:|jj|�n�|jsU|j|7_n2|jj|�|jdj|j�7_|j2d|_t|j�}|jd�t|j�|kr�d|_nt|j�|_dS(s�Feed data to the parser.

        Call this as often as you want, with as little or as much text
        as you want (may include '\n').
        RiiN(RtlenRRtappendRtjointgoahead(Rtdatatn((s//opt/alt/python27/lib64/python2.7/HTMLParser.pytfeedrs
		
cCsH|jr7|jdj|j�7_|j2d|_n|jd�dS(sHandle any buffered data.RiiN(RRRRR (R((s//opt/alt/python27/lib64/python2.7/HTMLParser.pytclose�s
	cCst||j���dS(N(Rtgetpos(Rtmessage((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyterror�scCs|jS(s)Return full source of start tag: '<...>'.(t_HTMLParser__starttag_text(R((s//opt/alt/python27/lib64/python2.7/HTMLParser.pytget_starttag_text�scCs2|j�|_tjd|jtj�|_dS(Ns</\s*%s\s*>(tlowerRtretcompiletIR(Rtelem((s//opt/alt/python27/lib64/python2.7/HTMLParser.pytset_cdata_mode�scCst|_d|_dS(N(RRRR(R((s//opt/alt/python27/lib64/python2.7/HTMLParser.pytclear_cdata_mode�s	cCs�|j}d}t|�}x"||kr?|jj||�}|rT|j�}n|jraPn|}||kr�|j|||!�n|j||�}||kr�Pn|j}|d|�rct	j
||�r�|j|�}n�|d|�r	|j|�}n�|d|�r*|j
|�}ns|d|�rK|j|�}nR|d|�rl|j|�}n1|d|ks�|r�|jd�|d}nP|dkrN|s�Pnt	j
||�r�n}|d|�r$|d|kr�|jd�qEtj
||�rqE|j||d�n!|d|�r�|}x8dD]0}	|j|	|d�r@|t|	�8}Pq@q@W|j||d|!�n�|d
|�r�|j||d�n�|||d!j�dkr�|j||d�nZ|d|�r|j||d�n3|d|�r9|j||d�ntd��|}n|j||�}q|d|�r3tj
||�}|r�|j�dd!}
|j|
�|j�}|d|d�s�|d}n|j||�}qq<d||kr/|j|||d!�|j||d�}nPq|d|�rtj
||�}|r�|jd�}
|j|
�|j�}|d|d�s�|d}n|j||�}qntj
||�}|r|r�|j�||kr�|jd�nPq<|d|kr8|jd�|j||d�}q<PqqW|r�||kr�|jr�|j|||!�|j||�}n|||_dS(Nit<s</s<!--s<?s<!iis--!s--t-is	<![CDATA[ii	s	<!doctypeswe should not get here!s&#i����t;t&s#EOF in middle of entity or char ref(s--!s--R2( RRRtsearchtstartRthandle_datat	updatepost
startswithtstarttagopentmatchtparse_starttagtparse_endtagt
parse_commenttparse_pitparse_html_declarationt
endtagopenthandle_commenttendswithtunknown_declR*thandle_declt	handle_pitAssertionErrortcharreftgroupthandle_charreftendt	entityrefthandle_entityreft
incompleteR'(RRKRtiR"R;tjR9tktsuffixtname((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyR �s�			


	




cCs�|j}|||d!dkr0|jd�n|||d!dkrT|j|�S|||d!dkrx|j|�S|||d!j�d	kr�|jd
|d�}|dkr�dS|j||d|!�|dS|j|�SdS(
Nis<!s+unexpected call to parse_html_declaration()is<!--is<![i	s	<!doctypeRi����i(RR'R>tparse_marked_sectionR*tfindREtparse_bogus_comment(RRORtgtpos((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyR@s	

icCs|j}|||d!dkr0|jd�n|jd|d�}|dkrVdS|rw|j||d|!�n|dS(	Nis<!s</s"unexpected call to parse_comment()Ri����i(s<!s</(RR'RURB(RROtreportRtpos((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRV4s	cCs]|j}tj||d�}|s)dS|j�}|j||d|!�|j�}|S(Nii����(RtpicloseR5R6RFRK(RRORR;RP((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyR?@s	cCsnd|_|j|�}|dkr(|S|j}|||!|_g}tj||d�}|j�}|jd�j�|_	}x�||krut
j||�}|s�Pn|jddd�\}	}
}|
s�d}nX|d dko�|dkns%|d dko |dknr5|dd!}n|rM|j|�}n|j|	j�|f�|j�}q�W|||!j
�}|dkr|j�\}
}d
|jkr�|
|jjd
�}
t|j�|jjd
�}n|t|j�}|j|||!�|S|jd	�r;|j||�n/|j||�||jkrj|j|�n|S(Niiiis'i����t"Rs/>s
(Rs/>(RR(tcheck_for_whole_start_tagRttagfindR;RKRIR*RtattrfindtunescapeRtstripR%tcountRtrfindR7RCthandle_startendtagthandle_starttagtCDATA_CONTENT_ELEMENTSR/(RROtendposRtattrsR;RQttagtmtattrnametrestt	attrvalueRKRR((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyR<LsP			$$cCs�|j}tj||�}|r�|j�}|||d!}|dkrR|dS|dkr�|jd|�rx|dS|jd|�r�dS|j||d�|jd�n|dkr�dS|d	kr�dS||kr�|S|dSntd
��dS(NiRt/s/>ii����smalformed empty start tagRs6abcdefghijklmnopqrstuvwxyz=/ABCDEFGHIJKLMNOPQRSTUVWXYZswe should not get here!(RtlocatestarttagendR;RKR9R8R'RG(RRORRiRPtnext((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyR\�s,	cCsj|j}tj||d�}|s)dS|j�}tj||�}|s|jdk	rt|j|||!�|St	j||d�}|s�|||d!dkr�|dS|j
|�Sn|jd�j�}|j
d|j��}|j|�|dS|jd�j�}|jdk	rO||jkrO|j|||!�|Sn|j|�|j�|S(Nii����iis</>R(Rt	endendtagR5RKt
endtagfindR;RRR7R]RVRIR*RUt
handle_endtagR0(RRORR;RWt	namematchttagnameR.((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyR=�s6	


cCs!|j||�|j|�dS(N(RdRr(RRhRg((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRc�scCsdS(N((RRhRg((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRd�scCsdS(N((RRh((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRr�scCsdS(N((RRS((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRJ�scCsdS(N((RRS((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRM�scCsdS(N((RR!((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyR7�scCsdS(N((RR!((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRB�scCsdS(N((Rtdecl((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRE�scCsdS(N((RR!((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRF�scCsdS(N((RR!((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRD�scs2d|kr|S�fd�}tjd||�S(NR4cs|j�d}yZ|ddkri|d}|dd
krSt|dd�}nt|�}t|�SWntk
r�d|dSXtjdkr�d	dl}id
d6}x-|jj	�D]\}}t|�||<q�W|t_ny�j|SWnt
k
rd|dSXdS(Nit#itxtXis&#R3i����u'taposR4(RwRx(tgroupstinttunichrt
ValueErrorRt
entitydefsRthtmlentitydefstname2codepointt	iteritemstKeyError(tstcRR~RQtv(R(s//opt/alt/python27/lib64/python2.7/HTMLParser.pytreplaceEntities�s(




s#&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));(R+tsub(RR�R�((Rs//opt/alt/python27/lib64/python2.7/HTMLParser.pyR_�s(RRN(!RRR
ReRRR#R$R'RR(R)R/R0R R@RVR?R<R\R=RcRdRrRJRMR7RBRERFRDR~R_(((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyRLs<									s			4	 	(										(R
RR+R,RRNRLRHR:RARZtcommentcloseR]ttagfind_tolerantR^tVERBOSERnRpRqt	ExceptionRRR(((s//opt/alt/python27/lib64/python2.7/HTMLParser.pyt<module>s(