Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.117.7.5
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : parser.cpython-310.opt-2.pyc
o

_b�C�@s�	ddlZddlZddlmZdgZe�d�Ze�d�Ze�d�Ze�d�Z	e�d�Z
e�d	�Ze�d
�Ze�d�Z
e�d�Ze�d
ej�Ze�d	�Ze�d�ZGdd�dej�ZdS)�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--\s*>z+([a-zA-Z][^\t\n\r\f />\x00]*)(?:\s|/(?!>))*z]((?<=[\'"\s/])[^\s/>][^\s/=>]*)(\s*=+\s*(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?(?:\s|/(?!>))*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#</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>c@s�eZdZ	dZdd�dd�Zdd�Zdd	�Zd
d�ZdZd
d�Z	dd�Z
dd�Zdd�Zdd�Z
d6dd�Zdd�Zdd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zd0d1�Zd2d3�Zd4d5�ZdS)7r)Zscript�styleT)�convert_charrefscCs	||_|��dS�N)r�reset)�selfr�r
�4/usr/local/python-3.10/lib/python3.10/html/parser.py�__init__VszHTMLParser.__init__cCs*	d|_d|_t|_d|_tj�|�dS)N�z???)�rawdata�lasttag�interesting_normal�interesting�
cdata_elem�_markupbase�
ParserBaser�r	r
r
rr_szHTMLParser.resetcCs	|j||_|�d�dS)Nr)r�goahead�r	�datar
r
r�feedgszHTMLParser.feedcCs	|�d�dS)N�)rrr
r
r�closepszHTMLParser.closeNcCs	|jSr)�_HTMLParser__starttag_textrr
r
r�get_starttag_textvszHTMLParser.get_starttag_textcCs$|��|_t�d|jtj�|_dS)Nz</\s*%s\s*>)�lowerr�re�compile�Ir)r	�elemr
r
r�set_cdata_modezs
zHTMLParser.set_cdata_modecCst|_d|_dSr)rrrrr
r
r�clear_cdata_mode~s
zHTMLParser.clear_cdata_modecCs:|j}d}t|�}||k�r�|jr;|js;|�d|�}|dkr:|�dt||d��}|dkr8t�d��	||�s8�q�|}n|j
�	||�}|rI|��}n|jrN�q�|}||kro|jrf|jsf|�t
|||���n	|�|||��|�||�}||kr{�q�|j}|d|��rt�||�r�|�|�}	n>|d|�r�|�|�}	n3|d|�r�|�|�}	n(|d|�r�|�|�}	n|d	|�r�|�|�}	n|d
|kr�|�d�|d
}	n�q�|	dk�r|sאq�|�d|d
�}	|	dkr�|�d|d
�}	|	dkr�|d
}	n|	d
7}	|j�r|j�s|�t
|||	���n	|�|||	��|�||	�}n�|d|��rmt�||�}|�rO|��d
d�}
|�|
�|��}	|d|	d
��sH|	d
}	|�||	�}q	d||d�v�rk|�|||d
��|�||d
�}�q�|d|��r�t�||�}|�r�|�d
�}
|�|
�|��}	|d|	d
��s�|	d
}	|�||	�}q	t�||�}|�r�|�r�|��||d�k�r�|��}	|	|k�r�|}	|�||d
�}�q�|d
|k�r�|�d�|�||d
�}�q�q�||ks|�r||k�r|j�s|j�r|j�s|�t
|||���n	|�|||��|�||�}||d�|_dS)Nr�<�&�"z[\s;]z</�<!--z<?z<!rrz&#�����;)r�lenrr�find�rfind�maxrr �searchr�start�handle_datarZ	updatepos�
startswith�starttagopen�match�parse_starttag�parse_endtag�
parse_comment�parse_pi�parse_html_declaration�charref�group�handle_charref�end�	entityref�handle_entityref�
incomplete)r	r>r�i�n�jZampposr5r3�k�namer
r
rr�s�
��







�




�kzHTMLParser.goaheadcCs�|j}|||d�dkr|�|�S|||d�dkr!|�|�S|||d���dkrJ|�d|d�}|dkr;dS|�||d	|��|d
S|�|�S)N�r(�z<![�	z	<!doctyperr*r)r)rr8Zparse_marked_sectionrr-�handle_decl�parse_bogus_comment)r	rBr�gtposr
r
rr:�s


z!HTMLParser.parse_html_declarationrcCsD|j}|�d|d�}|dkrdS|r|�||d|��|dS)Nrr)r*r)rr-�handle_comment)r	rB�reportr�posr
r
rrKszHTMLParser.parse_bogus_commentcCsH|j}t�||d�}|sdS|��}|�||d|��|��}|S)Nr)r*)r�picloser0r1�	handle_pir>)r	rBrr5rDr
r
rr9 szHTMLParser.parse_picCs�d|_|�|�}|dkr|S|j}|||�|_g}t�||d�}|��}|�d���|_}||kr�t	�||�}|s=q�|�ddd�\}	}
}|
sLd}n-|dd�dkr^|dd�kssn|dd�dkrq|dd�krynn|dd�}|rt
|�}|�|	��|f�|��}||ks4|||���}|dvr�|�
�\}
}d	|jvr�|
|j�d	�}
t|j�|j�d	�}n|t|j�}|�|||��|S|�d
�r�|�||�|S|�||�||jvr�|�|�|S)Nrrr)rH�'r*�")r�/>�
rT)r�check_for_whole_start_tagr�tagfind_tolerantr5r>r<rr�attrfind_tolerantr�append�stripZgetpos�countr,r.r2�endswith�handle_startendtag�handle_starttag�CDATA_CONTENT_ELEMENTSr#)r	rB�endposr�attrsr5rE�tag�m�attrname�restZ	attrvaluer>�lineno�offsetr
r
rr6,s\
&�

��

�
�

zHTMLParser.parse_starttagcCs�|j}t�||�}|rU|��}|||d�}|dkr|dS|dkr?|�d|�r-|dS|�d|�r5dS||kr;|S|dS|dkrEdS|dvrKdS||krQ|S|dStd	��)
Nrr�/rTr)r*r
z6abcdefghijklmnopqrstuvwxyz=/ABCDEFGHIJKLMNOPQRSTUVWXYZzwe should not get here!)r�locatestarttagend_tolerantr5r>r3�AssertionError)r	rBrrcrD�nextr
r
rrV_s.z$HTMLParser.check_for_whole_start_tagcCs|j}t�||d�}|sdS|��}t�||�}|s`|jdur+|�|||��|St�||d�}|sH|||d�dkrC|dS|�	|�S|�
d���}|�d|���}|�
|�|dS|�
d���}|jdur|||jkr||�|||��|S|�
|�|��|S)Nrr*r)rHz</>r)r�	endendtagr0r>�
endtagfindr5rr2rWrKr<rr-�
handle_endtagr$)r	rBrr5rLZ	namematchZtagnamer"r
r
rr7�s6





zHTMLParser.parse_endtagcCs|�||�|�|�dSr)r^rn�r	rbrar
r
rr]�szHTMLParser.handle_startendtagcC�dSrr
ror
r
rr^��zHTMLParser.handle_starttagcCrprr
)r	rbr
r
rrn�rqzHTMLParser.handle_endtagcCrprr
�r	rFr
r
rr=�rqzHTMLParser.handle_charrefcCrprr
rrr
r
rr@�rqzHTMLParser.handle_entityrefcCrprr
rr
r
rr2�rqzHTMLParser.handle_datacCrprr
rr
r
rrM�rqzHTMLParser.handle_commentcCrprr
)r	Zdeclr
r
rrJ�rqzHTMLParser.handle_declcCrprr
rr
r
rrQ�rqzHTMLParser.handle_picCrprr
rr
r
r�unknown_decl�rqzHTMLParser.unknown_decl)r)�__name__�
__module__�__qualname__r_rrrrrrr#r$rr:rKr9r6rVr7r]r^rnr=r@r2rMrJrQrsr
r
r
rr>s8		z
3"()rrZhtmlr�__all__r rrAr?r;r4rPZcommentcloserWrX�VERBOSErirlrmrrr
r
r
r�<module>s,








��


© 2025 GrazzMean