u` d Z ddlmZmZmZmZ ddlT ddlmZ ddl Z ddl Z e j d Z e j d Z e j d Z e j d Z e j d Z e j d Z e j d Z e j d Z e j d Z e j d Z e j d Z e j de j Z e j de j Z e j d Z e j d Z G d de Z G d dej ZdS )zLA parser for HTML and XHTML. Backported for python-future from Python 3.3. )absolute_importdivisionprint_functionunicode_literals)*)_markupbaseNz[&<]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--\s*>z(([a-zA-Z][-.a-zA-Z0-9:_]*)(?:\s|/(?!>))*z[a-zA-Z][^ /> ]*zJ\s*([a-zA-Z_][-.:a-zA-Z_0-9]*)(\s*=\s*(\'[^\']*\'|"[^"]*"|[^\s"\'=<>`]*))?z]((?<=[\'"\s/])[^\s/>][^\s/=>]*)(\s*=+\s*(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?(?:\s|/(?!>))*a <[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 aF <[a-zA-Z][-.a-zA-Z0-9:_]* # 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 comma )?(?:\s|/(?!>))* )* )? \s* # trailing whitespace z#\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>c e Zd ZdZddZd ZdS )HTMLParseErrorz&Exception raised for all parse errors.NNc P |sJ || _ |d | _ |d | _ d S )Nr msglinenooffset)selfr positions n/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/future/backports/html/parser.py__init__zHTMLParseError.__init__U s, sqkqk c j | j }| j |d| j z z }| j |d| j dz z z }|S )Nz, at line %dz, column %dr r )r results r __str__zHTMLParseError.__str__[ sD ;"nt{::F;"mt{Q??F r N)r )__name__ __module____qualname____doc__r r r r r r R s= 00" " " " r r c e Zd ZdZdZd dZd Zd Zd Zd Z d Z d Zd Zd Z d Zd Zd!dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd S )" HTMLParsera 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. )scriptstyleFc x |rt j dt d || _ | dS )zInitialize and reset this instance. If strict is set to False (the default) the parser will parse invalid markup, otherwise it will raise an error. Note that the strict mode is deprecated. zThe strict mode is deprecated. ) stacklevelN)warningswarnDeprecationWarningstrictreset)r r* s r r zHTMLParser.__init__z sE <M:, <