/usr/lib/python3.10/html/__pycache__
NameSizeModeActions
entities.cpython-310.pyc1444300644editdlrm
parser.cpython-310.pyc135730644editdlrm
__init__.cpython-310.pyc33230644editdlrm
Edit: /usr/lib/python3.10/html/__pycache__/parser.cpython-310.pyc (13573B)
o …9jÌRã@sÞdZddlZddlZddlmZdgZe d¡Ze d¡Ze d¡Z e d¡Z e d ¡Z e d ¡Z e d ¡Z e d ¡Ze d ¡Ze d¡Ze dej¡Ze dej¡Ze dej¡Ze d ¡Ze d¡ZGdd„dejƒZdS)zA parser for HTML and XHTML.éN)ÚunescapeÚ HTMLParserz[&<]z &[a-zA-Z#]z%&([a-zA-Z][-.a-zA-Z0-9]*)[^a-zA-Z0-9]z)&#(?:[0-9]+|[xX][0-9a-fA-F]+)[^0-9a-fA-F]z <[a-zA-Z]z z--!?>z-?>z0([a-zA-Z][^\t\n\r\f />]*)(?:[\t\n\r\f ]|/(?!>))*a{ ( (?<=['"\t\n\r\f /])[^\t\n\r\f />][^\t\n\r\f /=>]* # attribute name ) ([\t\n\r\f ]*=[\t\n\r\f ]* # value indicator ('[^']*' # LITA-enclosed value |"[^"]*" # LIT-enclosed value |(?!['"])[^>\t\n\r\f ]* # bare value ) )? (?:[\t\n\r\f ]|/(?!>))* # possibly followed by a space a [a-zA-Z][^\t\n\r\f />]* # tag name [\t\n\r\f /]* # optional whitespace before attribute name (?:(?<=['"\t\n\r\f /])[^\t\n\r\f />][^\t\n\r\f /=>]* # attribute name (?:[\t\n\r\f ]*=[\t\n\r\f ]* # value indicator (?:'[^']*' # LITA-enclosed value |"[^"]*" # LIT-enclosed value |(?!['"])[^>\t\n\r\f ]* # bare value ) )? [\t\n\r\f /]* # possibly followed by a space )* >? aF <[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* # possibly followed by a space )?(?:\s|/(?!>))* )* )? \s* # trailing whitespace z#c@seZdZdZdZdZdddœdd„Zd d „Zd d „Zd d„Z dZ dd„Z ddœdd„Z dd„Z d>dd„Zdd„Zdd„Zd>dd„Zd?d d!„Zd"d#„Zd$d%„Zd&d'„Zd(d)„Zd*d+„Zd,d-„Zd.d/„Zd0d1„Zd2d3„Zd4d5„Zd6d7„Zd8d9„Zd:d;„Zd'.)Ú_HTMLParser__starttag_textrrrrÚget_starttag_textszHTMLParser.get_starttag_text©Ú escapablecCst| ¡|_||_|jdkrt d¡|_dS|r*|js*t d|jtjtjB¡|_dSt d|jtjtjB¡|_dS)NÚ plaintextz\Zz&|])z])) ÚlowerrrÚreÚcompilerr Ú IGNORECASEÚASCII)rÚelemr(rrrÚset_cdata_mode¡s      ÿ   ÿzHTMLParser.set_cdata_modecCst|_d|_d|_dS)NT)rrrrrrrrÚclear_cdata_mode­s zHTMLParser.clear_cdata_modecCs ||_dS)aEnable or disable support of the CDATA sections. If enabled, "<[CDATA[" starts a CDATA section which ends with "]]>". If disabled, "<[CDATA[" starts a bogus comments which ends with ">". This method is not called by default. Its purpose is to be called in custom handle_starttag() and handle_endtag() methods, with value that depends on the adjusted current node. See https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state for details. N)r)rÚflagrrrÚ_set_support_cdata²s zHTMLParser._set_support_cdatac Cs|j}d}t|ƒ}||krY|jr;|js;| d|¡}|dkr:| dt||dƒ¡}|dkr8t d¡  ||¡s8n!|}n|j   ||¡}|rI|  ¡}n|jrNn |}||kro|jrf|j rf|  t|||…ƒ¡n |  |||…¡| ||¡}||kr{nÞ|j}|d|ƒrt ||¡r| |¡} n@|d|ƒr›| |¡} n5|d|ƒr¦| |¡} n*|d|ƒr±| |¡} n|d |ƒr¼| |¡} n|d |ksÄ|rÎ|  d¡|d } nn‰| dkr‰|sÙn€t ||¡ràn§|d|ƒr|d |krò|  d¡n•t ||¡rùnŽ| ||d d…¡n‚|d|ƒr0|}d D]} | | |d ¡r"|t| ƒ8}nq| ||d |…¡nW|d|ƒrF|jrF| ||dd…¡nA|||d… ¡dkr_| ||d d…¡n(|d |ƒrq| ||d d…¡n|d|ƒrƒ| ||d d…¡nt dƒ‚|} | || ¡}nÅ|d|ƒràt! ||¡}|rÃ| "¡d d…} | #| ¡| $¡} |d| d ƒs¼| d } | || ¡}q d||d…vrß|  |||d …¡| ||d ¡}ny|d|ƒrQt% ||¡}|r| "d ¡} | &| ¡| $¡} |d| d ƒs | d } | || ¡}q t' ||¡}|r;|r:| "¡||d…kr:| $¡} | |kr2|} | ||d ¡}n|d |krP|  d¡| ||d ¡}nnJdƒ‚||ks|r„||kr„|jru|j ru|  t|||…ƒ¡n |  |||…¡| ||¡}||d…|_dS)Nrú<ú&é"z [\t\n\r\f ;]úz]]>rrBr?rArr#zÚ ruÚnoscriptr)Fr'T)r%Úcheck_for_whole_start_tagrÚtagfind_tolerantrNr^r\r*rÚattrfind_tolerantrÚappendÚstripÚgetposÚcountrDrFrJrVÚhandle_startendtagÚhandle_starttagÚCDATA_CONTENT_ELEMENTSrr0ÚRCDATA_CONTENT_ELEMENTS)rrbÚendposrÚattrsrNrfÚtagÚmÚattrnameÚrestÚ attrvaluer^ÚlinenoÚoffsetrrrrO—sf   &( ó   ÿ   ù ÿ þzHTMLParser.parse_starttagcCs>|j}t ||d¡}|sJ‚| ¡}||ddkrdS|S)Nr#rrB)rÚ locatetagendrNr^rrrrrrxÐsz$HTMLParser.check_for_whole_start_tagcCsà|j}|||d…dksJdƒ‚| d|d¡dkrdSt ||¡s8||d|d…dkr3|dS| |¡St ||d¡}|sDJ‚| ¡}||ddkrRdSt ||d¡}|s^J‚| d¡  ¡}|  |¡|  ¡|S) Nr;r7zunexpected call to parse_endtagrrrBr?r#) rrErTrNrjrŒr^ryr\r*Ú handle_endtagr1)rrbrrNrdr…rrrrPÚs&   zHTMLParser.parse_endtagcCs| ||¡| |¡dS©N)r€r©rr…r„rrrrøs zHTMLParser.handle_startendtagcCódSrŽrrrrrr€ýózHTMLParser.handle_starttagcCrrŽr)rr…rrrrr‘zHTMLParser.handle_endtagcCrrŽr©rrhrrrr]r‘zHTMLParser.handle_charrefcCrrŽrr’rrrr` r‘zHTMLParser.handle_entityrefcCrrŽrr rrrrJ r‘zHTMLParser.handle_datacCrrŽrr rrrrUr‘zHTMLParser.handle_commentcCrrŽr)rÚdeclrrrrXr‘zHTMLParser.handle_declcCrrŽrr rrrrYr‘zHTMLParser.handle_picCrrŽrr rrrrWr‘zHTMLParser.unknown_decl)T)r#)!Ú__name__Ú __module__Ú __qualname__Ú__doc__rr‚rrr"r$r%r&r0r1r3rrSrQrjrRrOrxrPrr€rr]r`rJrUrXrYrWrrrrrZs@    "   9  )r—r+rÚhtmlrÚ__all__r,rrar_r[rMrTrqrmrnryÚVERBOSErzrŒÚlocatestarttagend_tolerantÚ endendtagÚ endtagfindrrrrrrÚs6             õ  óò