b374k
m1n1 1.01
Apache/2.2.15 (CentOS)
Linux obd60-6c49958d75-2q7cw 5.4.0-174-generic #193-Ubuntu SMP Thu Mar 7 14:29:28 UTC 2024 x86_64
uid=48(apache) gid=48(apache) groups=48(apache)
server ip : 104.21.65.202 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/HTMLParser.pyc
Size11.97 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:23
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@sdZddkZddkZeid�Zeid�Zeid�Zeid�Zeid�Zeid�Z eid �Z
eid
�Z eid �Z eid �Z
eid
ei�Zeid �Zeid�Zdefd��YZdeifd��YZdS(sA parser for HTML and XHTML.iÿÿÿÿNs[&<]s<(/|\Z)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]t>s--\s*>s[a-zA-Z][-.a-zA-Z0-9:_]*s_\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*(\'[^\']*\'|"[^"]*"|[-a-zA-Z0-9./,:;+*%?!&$\(\)_#=~@]*))?sê
<[a-zA-Z][-.a-zA-Z0-9:_]* # tag name
(?:\s+ # whitespace before attribute name
(?:[a-zA-Z_][-.:a-zA-Z0-9_]* # attribute name
(?:\s*=\s* # value indicator
(?:'[^']*' # LITA-enclosed value
|\"[^\"]*\" # LIT-enclosed value
|[^'\">\s]+ # bare value
)
)?
)
)*
\s* # trailing whitespace
s#</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>tHTMLParseErrorcBs#eZdZdd�Zd�ZRS(s&Exception raised for all parse errors.cCs5|pt�||_|d|_|d|_dS(Nii(tAssertionErrortmsgtlinenotoffset(tselfRtposition((s"/usr/lib64/python2.6/HTMLParser.pyt__init__4s 
cCs[|i}|idj o|d|i}n|idj o|d|id}n|S(Ns , at line %ds , column %di(RRtNoneR(Rtresult((s"/usr/lib64/python2.6/HTMLParser.pyt__str__:s  N(NN(t__name__t
__module__t__doc__R RR (((s"/usr/lib64/python2.6/HTMLParser.pyR1s t
HTMLParsercBsøeZdZdZd�Zd�Zd�Zd�Zd�ZdZ
d�Z d �Z d
�Z
d �Zd �Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdZd�ZRS(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|i�dS(s#Initialize and reset this instance.N(treset(R((s"/usr/lib64/python2.6/HTMLParser.pyRZscCs/d|_d|_t|_tii|�dS(s1Reset this instance. Loses all unprocessed data.ts???N(trawdatatlasttagtinteresting_normalt interestingt
markupbaset
ParserBaseR(R((s"/usr/lib64/python2.6/HTMLParser.pyR^s   cCs!|i||_|id�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 '
').
iN(Rtgoahead(Rtdata((s"/usr/lib64/python2.6/HTMLParser.pytfeedescCs|id�dS(sHandle any buffered data.iN(R(R((s"/usr/lib64/python2.6/HTMLParser.pytclosenscCst||i���dS(N(Rtgetpos(Rtmessage((s"/usr/lib64/python2.6/HTMLParser.pyterrorrscCs|iS(s)Return full source of start tag: '<...>'.(t_HTMLParser__starttag_text(R((s"/usr/lib64/python2.6/HTMLParser.pytget_starttag_textwscCs
t|_dS(N(tinteresting_cdataR(R((s"/usr/lib64/python2.6/HTMLParser.pytset_cdata_mode{scCs
t|_dS(N(RR(R((s"/usr/lib64/python2.6/HTMLParser.pytclear_cdata_mode~sc
Cs)|i}d}t|�}x¼||jo®|ii||�}|o|i�}n|}||jo|i|||!�n|i||�}||joPn|i}|d|�oti ||�o|i
|�}nº|d|�o|i |�}n�|d|�o|i |�}nt|d|�o|i
|�}nQ|d|�o|i|�}n.|d|jo|id�|d}nP|djo|o|id�nPn|i||�}q|d |�oÀti ||�}|og|i�d
d !} |i| �|i�}|d |d�p|d}n|i||�}qqÕd ||jo*|i|dd
!�|i|d
�}nPq|d
|�oti ||�}|oc|id�} |i| �|i�}|d |d�p|d}n|i||�}qnti ||�}|o4|o(|i�||jo|id�nPqÕ|d|jo'|id
�|i||d�}qÕPqdp
td�qW|o7||jo*|i|||!�|i||�}n|||_dS(Nit<s</s<!--s<?s<!isEOF in middle of constructs&#iiÿÿÿÿt;t&s#EOF in middle of entity or char refsinteresting.search() lied(RtlenRtsearchtstartt handle_datat updatepost
startswitht starttagopentmatchtparse_starttagt parse_endtagt
parse_commenttparse_pitparse_declarationR tcharreftgroupthandle_charreftendt entityrefthandle_entityreft
incompleteR(
RR9RtitnR0tjR.tktname((s"/usr/lib64/python2.6/HTMLParser.pyR�s�  


 


 
 
cCs�|i}|||d!djp
td�ti||d�}|pdS|i�}|i||d|!�|i�}|S(Nis<?sunexpected call to parse_pi()iÿÿÿÿ(RRtpicloseR*R+t handle_piR9(RR=RR0R?((s"/usr/lib64/python2.6/HTMLParser.pyR4×s "  c
Cs�d|_|i|�}|djo|S|i}|||!|_g}ti||d�}|p
td�|i�}||d|!i�|_ }xð||joât
i||�}|pPn|i ddd�\} }
} |
p
d} nm| d djo| djnp&| d djo| djno | dd!} |i | �} n|i
| i�| f�|i�}q�W|||!i�} | djo�|i�\}
}d |ijo9|
|iid �}
t|i�|iid �}n|t|i�}|id |||!d
f�n| id
�o|i||�n/|i||�||ijo|i�n|S(Niis#unexpected call to parse_starttag()iis'iÿÿÿÿt"Rs/>s
s junk characters in start tag: %ri(Rs/>(R R!tcheck_for_whole_start_tagRttagfindR0RR9tlowerRtattrfindR7tunescapetappendtstripRtcountR)trfindR tendswiththandle_startendtagthandle_starttagtCDATA_CONTENT_ELEMENTSR$(RR=tendposRtattrsR0R@ttagtmtattrnametrestt attrvalueR9RR((s"/usr/lib64/python2.6/HTMLParser.pyR1ãsR 
  

&&

  cCs|i}ti||�}|oÞ|i�}|||d!}|djo |dS|djoY|id|�o |dS|id|�odS|i||d�|id�n|djodS|d jodS|i||�|id
�ntd ��dS( NiRt/s/>iiÿÿÿÿsmalformed empty start tagRs6abcdefghijklmnopqrstuvwxyz=/ABCDEFGHIJKLMNOPQRSTUVWXYZsmalformed start tagswe should not get here!(RtlocatestarttagendR0R9R.R-R R(RR=RRUR?tnext((s"/usr/lib64/python2.6/HTMLParser.pyREs*  
 
 

cCsÁ|i}|||d!djp
td�ti||d�}|pdS|i�}ti||�}|p|id|||!f�n|id�}|i |i
��|i �|S(Nis</sunexpected call to parse_endtagiiÿÿÿÿsbad end tag: %r( RRt endendtagR*R9t
endtagfindR0R R7t
handle_endtagRGR%(RR=RR0R?RT((s"/usr/lib64/python2.6/HTMLParser.pyR24s " 
cCs!|i||�|i|�dS(N(RPR^(RRTRS((s"/usr/lib64/python2.6/HTMLParser.pyRODscCsdS(N((RRTRS((s"/usr/lib64/python2.6/HTMLParser.pyRPIscCsdS(N((RRT((s"/usr/lib64/python2.6/HTMLParser.pyR^MscCsdS(N((RRA((s"/usr/lib64/python2.6/HTMLParser.pyR8QscCsdS(N((RRA((s"/usr/lib64/python2.6/HTMLParser.pyR;UscCsdS(N((RR((s"/usr/lib64/python2.6/HTMLParser.pyR,YscCsdS(N((RR((s"/usr/lib64/python2.6/HTMLParser.pythandle_comment]scCsdS(N((Rtdecl((s"/usr/lib64/python2.6/HTMLParser.pyt handle_declascCsdS(N((RR((s"/usr/lib64/python2.6/HTMLParser.pyRCescCs|id|f�dS(Nsunknown declaration: %r(R (RR((s"/usr/lib64/python2.6/HTMLParser.pyt unknown_declhscs4d|jo|S�fd�}tid||�S(NR(cs|i�d}|ddjoI|d}|dd jot|dd�}n
t|�}t|�Sddk}tidjoHhdd 6}t_x1|ii�D]\}}t|�||<qªWny�i|SWnt j
od
|d SXdS(
Nit#itxtXiiÿÿÿÿu'taposR(R'(RdRe(
tgroupstinttunichrthtmlentitydefsRt
entitydefsR tname2codepointt iteritemstKeyError(tstcRjRkR@tv(R(s"/usr/lib64/python2.6/HTMLParser.pytreplaceEntitiesps"
    s#&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));(tretsub(RRoRr((Rs"/usr/lib64/python2.6/HTMLParser.pyRIms
(RRN(R R
RRQRRRRR R R!R"R$R%RR4R1RER2RORPR^R8R;R,R_RaRCRbRkRI(((s"/usr/lib64/python2.6/HTMLParser.pyRCs8        S 3            (RRRstcompileRR#R<R:R6R/RBt commentcloseRFRHtVERBOSERZR\R]t ExceptionRRR(((s"/usr/lib64/python2.6/HTMLParser.pyt<module>s&