Your IP : 216.73.216.160
�
z�h�B���SrSSKrSSKrSSKJr S/r\R"S5r\R"S5r\R"S5r \R"S5r
\R"S 5r\R"S
5r\R"S5r
\R"S5r\R"S
5r\R"S\R 5r\R"S
5r\R"S5r"SS\R(5rg)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--\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��^�\rSrSrSrSrSS.U4SjjrU4SjrSrS r S
r
SrSrS
r
SrSrS SjrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrU=r $)!r�>aFind 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�N>�[TU]5 XlUR5 g)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 ��2/opt/alt/python313/lib64/python3.13/html/parser.pyr
�HTMLParser.__init__Vs��� ���� 0���
�
��c�b>�SUlSUl[UlSUl[
TU]5 g)z1Reset this instance. Loses all unprocessed data.�z???N)�rawdata�lasttag�interesting_normal�interesting�
cdata_elemrr)rrs �rr�HTMLParser.reset`s)���������-������
��
�rc�N�URU-UlURS5 g)zyFeed 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�feed�HTMLParser.feedhs���|�|�d�*������Q�rc�&�URS5 g)zHandle any buffered data.�N)r�rs r�close�HTMLParser.closeqs
�����Q�rNc��UR$)z)Return full source of start tag: '<...>'.)�_HTMLParser__starttag_textr$s r�get_starttag_text�HTMLParser.get_starttag_textws���#�#�#rc��UR5Ul[R"SUR-[R5Ulg)Nz</\s*%s\s*>)�lowerr�re�compile�Ir)r�elems r�set_cdata_mode�HTMLParser.set_cdata_mode{s/���*�*�,����:�:�n�t���&F����M��rc�(�[UlSUlg�N)rrrr$s r�clear_cdata_mode�HTMLParser.clear_cdata_modes��-�����rc��
�URnSn[U5nX4:Ga�UR(a|UR(dkUR SU5nUS:aRURS[
X4S-
55nUS:�a,[R"S5RX&5(dGO?UnOHURRX#5nU(aUR5nOUR(aGO�UnX5:aRUR(a.UR(dUR[X#U55 OURX#U5 URX55nX4:XaGO�URnU"SU5(Ga�[ R#X#5(aUR%U5n O�U"SU5(aUR'U5n O�U"SU5(aUR)U5n ObU"SU5(aUR+U5n OBU"S U5(aUR-U5n O"US
-U:aURS5 US
-n OGO�U S:a�U(dGO�UR SUS
-5n U S:a!UR SUS
-5n U S:aUS
-n OU S
-
n UR(a.UR(dUR[X#U 55 OURX#U 5 URX95nGO�U"SU5(a�[.R#X#5nU(a^UR15S
Sn
UR3U
5 UR55n U"SU S
-
5(dU S
-
n URX95nGMpSX#S;a*URX#US
-5 URX3S
-5nGO+U"SU5(Ga
[6R#X#5nU(a\UR1S
5n
UR9U
5 UR55n U"SU S
-
5(dU S
-
n URX95nGM+[:R#X#5nU(aIU(aAUR15X#S:Xa+UR55n X�::aUn URX3S
-5nO?US
-U:a&URS5 URX3S
-5nOOS5eX4:aGM�U(ayX4:atUR(dcUR(a.UR(dUR[X#U55 OURX#U5 URX45nX#SUlg)Nr�<�&�"z[\s;]�</�<!--�<?�<!r#rz&#�����;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�charref�group�handle_charref�end� entityref�handle_entityref�
incomplete)rrUr�i�n�j�ampposrLrJ�k�names rr�HTMLParser.goahead�s����,�,��
����L���e��$�$�T�_�_��L�L��a�(���q�5�%�]�]�3��A��t��=�F��!���J�J�x�0�7�7��H�H���A���(�(�/�/��;������
�A������A��u��(�(�����$�$�X�g��l�%;�<��$�$�W�q�\�2����q�$�A��v�u� �+�+�J��#�q�!�!��%�%�g�1�1��+�+�A�.�A���a�(�(��)�)�!�,�A����*�*��*�*�1�-�A���a�(�(��
�
�a�(�A���a�(�(��3�3�A�6�A��!�e�q�[��$�$�S�)��A��A���q�5������S�!�a�%�0�A��1�u�#�L�L��a�!�e�4���q�5� !�A��A���Q����,�,�T�_�_��(�(��'�A�,�)?�@��(�(��1��6��N�N�1�(���D�!�$�$��
�
�g�1��� �;�;�=��2�.�D��'�'��-�� � ��A�%�c�1�Q�3�/�/���E�����q�,�A���g�b�k�)��(�(��1�Q�3��8� �N�N�1��c�2����C��#�#�!����3��� �;�;�q�>�D��)�)�$�/�� � ��A�%�c�1�Q�3�/�/���E�����q�,�A��"�(�(��4����u�{�{�}����;�!�I�I�K���6� !�A� �N�N�1�!�e�4����!�e�q�[��$�$�S�)����q�a�%�0�A��5�5�5�q�S�e�V�1�5�����$�$�T�_�_�� � ��'�A�,�!7�8�� � ��1��.����q�$�A��r�{��rc�p�URnX!US-S:XdS5eX!US-S:XaURU5$X!US-S:XaURU5$X!US-R5S :Xa7UR S
US-5nUS:XagURX!S-U5 US-$UR
U5$)
Nr?r>z+unexpected call to parse_html_declaration()�r<�z<![� z <!doctyperr@r#)rrO�parse_marked_sectionr,rC�handle_decl�parse_bogus_comment)rrYr�gtposs rrQ�!HTMLParser.parse_html_declarations����,�,����1��~��%� D�)C� D�%��Q�q�S�>�V�#��%�%�a�(�(�
�q��s�^�u�
$��,�,�Q�/�/�
�q��s�^�
!�
!�
#�{�
2��L�L��a��c�*�E���{�����W�q�S��/�0���7�N��+�+�A�.�.rc��URnX1US-S;dS5eURSUS-5nUS:XagU(aURX1S-U5 US-$)Nr?)r>r;z"unexpected call to parse_comment()rr@r#)rrC�handle_comment)rrY�reportr�poss rrf�HTMLParser.parse_bogus_commentsq���,�,����1��~��-� C�1B� C�-��l�l�3��!��$���"�9�������!��C� 0�1��Q�w�rc���URnX!US-S:XdS5e[RX!S-5nU(dgUR5nUR X!S-U5 UR5nU$)Nr?r=zunexpected call to parse_pi()r@)r�picloserFrG� handle_pirU)rrYrrLr[s rrP�HTMLParser.parse_pi!sn���,�,����1��~��%�F�'F�F�%����w�!��,�����K�K�M�����w��s�A��'��I�I�K���rc��SUlURU5nUS:aU$URnX1UUl/n[R X1S-5nU(dS5eUR5nUR
S5R5=UlnXb:a�[R X65nU(dO�UR
SSS5up�nU
(dSnO0USSSs=:Xa USS:XdO USSSs=:Xa USS:XaO OUSSnU(a[U5nURU R5U45 UR5nXb:aM�X6UR5nUS ;aURX1U5 U$URS
5(aURXt5 U$UR!Xt5 XpR";aUR%U5 U$)Nrr#z#unexpected call to parse_starttag()r?rb�'r@�")r�/>ru)r(�check_for_whole_start_tagr�tagfind_tolerantrLrUrSr,r�attrfind_tolerantr�append�striprH�endswith�handle_startendtag�handle_starttag�CDATA_CONTENT_ELEMENTSr1)
rrY�endposr�attrsrLr]�tag�m�attrname�rest� attrvaluerUs
rrM�HTMLParser.parse_starttag-s���#����/�/��2���A�:��M��,�,��&��0����� �&�&�w�!��4���;�;�;�u��I�I�K��"�[�[��^�1�1�3�3���s��j�!�'�'��3�A���()����1�a�(8�%�H�I�� � ��2�A��$�8�)�B�C�.�8��2�A��#�7��2�3��7�%�a��O� ��$�Y�/� ��L�L�(�.�.�*�I�6�7�����A��j����%�%�'���k�!����W�v�.�/��M��<�<�����#�#�C�/�
�
�
� � ��,��1�1�1��#�#�C�(��
rc�l�URn[RX!5nU(a�UR5nX$US-nUS:XaUS-$US:Xa@UR SU5(aUS-$UR SU5(agXA:�aU$US-$US:XagUS;agXA:�aU$US-$[S 5e)
Nr#r�/rur?r@rz6abcdefghijklmnopqrstuvwxyz=/ABCDEFGHIJKLMNOPQRSTUVWXYZzwe should not get here!)r�locatestarttagend_tolerantrLrUrJ�AssertionError)rrYrr�r[�nexts rrv�$HTMLParser.check_for_whole_start_tagYs����,�,��&�,�,�W�8�������A��Q�q�S�>�D��s�{��1�u���s�{��%�%�d�A�.�.��q�5�L��%�%�c�1�-�-���5��H��q�5�L��r�z���5�6���u����1�u���6�7�7rc�*�URnX!US-S:XdS5e[RX!S-5nU(dgUR5n[RX!5nU(d�URbURX!U5 U$[RX!S-5nU(d!X!US-S:XaUS-$URU5$URS5R5nURSUR55nURU5 US-$URS5R5nURb$XpR:waURX!U5 U$URU5 UR5 U$) Nr?r;zunexpected call to parse_endtagr#r@rbz</>r)r� endendtagrFrU�
endtagfindrLrrHrwrfrSr,rC�
handle_endtagr5)rrYrrLrg� namematch�tagnamer0s rrN�HTMLParser.parse_endtag{si���,�,����1��~��%�H�'H�H�%�� � ��A�#�.����� � ���� � ��,������*�� � ��5�!1�2���(�.�.�w�!��<�I���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�~�#�#�%���?�?�&����&�� � ��5�!1�2������4� ������rc�H�URX5 URU5 gr4)r}r��rr�r�s rr|�HTMLParser.handle_startendtag�s�����S�(����3�rc��gr4�r�s rr}�HTMLParser.handle_starttag����rc��gr4r�)rr�s rr��HTMLParser.handle_endtag�r�rc��gr4r��rr^s rrT�HTMLParser.handle_charref�r�rc��gr4r�r�s rrW�HTMLParser.handle_entityref�r�rc��gr4r�rs rrH�HTMLParser.handle_data�r�rc��gr4r�rs rrj�HTMLParser.handle_comment�r�rc��gr4r�)r�decls rre�HTMLParser.handle_decl�r�rc��gr4r�rs rrp�HTMLParser.handle_pi�r�rc��gr4r�rs r�unknown_decl�HTMLParser.unknown_decl�r�r)�__starttag_textrr
rrr)r#)!�__name__�
__module__�__qualname__�__firstlineno__�__doc__r~r
rr r%r(r)r1r5rrQrfrPrMrvrNr|r}r�rTrWrHrjrerpr��__static_attributes__�
__classcell__)rs@rrr>s�����*1��+/�������O�$�N��u#�t/�* � �(�X8�D%�P �
�
�
�
�
�
�
�
�
�
r)r�r-�_markupbase�htmlr�__all__r.rrXrVrRrKro�commentcloserwrx�VERBOSEr�r�r��
ParserBaserr�rr�<module>r�s���"�
����.���Z�Z��'��
�Z�Z��
%�
��J�J�>�?� �
�*�*�@�
A���z�z�+�&��
�*�*�S�/���z�z�)�$���:�:�L�M���J�J�=�>�� �Z�Z�)��Z�Z���
�J�J�s�O� ��Z�Z�>�
?�
�J
��'�'�J
r
?>