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 : 172.67.192.52 | your ip : 10.244.126.0
safemode OFF
 >  / usr / lib64 / python2.6 /
Filename/usr/lib64/python2.6/htmllib.pyc
Size19.91 kb
Permissionrw-r--r--
Ownerapache
Create time23-Dec-2025 17:41
Last modified20-Jun-2019 19:45
Last accessed22-Apr-2026 05:27
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
Ñò
§ÚêLc@s«dZddklZeddd�[ddkZddklZdd gZd eifd
��YZdei fd ��YZ
e d �Z e
d
jo e �ndS(svHTML 2.0 parser.

See the HTML 2.0 specification:
http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html
iÿÿÿÿ(twarnpy3ks1the htmllib module has been removed in Python 3.0t
stackleveliN(tAS_ISt
HTMLParsertHTMLParseErrorcBseZdZRS(s3Error raised when an HTML document can't be parsed.(t__name__t
__module__t__doc__(((s/usr/lib64/python2.6/htmllib.pyRscBs3eZdZddklZdd�Zd�Zd�Zd�Zd�Z d �Z
d
�Z d �Z d �Z
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�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/�Z0d0�Z1d1�Z2d2�Z3d3�Z4d4�Z5d5�Z6d6�Z7d7�Z8d8�Z9d9�Z:d:�Z;d;�Z<d<�Z=d=�Z>dd>�Z?d?�Z@d@�ZAdA�ZBdB�ZCdC�ZDdD�ZEdE�ZFdF�ZGdG�ZHdH�ZIdI�ZJdJ�ZKdK�ZLdL�ZMdM�ZNdN�ZOdO�ZPdP�ZQdQ�ZRdR�ZSdS�ZTdT�ZUdU�ZVdV�ZWdW�ZXdX�ZYdY�ZZdZ�Z[RS([sÌThis is the basic HTML parser class.

It supports all entity names required by the XHTML 1.0 Recommendation.
It also defines handlers for all HTML 2.0 and many HTML 3.0 and 3.2
elements.

iÿÿÿÿ(t
entitydefsicCs tii||�||_dS(s�Creates an instance of the HTMLParser class.

The formatter parameter is the formatter instance associated with
the parser.

N(tsgmllibt
SGMLParsert__init__t formatter(tselfR tverbose((s/usr/lib64/python2.6/htmllib.pyR "scCst|��dS(N(R(R
tmessage((s/usr/lib64/python2.6/htmllib.pyterror,scCs\tii|�d|_d|_d|_d|_d|_g|_ d|_
g|_ dS(Ni( R R
tresettNonetsavedatatisindexttitletbasetanchort
anchorlisttnofillt
list_stack(R
((s/usr/lib64/python2.6/htmllib.pyR/s       cCsV|idj o|i||_n/|io|ii|�n|ii|�dS(N(RRRR tadd_literal_datatadd_flowing_data(R
tdata((s/usr/lib64/python2.6/htmllib.pyt handle_data?s

cCs
d|_dS(sêBegins saving character data in a buffer instead of sending it
to the formatter object.

Retrieve the stored data via the save_end() method. Use of the
save_bgn() / save_end() pair may not be nested.

tN(R(R
((s/usr/lib64/python2.6/htmllib.pytsave_bgnJscCs9|i}d|_|ipdi|i��}n|S(sHEnds buffering character data and returns all data saved since
the preceding call to the save_bgn() method.

If the nofill flag is false, whitespace is collapsed to single
spaces. A call to this method without a preceding call to the
save_bgn() method will raise a TypeError exception.

t N(RRRtjointsplit(R
R((s/usr/lib64/python2.6/htmllib.pytsave_endTs
 
cCs+||_|io|ii|�ndS(s}This method is called at the start of an anchor region.

The arguments correspond to the attributes of the <A> tag with
the same names. The default implementation maintains a list of
hyperlinks (defined by the HREF attribute for <A> tags) within
the document. The list of hyperlinks is available as the data
attribute anchorlist.

N(RRtappend(R
threftnamettype((s/usr/lib64/python2.6/htmllib.pyt
anchor_bgnes

cCs5|io'|idt|i��d|_ndS(sØThis method is called at the end of an anchor region.

The default implementation adds a textual footnote marker using an
index into the list of hyperlinks created by the anchor_bgn()method.

s[%d]N(RRtlenRR(R
((s/usr/lib64/python2.6/htmllib.pyt
anchor_endss
cGs|i|�dS(s�This method is called to handle images.

The default implementation simply passes the alt value to the
handle_data() method.

N(R(R
tsrctalttargs((s/usr/lib64/python2.6/htmllib.pyt handle_image�scCsdS(N((R
tattrs((s/usr/lib64/python2.6/htmllib.pyt
start_html�scCsdS(N((R
((s/usr/lib64/python2.6/htmllib.pytend_html�scCsdS(N((R
R0((s/usr/lib64/python2.6/htmllib.pyt
start_head�scCsdS(N((R
((s/usr/lib64/python2.6/htmllib.pytend_head�scCsdS(N((R
R0((s/usr/lib64/python2.6/htmllib.pyt
start_body�scCsdS(N((R
((s/usr/lib64/python2.6/htmllib.pytend_body�scCs|i�dS(N(R (R
R0((s/usr/lib64/python2.6/htmllib.pyt start_title�scCs|i�|_dS(N(R$R(R
((s/usr/lib64/python2.6/htmllib.pyt end_title�scCs5x.|D]&\}}|djo
||_qqWdS(NR&(R(R
R0tatv((s/usr/lib64/python2.6/htmllib.pytdo_base�s 
cCs
d|_dS(Ni(R(R
R0((s/usr/lib64/python2.6/htmllib.pyt
do_isindex¡scCsdS(N((R
R0((s/usr/lib64/python2.6/htmllib.pytdo_link¤scCsdS(N((R
R0((s/usr/lib64/python2.6/htmllib.pytdo_meta§scCsdS(N((R
R0((s/usr/lib64/python2.6/htmllib.pyt do_nextidªscCs$|iid�|iid�dS(Nith1i(R@iii(R t
end_paragrapht push_font(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_h1±scCs!|iid�|ii�dS(Ni(R RAtpop_font(R
((s/usr/lib64/python2.6/htmllib.pytend_h1µscCs$|iid�|iid�dS(Nith2i(RFiii(R RARB(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_h2¹scCs!|iid�|ii�dS(Ni(R RARD(R
((s/usr/lib64/python2.6/htmllib.pytend_h2½scCs$|iid�|iid�dS(Nith3i(RIiii(R RARB(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_h3ÁscCs!|iid�|ii�dS(Ni(R RARD(R
((s/usr/lib64/python2.6/htmllib.pytend_h3ÅscCs$|iid�|iid�dS(Nith4i(RLiii(R RARB(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_h4ÉscCs!|iid�|ii�dS(Ni(R RARD(R
((s/usr/lib64/python2.6/htmllib.pytend_h4ÍscCs$|iid�|iid�dS(Nith5i(ROiii(R RARB(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_h5ÑscCs!|iid�|ii�dS(Ni(R RARD(R
((s/usr/lib64/python2.6/htmllib.pytend_h5ÕscCs$|iid�|iid�dS(Nith6i(RRiii(R RARB(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_h6ÙscCs!|iid�|ii�dS(Ni(R RARD(R
((s/usr/lib64/python2.6/htmllib.pytend_h6ÝscCs|iid�dS(Ni(R RA(R
R0((s/usr/lib64/python2.6/htmllib.pytdo_pãscCs@|iid�|iitttdf�|id|_dS(Ni(R RARBRR(R
R0((s/usr/lib64/python2.6/htmllib.pyt start_preæscCs:|iid�|ii�td|id�|_dS(Nii(R RARDtmaxR(R
((s/usr/lib64/python2.6/htmllib.pytend_preës
cCs|i|�|id�dS(Ntxmp(RVt
setliteral(R
R0((s/usr/lib64/python2.6/htmllib.pyt start_xmpðs
cCs|i�dS(N(RX(R
((s/usr/lib64/python2.6/htmllib.pytend_xmpôscCs|i|�|id�dS(Ntlisting(RVRZ(R
R0((s/usr/lib64/python2.6/htmllib.pyt
start_listing÷s
cCs|i�dS(N(RX(R
((s/usr/lib64/python2.6/htmllib.pyt end_listingûscCs0|iid�|iitdttf�dS(Nii(R RARBR(R
R0((s/usr/lib64/python2.6/htmllib.pyt
start_addressþscCs!|iid�|ii�dS(Ni(R RARD(R
((s/usr/lib64/python2.6/htmllib.pyt end_addressscCs$|iid�|iid�dS(Nit
blockquote(R RAt push_margin(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_blockquotescCs!|iid�|ii�dS(Ni(R RAt
pop_margin(R
((s/usr/lib64/python2.6/htmllib.pytend_blockquote
scCsA|ii|i �|iid�|iidddg�dS(Ntult*i(R RARRcR%(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_ulscCs=|io|id=n|ii|i �|ii�dS(Niÿÿÿÿ(RR RARe(R
((s/usr/lib64/python2.6/htmllib.pytend_uls
cCsm|iid�|io0|id\}}}}|d|d<}n
d\}}|ii||�dS(NiiÿÿÿÿiiRh(Rhi(R RARtadd_label_data(R
R0tdummytlabeltcounterttop((s/usr/lib64/python2.6/htmllib.pytdo_lis 
 cCs�|ii|i �|iid�d}xL|D]D\}}|djo+t|�djo|d}n|}q1q1W|iid|dg�dS(Ntols1.R(it.i(R RARRcR*R%(R
R0RmR9R:((s/usr/lib64/python2.6/htmllib.pytstart_ol#s 
cCs=|io|id=n|ii|i �|ii�dS(Niÿÿÿÿ(RR RARe(R
((s/usr/lib64/python2.6/htmllib.pytend_ol-s
cCs|i|�dS(N(Ri(R
R0((s/usr/lib64/python2.6/htmllib.pyt
start_menu2scCs|i�dS(N(Rj(R
((s/usr/lib64/python2.6/htmllib.pytend_menu5scCs|i|�dS(N(Ri(R
R0((s/usr/lib64/python2.6/htmllib.pyt start_dir8scCs|i�dS(N(Rj(R
((s/usr/lib64/python2.6/htmllib.pytend_dir;scCs-|iid�|iidddg�dS(NitdlRi(R RARR%(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_dl>scCs)|id�|io|id=ndS(Niiÿÿÿÿ(tddpopR(R
((s/usr/lib64/python2.6/htmllib.pytend_dlBs

cCs|i�dS(N(R{(R
R0((s/usr/lib64/python2.6/htmllib.pytdo_dtFscCs7|i�|iid�|iidddg�dS(NtddRi(R{R RcRR%(R
R0((s/usr/lib64/python2.6/htmllib.pytdo_ddIs
cCsU|ii|�|io7|idddjo|id=|ii�qQndS(NiÿÿÿÿiR~(R RARRe(R
tbl((s/usr/lib64/python2.6/htmllib.pyR{Ns


cCs|i|�dS(N(tstart_i(R
R0((s/usr/lib64/python2.6/htmllib.pyt
start_citeYscCs|i�dS(N(tend_i(R
((s/usr/lib64/python2.6/htmllib.pytend_citeZscCs|i|�dS(N(tstart_tt(R
R0((s/usr/lib64/python2.6/htmllib.pyt
start_code\scCs|i�dS(N(tend_tt(R
((s/usr/lib64/python2.6/htmllib.pytend_code]scCs|i|�dS(N(R�(R
R0((s/usr/lib64/python2.6/htmllib.pytstart_em_scCs|i�dS(N(R�(R
((s/usr/lib64/python2.6/htmllib.pytend_em`scCs|i|�dS(N(R�(R
R0((s/usr/lib64/python2.6/htmllib.pyt start_kbdbscCs|i�dS(N(R�(R
((s/usr/lib64/python2.6/htmllib.pytend_kbdcscCs|i|�dS(N(R�(R
R0((s/usr/lib64/python2.6/htmllib.pyt
start_sampescCs|i�dS(N(R�(R
((s/usr/lib64/python2.6/htmllib.pytend_sampfscCs|i|�dS(N(tstart_b(R
R0((s/usr/lib64/python2.6/htmllib.pyt start_stronghscCs|i�dS(N(tend_b(R
((s/usr/lib64/python2.6/htmllib.pyt
end_strongiscCs|i|�dS(N(R�(R
R0((s/usr/lib64/python2.6/htmllib.pyt start_varkscCs|i�dS(N(R�(R
((s/usr/lib64/python2.6/htmllib.pytend_varlscCs |iitdttf�dS(Ni(R RBR(R
R0((s/usr/lib64/python2.6/htmllib.pyR�pscCs|ii�dS(N(R RD(R
((s/usr/lib64/python2.6/htmllib.pyR�rscCs |iittdtf�dS(Ni(R RBR(R
R0((s/usr/lib64/python2.6/htmllib.pyR�uscCs|ii�dS(N(R RD(R
((s/usr/lib64/python2.6/htmllib.pyR�wscCs |iitttdf�dS(Ni(R RBR(R
R0((s/usr/lib64/python2.6/htmllib.pyR�zscCs|ii�dS(N(R RD(R
((s/usr/lib64/python2.6/htmllib.pyR�|scCs�d}d}d}xk|D]c\}}|i�}|djo
|}n|djo
|}n|djo|i�}qqW|i|||�dS(NRR&R'R((tstriptlowerR)(R
R0R&R'R(tattrnametvalue((s/usr/lib64/python2.6/htmllib.pytstart_as  




cCs|i�dS(N(R+(R
((s/usr/lib64/python2.6/htmllib.pytend_a�scCs|ii�dS(N(R tadd_line_break(R
R0((s/usr/lib64/python2.6/htmllib.pytdo_br�scCs|ii�dS(N(R t add_hor_rule(R
R0((s/usr/lib64/python2.6/htmllib.pytdo_hr�sc
Cs%d}d}d}d}d}d}xÞ|D]Ö\}} |djo
| }n|djo
| }n|djo
| }n|djo
| }n|djo*yt| �}WqÊtj
oqÊXn|d jo*yt| �}Wqtj
oqXq+q+W|i||||||�dS(
NRs(image)italignR-tismapR,twidththeight(tintt
ValueErrorR/(
R
R0R�R-R R,R¡R¢R�R�((s/usr/lib64/python2.6/htmllib.pytdo_img�s6 








 

cCs|i|�|i�dS(N(RVt
setnomoretags(R
R0((s/usr/lib64/python2.6/htmllib.pyt do_plaintext¶s
cCsdS(N((R
ttagR0((s/usr/lib64/python2.6/htmllib.pytunknown_starttag¼scCsdS(N((R
R¨((s/usr/lib64/python2.6/htmllib.pytunknown_endtag¿s(\RRRthtmlentitydefsRR RRRR R$R)R+R/R1R2R3R4R5R6R7R8R;R<R=R>R?RCRERGRHRJRKRMRNRPRQRSRTRURVRXR[R\R^R_R`RaRdRfRiRjRpRsRtRuRvRwRxRzR|R}RR{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ª(((s/usr/lib64/python2.6/htmllib.pyRs²
 
 
                                     
                                   c CsPddk}ddk}|p|id}n|o|ddj}|o |d=n|o|d}nd}|djo
|i}nFyt|d�}Wn/tj
o#}|GdG|GH|id�nX|i�}||ij o|i�n|o|i �}n|i
|i ��}t |�}|i
|�|i�dS( Niÿÿÿÿiis-ss test.htmlt-trt:(tsysR targvtstdintopentIOErrortexittreadtcloset
NullFormattertAbstractFormattert
DumbWriterRtfeed( R.R¯R tsilenttfiletftmsgRtp((s/usr/lib64/python2.6/htmllib.pyttestÃs2 


  
t__main__(RtwarningsRR R Rt__all__tSGMLParseErrorRR
RRRÀR(((s/usr/lib64/python2.6/htmllib.pyt<module>s   ÿ­ '