9 items
NAME ↑ SIZE MODIFIED PERMS ACTIONS
.. / Parent Directory
__init__.cpython-39.opt-1.pyc — 3.05 KB
2026-04-27 17:40 · rw-r--r--
3.05 KB 2026-04-27 17:40 rw-r--r--
__init__.cpython-39.opt-2.pyc — 2.41 KB
2026-04-27 17:40 · rw-r--r--
2.41 KB 2026-04-27 17:40 rw-r--r--
__init__.cpython-39.pyc — 3.05 KB
2026-04-27 17:40 · rw-r--r--
3.05 KB 2026-04-27 17:40 rw-r--r--
entities.cpython-39.opt-1.pyc — 49.34 KB
2026-04-27 17:40 · rw-r--r--
49.34 KB 2026-04-27 17:40 rw-r--r--
entities.cpython-39.opt-2.pyc — 49.28 KB
2026-04-27 17:40 · rw-r--r--
49.28 KB 2026-04-27 17:40 rw-r--r--
entities.cpython-39.pyc — 49.34 KB
2026-04-27 17:40 · rw-r--r--
49.34 KB 2026-04-27 17:40 rw-r--r--
parser.cpython-39.opt-1.pyc — 12.91 KB
2026-04-27 17:40 · rw-r--r--
12.91 KB 2026-04-27 17:40 rw-r--r--
parser.cpython-39.opt-2.pyc — 10.88 KB
2026-04-27 17:40 · rw-r--r--
10.88 KB 2026-04-27 17:40 rw-r--r--
parser.cpython-39.pyc — 13.35 KB
2026-04-27 17:40 · rw-r--r--
13.35 KB 2026-04-27 17:40 rw-r--r--
ONLINE
__pycache__
9 items
18:04:00
TERMINAL FM
Edit
Preview
Download
Rename
Copy
Chmod
Delete
a iR@sdZddlZddlZddlmZdgZedZedZedZ edZ ed Z ed Z ed Z ed Zed ZedZedejZedejZedejZed ZedZGdddejZdS)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@seZdZdZdZdZdddddZd d Zd d Zd dZ dZ ddZ ddddZ ddZ d>ddZddZddZd?ddZd@d d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zd'.)_HTMLParser__starttag_textrr r r get_starttag_textszHTMLParser.get_starttag_text escapablecCsp||_||_|jdkr(td|_nD|rP|jsPtd|jtjtjB|_ntd|jtjtjB|_dS)N plaintextz\Zz&|])z])) lowerrrrecompilerr IGNORECASEASCII)r elemr"r r r set_cdata_modes       zHTMLParser.set_cdata_modecCst|_d|_d|_dS)NT)rrrrrr r r clear_cdata_modeszHTMLParser.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 flagr r r _set_support_cdatas zHTMLParser._set_support_cdatac Cs4|j}d}t|}||kr|jrv|jsv|d|}|dkr|dt||d}|dkrptd ||spq|}n*|j ||}|r| }n|jrq|}||kr|jr|j r| t|||n| ||||||}||krq|j}|d|rrr9r6r8rr2rz rhZnoscriptr#Fr!T)rcheck_for_whole_start_tagrtagfind_tolerantrDrTrRr$rattrfind_tolerantrappendstripZgetposcountr;r=rArLhandle_startendtaghandle_starttagCDATA_CONTENT_ELEMENTSrr*RCDATA_CONTENT_ELEMENTS)r rXendposrattrsrDr[tagmattrnamerestZ attrvaluerTlinenooffsetr r r rEsh   &            zHTMLParser.parse_starttagcCs6|j}t||d}|}||ddkr2dS|S)Nrrr9)r locatetagendrDrTrer r r rjs z$HTMLParser.check_for_whole_start_tagcCs|j}|d|ddkrdSt||sT||d|ddkrJ|dS||St||d}|}||ddkrdSt||d}|d }| || |S)Nrr2rr9r6r) rr<rJrDr_r|rTrkrRr$ handle_endtagr+)r rXrrDrZrvr r r rFs    zHTMLParser.parse_endtagcCs|||||dSN)rqr}r rvrur r r rps zHTMLParser.handle_startendtagcCsdSr~r rr r r rqszHTMLParser.handle_starttagcCsdSr~r )r rvr r r r}szHTMLParser.handle_endtagcCsdSr~r r r]r r r rSszHTMLParser.handle_charrefcCsdSr~r rr r r rV szHTMLParser.handle_entityrefcCsdSr~r rr r r rA szHTMLParser.handle_datacCsdSr~r rr r r rKszHTMLParser.handle_commentcCsdSr~r )r Zdeclr r r rNszHTMLParser.handle_declcCsdSr~r rr r r rOszHTMLParser.handle_picCsdSr~r rr r r rMszHTMLParser.unknown_decl)T)T)r)!__name__ __module__ __qualname____doc__rrrsr r rrrr r*r+r-rrIrGr_rHrErjrFrprqr}rSrVrArKrNrOrMr r r r rZs>     "   9 )rr%rZhtmlr__all__r&rrWrUrQrCrJrdr`rarkVERBOSErlr|Zlocatestarttagend_tolerantZ endendtagZ endtagfindrrr r r r s4