Critics have remarked that those four worthies were truly peerless throughout the ages; yet the present falls short of the pastβ€”the ancients favored unadorned simplicity, whereas the moderns prefer refined elegance. Styles of substance and ornament rise and fall in succession, shifting with the changing mores of the times; such evolution is simply the natural order of things. The ideal lies in honoring antiquity without clashing with the present, and embracing modernity without succumbing to its flawsβ€”embodying that perfect balance of substance and refinement that defines the true gentleman. There is surely no need to abandon a carved palace in favor of a cave dwelling, or to trade a jade carriage for a primitive cart with solid wooden wheels.🌌 SpectraShell

🌌 SpectraShell

Current path: lib64/python2.7/



⬆️ Go up: /lib64

πŸ“„ Viewing: HTMLParser.pyo

οΏ½
zfc@sdZddlZddlZejdοΏ½ZejdοΏ½ZejdοΏ½ZejdοΏ½ZejdοΏ½ZejdοΏ½Z	ejd	οΏ½Z
ejd
οΏ½ZejdοΏ½ZejdοΏ½Z
ejd
ejοΏ½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]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"/usr/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"/usr/lib64/python2.7/HTMLParser.pyt__str__Bs	N(NN(t__name__t
__module__t__doc__RRR
(((s"/usr/lib64/python2.7/HTMLParser.pyR9s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"/usr/lib64/python2.7/HTMLParser.pyRbscCs8d|_d|_t|_d|_tjj|οΏ½dS(s1Reset this instance.  Loses all unprocessed data.ts???N(	trawdatatlasttagtinteresting_normaltinterestingRt
cdata_elemt
markupbaset
ParserBaseR(R((s"/usr/lib64/python2.7/HTMLParser.pyRfs
				cCs!|j||_|jdοΏ½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').
        iN(Rtgoahead(Rtdata((s"/usr/lib64/python2.7/HTMLParser.pytfeednscCs|jdοΏ½dS(sHandle any buffered data.iN(R(R((s"/usr/lib64/python2.7/HTMLParser.pytclosewscCst||jοΏ½οΏ½οΏ½dS(N(Rtgetpos(Rtmessage((s"/usr/lib64/python2.7/HTMLParser.pyterror{scCs|jS(s)Return full source of start tag: '<...>'.(t_HTMLParser__starttag_text(R((s"/usr/lib64/python2.7/HTMLParser.pytget_starttag_textοΏ½scCs2|jοΏ½|_tjd|jtjοΏ½|_dS(Ns</\s*%s\s*>(tlowerRtretcompiletIR(Rtelem((s"/usr/lib64/python2.7/HTMLParser.pytset_cdata_modeοΏ½scCst|_d|_dS(N(RRRR(R((s"/usr/lib64/python2.7/HTMLParser.pytclear_cdata_modeοΏ½s	c
Csj|j}d}t|οΏ½}xοΏ½||kr|jj||οΏ½}|rT|jοΏ½}n|jraPn|}||krοΏ½|j|||!οΏ½n|j||οΏ½}||krοΏ½Pn|j}|d|οΏ½r7t	j
||οΏ½rοΏ½|j|οΏ½}nοΏ½|d|οΏ½r	|j|οΏ½}nοΏ½|d|οΏ½r*|j
|οΏ½}nm|d|οΏ½rK|j|οΏ½}nL|d|οΏ½rl|j|οΏ½}n+|d|krοΏ½|jdοΏ½|d}nP|dkr"|sοΏ½Pn|jd|dοΏ½}|dkr|jd|dοΏ½}|dkr|d}qn
|d7}|j|||!οΏ½n|j||οΏ½}q|d	|οΏ½rtj
||οΏ½}|rοΏ½|jοΏ½d
d!}	|j|	οΏ½|jοΏ½}|d|dοΏ½sοΏ½|d}n|j||οΏ½}qqd||kr|j|||d
!οΏ½|j||d
οΏ½}nPq|d
|οΏ½rtj
||οΏ½}|rοΏ½|jdοΏ½}	|j|	οΏ½|jοΏ½}|d|dοΏ½sv|d}n|j||οΏ½}qntj
||οΏ½}|rοΏ½|rοΏ½|jοΏ½||krοΏ½|jdοΏ½nPq|d|kr|jd
οΏ½|j||dοΏ½}qPqqW|rY||krY|jrY|j|||!οΏ½|j||οΏ½}n|||_dS(Nit<s</s<!--s<?s<!iRs&#iiοΏ½οΏ½οΏ½οΏ½t;t&s#EOF in middle of entity or char ref(RtlenRtsearchtstartRthandle_datat	updatepost
startswithtstarttagopentmatchtparse_starttagtparse_endtagt
parse_commenttparse_pitparse_html_declarationtfindtcharreftgroupthandle_charreftendt	entityrefthandle_entityreft
incompleteR (
RR>RtitnR4tjR2tktname((s"/usr/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 R7tparse_marked_sectionR#R:thandle_decltparse_bogus_comment(RRBRtgtpos((s"/usr/lib64/python2.7/HTMLParser.pyR9οΏ½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 R:thandle_comment(RRBtreportRtpos((s"/usr/lib64/python2.7/HTMLParser.pyRIs	cCs]|j}tj||dοΏ½}|s)dS|jοΏ½}|j||d|!οΏ½|jοΏ½}|S(NiiοΏ½οΏ½οΏ½οΏ½(RtpicloseR.R/t	handle_piR>(RRBRR4RD((s"/usr/lib64/python2.7/HTMLParser.pyR8s	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_tagRttagfindR4R>R<R#RtattrfindtunescapetappendtstripRtcountR-trfindR0tendswiththandle_startendtagthandle_starttagtCDATA_CONTENT_ELEMENTSR((RRBtendposRtattrsR4REttagtmtattrnametrestt	attrvalueR>RR((s"/usr/lib64/python2.7/HTMLParser.pyR5sP			$$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!(RtlocatestarttagendR4R>R2R1R tAssertionError(RRBRR`RDtnext((s"/usr/lib64/python2.7/HTMLParser.pyRQNs,	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	endendtagR.R>t
endtagfindR4RRR0RRRIR<R#R:t
handle_endtagR)(RRBRR4RJt	namematchttagnameR'((s"/usr/lib64/python2.7/HTMLParser.pyR6ns6	


cCs!|j||οΏ½|j|οΏ½dS(N(R[Rj(RR_R^((s"/usr/lib64/python2.7/HTMLParser.pyRZοΏ½scCsdS(N((RR_R^((s"/usr/lib64/python2.7/HTMLParser.pyR[οΏ½scCsdS(N((RR_((s"/usr/lib64/python2.7/HTMLParser.pyRjοΏ½scCsdS(N((RRF((s"/usr/lib64/python2.7/HTMLParser.pyR=οΏ½scCsdS(N((RRF((s"/usr/lib64/python2.7/HTMLParser.pyR@οΏ½scCsdS(N((RR((s"/usr/lib64/python2.7/HTMLParser.pyR0οΏ½scCsdS(N((RR((s"/usr/lib64/python2.7/HTMLParser.pyRKοΏ½scCsdS(N((Rtdecl((s"/usr/lib64/python2.7/HTMLParser.pyRHοΏ½scCsdS(N((RR((s"/usr/lib64/python2.7/HTMLParser.pyROοΏ½scCsdS(N((RR((s"/usr/lib64/python2.7/HTMLParser.pytunknown_declοΏ½scs2d|kr|SοΏ½fdοΏ½}tjd||οΏ½S(NR,cs|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&#R+iοΏ½οΏ½οΏ½οΏ½u'taposR,(RpRq(tgroupstinttunichrt
ValueErrorRt
entitydefsRthtmlentitydefstname2codepointt	iteritemstKeyError(tstcRxRwREtv(R(s"/usr/lib64/python2.7/HTMLParser.pytreplaceEntitiesοΏ½s(




s#&(#?[xX]?(?:[0-9a-fA-F]+|\w{1,8}));(R$tsub(RR|R((Rs"/usr/lib64/python2.7/HTMLParser.pyRTοΏ½s(RRN(!RRR
R\RRRRR RR!R"R(R)RR9RIR8R5RQR6RZR[RjR=R@R0RKRHRORnRwRT(((s"/usr/lib64/python2.7/HTMLParser.pyRKs<										^			4	 	(										(R
RR$R%RRAR?R;R3RNtcommentcloseRRttagfind_tolerantRStVERBOSEReRhRit	ExceptionRRR(((s"/usr/lib64/python2.7/HTMLParser.pyt<module>s&
	



πŸ“