Sindbad~EG File Manager

Current Path : /proc/2233733/root/usr/local/lib/python3.12/site-packages/bs4/__pycache__/
Upload File :
Current File : //proc/2233733/root/usr/local/lib/python3.12/site-packages/bs4/__pycache__/__init__.cpython-312.pyc

�

(ٜg�����dZdZdZdZdZdgZddlmZddlZddl	Z	ddl
Z
ddlZddlZe
jjd	kred
��ddlmZmZmZmZdd
lmZddlmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'Gd�de(�Z)Gd�de(�Z*Gd�de&�Z+e+Z,e+Z-Gd�de+�Z.Gd�de/�Z0Gd�de1�Z2e3dk(r-ddl
Z
e+e
jh�Z5e6e5jo��yy)aKBeautiful Soup Elixir and Tonic - "The Screen-Scraper's Friend".

http://www.crummy.com/software/BeautifulSoup/

Beautiful Soup uses a pluggable XML or HTML parser to parse a
(possibly invalid) document into a tree representation. Beautiful Soup
provides methods and Pythonic idioms that make it easy to navigate,
search, and modify the parse tree.

Beautiful Soup works with Python 3.6 and up. It works better if lxml
and/or html5lib is installed.

For more than you ever wanted to know about Beautiful Soup, see the
documentation: http://www.crummy.com/software/BeautifulSoup/bs4/doc/
z*Leonard Richardson (leonardr@segfault.org)z4.12.3z*Copyright (c) 2004-2024 Leonard Richardson�MIT�
BeautifulSoup�)�CounterN�z�You are trying to use a Python 3-specific version of Beautiful Soup under Python 2. This will not work. The final version of Beautiful Soup to support Python 2 was 4.9.3.�)�builder_registry�ParserRejectedMarkup�XMLParsedAsHTMLWarning�HTMLParserTreeBuilder)�
UnicodeDammit)�CData�Comment�CSS�DEFAULT_OUTPUT_ENCODING�Declaration�Doctype�NavigableString�PageElement�ProcessingInstruction�PYTHON_SPECIFIC_ENCODINGS�	ResultSet�Script�
Stylesheet�SoupStrainer�Tag�TemplateStringc��eZdZdZy)�GuessedAtParserWarningz�The warning issued when BeautifulSoup has to guess what parser to
    use -- probably because no parser was specified in the constructor.
    N��__name__�
__module__�__qualname__�__doc__���7/usr/local/lib/python3.12/site-packages/bs4/__init__.pyrr@s��r%rc��eZdZdZy)�MarkupResemblesLocatorWarningz�The warning issued when BeautifulSoup is given 'markup' that
    actually looks like a resource locator -- a URL or a path to a file
    on disk.
    Nrr$r%r&r(r(Es��r%r(c���eZdZdZdZddgZdZdZ			d"d�Zd	�Z	d
�Z
d�Zed��Z
ed
��Zed��Zd�Zd�Zddiddfd�Zd#d�Zd#d�Zd�Zd�Zd�Zd�Zd#d�Zd$d�Zd�Zd%d�Z		d&d�Zd#d�Zd�Zde d df�fd!�	Z!�xZ"S)'ra�A data structure representing a parsed HTML or XML document.

    Most of the methods you'll call on a BeautifulSoup object are inherited from
    PageElement or Tag.

    Internally, this class defines the basic interface called by the
    tree builders when converting an HTML/XML document into a data
    structure. The interface abstracts away the differences between
    parsers. To write a new tree builder, you'll need to understand
    these methods as a whole.

    These methods will be called by the BeautifulSoup constructor:
      * reset()
      * feed(markup)

    The tree builder may call these methods from its feed() implementation:
      * handle_starttag(name, attrs) # See note about return value
      * handle_endtag(name)
      * handle_data(data) # Appends to the current data node
      * endData(containerClass) # Ends the current data node

    No matter how complicated the underlying parser is, you should be
    able to build a tree using 'start tag' events, 'end tag' events,
    'data' events, and "done with data" events.

    If you encounter an empty-element tag (aka a self-closing tag,
    like HTML's <br> tag), call handle_starttag and then
    handle_endtag.
    z
[document]�html�fastz 
	
a�No parser was explicitly specified, so I'm using the best available %(markup_type)s parser for this system ("%(parser)s"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line %(line_number)s of the file %(filename)s. To get rid of this warning, pass the additional argument 'features="%(parser)s"' to the BeautifulSoup constructor.
Nc�t��d�vr�d=tjd�d�vr�d=tjd�d�vr�d=tjd�d�vr�d=tjd�d	�vr�d	=tjd
��fd�}	|xs	|	dd
�}|xs	|	dd�}|r't|t�rtjd�d}|xs
t	�|_|}
|}t|t�r|}d}nb|�`t|t�r|g}|�t|�dk(r|j}tj|�}|�tddj|�z��|��d(i���}|
�s
||jk(s�||jvs�|r�|jrd}
nd}
d}	t!j"d�}|r|j&}|j(}nt j*}d}|j-d�}|r&|j/�}|j1d�r|dd}|rZt	|||j|
��}tj|j2|zt4d��n�rtjd�||_|j|_|j|_t	�|_||_t?|d�r|jA�}nXt|�d krJt|tB�rd!|vst|t�r&d"|vr"|jE|�s|jG|�g}d#}|j6jI|||�$�D]Z\|_%|_&|_'|_(|jS�|j6jU|�	|jW�d%}n|s5|D�cgc]
}t|���}}tYd&d'j|�z��d|_%d|j6_.y#t$$rY��QwxYw#tX$r}|j[|�Yd}~��d}~wwxYwcc}w))a	Constructor.

        :param markup: A string or a file-like object representing
         markup to be parsed.

        :param features: Desirable features of the parser to be
         used. This may be the name of a specific parser ("lxml",
         "lxml-xml", "html.parser", or "html5lib") or it may be the
         type of markup to be used ("html", "html5", "xml"). It's
         recommended that you name a specific parser, so that
         Beautiful Soup gives you the same results across platforms
         and virtual environments.

        :param builder: A TreeBuilder subclass to instantiate (or
         instance to use) instead of looking one up based on
         `features`. You only need to use this if you've implemented a
         custom TreeBuilder.

        :param parse_only: A SoupStrainer. Only parts of the document
         matching the SoupStrainer will be considered. This is useful
         when parsing part of a document that would otherwise be too
         large to fit into memory.

        :param from_encoding: A string indicating the encoding of the
         document to be parsed. Pass this in if Beautiful Soup is
         guessing wrongly about the document's encoding.

        :param exclude_encodings: A list of strings indicating
         encodings known to be wrong. Pass this in if you don't know
         the document's encoding but you know Beautiful Soup's guess is
         wrong.

        :param element_classes: A dictionary mapping BeautifulSoup
         classes like Tag and NavigableString, to other classes you'd
         like to be instantiated instead as the parse tree is
         built. This is useful for subclassing Tag or NavigableString
         to modify default behavior.

        :param kwargs: For backwards compatibility purposes, the
         constructor accepts certain keyword arguments used in
         Beautiful Soup 3. None of these arguments do anything in
         Beautiful Soup 4; they will result in a warning and then be
         ignored.
         
         Apart from this, any keyword arguments passed into the
         BeautifulSoup constructor are propagated to the TreeBuilder
         constructor. This makes it possible to configure a
         TreeBuilder by passing in arguments, not just by saying which
         one to use.
        �convertEntitiesz�BS4 does not respect the convertEntities argument to the BeautifulSoup constructor. Entities are always converted to Unicode characters.�
markupMassagez�BS4 does not respect the markupMassage argument to the BeautifulSoup constructor. The tree builder is responsible for any necessary markup massage.�
smartQuotesToz�BS4 does not respect the smartQuotesTo argument to the BeautifulSoup constructor. Smart quotes are always converted to Unicode characters.�selfClosingTagsz�BS4 does not respect the selfClosingTags argument to the BeautifulSoup constructor. The tree builder is responsible for understanding self-closing tags.�isHTMLz�BS4 does not respect the isHTML argument to the BeautifulSoup constructor. Suggest you use features='lxml' for HTML and features='lxml-xml' for XML.c�v��|�vr4tjd|�d|�d�td���j|�Sy)NzThe "zA" argument to the BeautifulSoup constructor has been renamed to "z."r��
stacklevel)�warnings�warn�DeprecationWarning�pop)�old_name�new_name�kwargss  �r&�deprecated_argumentz3BeautifulSoup.__init__.<locals>.deprecated_argument�s;����6�!��
�
�3;�X�G�&�1��
�z�z�(�+�+�r%�parseOnlyThese�
parse_only�fromEncoding�
from_encodingzlYou provided Unicode markup but also provided a value for from_encoding. Your from_encoding will be ignored.NrzjCouldn't find a tree builder with the features you requested: %s. Do you need to install a parser library?�,�XML�HTMLr�__file__)z.pycz.pyo���)�filename�line_number�parser�markup_type�r3z�Keyword arguments to the BeautifulSoup constructor will be ignored. These would normally be passed into the TreeBuilder constructor, but a TreeBuilder instance was passed in as `builder`.�read��<�<F)�exclude_encodingsTz�The markup you provided was rejected by the parser. Trying a different parser or a different encoding may help.

Original exception(s) from parser:
 z
 r$)/r5r6�
isinstance�str�dict�element_classes�type�len�DEFAULT_BUILDER_FEATURESr�lookup�FeatureNotFound�join�NAME�ALTERNATE_NAMES�is_xml�sys�	_getframe�
ValueError�	f_globals�f_lineno�__dict__�get�lower�endswith�NO_PARSER_SPECIFIED_WARNINGr�builder�	known_xml�_namespacesr>�hasattrrK�bytes�_markup_is_url�_markup_resembles_filename�prepare_markup�markup�original_encoding�declared_html_encoding�contains_replacement_characters�reset�initialize_soup�_feedr	�append�soup)�selfro�featuresrgr>r@rOrSr;r<�original_builder�original_features�
builder_classrI�caller�globalsrGrF�fnl�values�
rejections�success�e�other_exceptionss        `               r&�__init__zBeautifulSoup.__init__zsz���j��&��(�)��M�M�)�
*�
�f�$���'��M�M�4�
5�
�f�$���'��M�M�)�
*�
��&��(�)��M�M�7�
8�
�v���x� ��M�M��
�	� �,�#6��l�$,�
�&�-�)<��O�*-�
��Z���4��M�M�I�
J� �M�.�8�$�&���
#��$���g�t�$�#�M��G�
�_��(�C�(�$�:����3�x�=�A�#5��8�8��,�3�3�X�>�M��$�%�N��h�h�x�(�)�*�*��?�#�-�f�-�G�#�%����5�%��)@�)@�@���>�>�"'�K�"(�K�
��� �]�]�1�-�F��$�.�.�G�"(�/�/�K�!�l�l�G�!"�K�"�;�;�z�2���"�.�.�*�C��|�|�$4�5�#+�C�R�=���"�!)�$/�&�|�|�$/�	�F��M�M��8�8�6�A�.�1��
��
�
�\�]�����n�n���������6���$����6�6�"��[�[�]�F�
��[�C�
��F�E�*�4�6�>��v�s�+�C�6�M��&�&�v�.��/�/��7��
����\�\�
(�
(���:K�)�M�
/�T�[�$�0�$�2M�	
�	-�
�J�J�L��L�L�(�(��.�
��
�
�����M��0:�;�
�1��A��
��;�&�k�ns�nx�nx�yI�nJ�J��
���� ������U"�����z(�
��!�!�!�$���
��
 <s0�$O>�P�4P5�>	P�
P�	P2�P-�-P2c�b�t|�dd|j�}|j|_|S)z�Create a new BeautifulSoup object with the same TreeBuilder,
        but not associated with any markup.

        This is the first step of the deepcopy process.
        �N)rTrgrp)rx�clones  r&�_clonezBeautifulSoup._cloneas1����T�
�2�t�T�\�\�2��#'�"8�"8����r%c���t|j�}d|vr3|d�.|jjst	|j�|d<g|d<|j�|d<d|vr|d=|S)Nrg�contentsro�_most_recent_element)rRrbrg�	picklablerT�decode)rx�ds  r&�__getstate__zBeautifulSoup.__getstate__nsn����������>�a�	�l�6�t�|�|�?U�?U�����-�A�i�L���*�
��k�k�m��(��
"�Q�&��(�)��r%c��||_t|jt�r|j�|_n|jst	�|_||j_|j
�|j�|S�N)rbrPrgrTrrwrsru)rx�states  r&�__setstate__zBeautifulSoup.__setstate__~sZ����
��d�l�l�D�)��<�<�>�D�L����1�2�D�L� ������
�
���
�
���r%c�R�t|t�r|jdd�}|S|}|S)z�Ensure `markup` is bytes so it's safe to send into warnings.warn.

        TODO: warnings.warn had this problem back in 2010 but it might not
        anymore.
        zutf-8�replace)rPrkr�)�clsro�decodeds   r&�_decode_markupzBeautifulSoup._decode_markup�s1���f�e�$��m�m�G�Y�7�G����G��r%c����t�t�rd}d}nt�t�rd}d}nyt�fd�|D��r!|�vrt	j
dtd�	�y
y)z�Error-handling method to raise a warning if incoming markup looks
        like a URL.

        :param markup: A string.
        :return: Whether or not the markup resembles a URL
            closely enough to justify a warning.
        � )shttp:shttps:� )zhttp:zhttps:Fc3�@�K�|]}�j|����y�wr�)�
startswith)�.0�prefixros  �r&�	<genexpr>z/BeautifulSoup._markup_is_url.<locals>.<genexpr>�s�����G��V�v� � ��(����z�The input looks more like a URL than markup. You may want to use an HTTP client like requests to get the document behind the URL, and feed that document to Beautiful Soup.rr3T)rPrkrQ�anyr5r6r()r�ro�space�cant_start_withs `  r&rlzBeautifulSoup._markup_is_url�sg����f�e�$��E�3�O�
���
$��E�1�O���G��G�G��F�?��
�
�J�2� ���r%c�X���d}gd�}t�t�r/|jd�}|D�cgc]}|jd���}}d}t�fd�|D��rd}n&�j	��t�fd�|D��rd}|rtjdtd	�
�yycc}w)aError-handling method to raise a warning if incoming markup
        resembles a filename.

        :param markup: A bytestring or string.
        :return: Whether or not the markup resembles a filename
            closely enough to justify a warning.
        z/\)z.htmlz.htmz.xmlz.xhtmlz.txt�utf8Fc3�&�K�|]}|�v���
y�wr�r$)r��xros  �r&r�z;BeautifulSoup._markup_resembles_filename.<locals>.<genexpr>�s�����4�O�q�q�F�{�O�s�Tc3�@�K�|]}�j|����y�wr�)re)r��extrds  �r&r�z;BeautifulSoup._markup_resembles_filename.<locals>.<genexpr>�s�����=�*�3�5�>�>�#�&�*�r�z}The input looks more like a filename than markup. You may want to open this file and pass the filehandle into Beautiful Soup.rr3)rPrk�encoder�rdr5r6r()r�ro�path_characters�
extensionsr��filelikerds `    @r&rmz(BeautifulSoup._markup_resembles_filename�s���� ��@�
��f�e�$�-�4�4�V�<�O�4>�?�J�q�!�(�(�6�*�J�J�?����4�O�4�4��H��L�L�N�E��=�*�=�=�����M�M�#�.�!�	
����!@s�B'c�R�|jj�|jj|j�|j	�|j
j|jk7r5|j�|j
j|jk7r�4yy)zInternal method that parses previously set markup, creating a large
        number of Tag and NavigableString objects.
        N)	rgrs�feedro�endData�
currentTag�name�
ROOT_TAG_NAME�popTag�rxs r&ruzBeautifulSoup._feed�sn��
	
�����������$�+�+�&������o�o�"�"�d�&8�&8�8��K�K�M��o�o�"�"�d�&8�&8�8r%c�2�tj|||j|j�d|_|jj�g|_d|_g|_t�|_
g|_g|_d|_
|j|�y)zWReset this object to a state as though it had never parsed any
        markup.
        rN)rr�rgr��hiddenrs�current_datar��tagStackr�open_tag_counter�preserve_whitespace_tag_stack�string_container_stackr��pushTagr�s r&rszBeautifulSoup.reset�s{��	���T�4����t�/A�/A�B������������������
� '�	���-/��*�&(��#�$(��!����T�r%c
��|j|�|jjtt�d|j||||||��S)aCreate a new Tag associated with this BeautifulSoup object.

        :param name: The name of the new Tag.
        :param namespace: The URI of the new Tag's XML namespace, if any.
        :param prefix: The prefix for the new Tag's XML namespace, if any.
        :param attrs: A dictionary of this Tag's attribute values; can
            be used instead of `kwattrs` for attributes like 'class'
            that are reserved words in Python.
        :param sourceline: The line number where this tag was
            (purportedly) found in its source document.
        :param sourcepos: The character position within `sourceline` where this
            tag was (purportedly) found.
        :param kwattrs: Keyword arguments for the new Tag's attribute values.

        N)�
sourceline�	sourcepos)�updaterSrcrrg)rxr��	namespace�nsprefix�attrsr�r��kwattrss        r&�new_tagzBeautifulSoup.new_tag�sH��"	���u��1�t�#�#�'�'��S�1��$�,�,��i��7�!�Y�
�	
r%c���|xst}|jj||�}|jrE|tur=|jj
j|jdj|�}|S)NrE)rrSrcr�rg�string_containersr�)rx�
base_class�	containers   r&�string_containerzBeautifulSoup.string_containerss���1�/�	��(�(�,�,��y�
�	��&�&�9��+G����6�6�:�:��+�+�B�/�4�4�i��I��r%c�4�|j|�}||�S)zXCreate a new NavigableString associated with this BeautifulSoup
        object.
        )r�)rx�s�subclassr�s    r&�
new_stringzBeautifulSoup.new_strings���)�)�(�3�	���|�r%c��td��)��This method is part of the PageElement API, but `BeautifulSoup` doesn't implement
        it because there is nothing before or after it in the parse tree.
        z4BeautifulSoup objects don't support insert_before().��NotImplementedError�rx�argss  r&�
insert_beforezBeautifulSoup.insert_before"s��"�"X�Y�Yr%c��td��)r�z3BeautifulSoup objects don't support insert_after().r�r�s  r&�insert_afterzBeautifulSoup.insert_after(s��"�"W�X�Xr%c���|jj�}|j|jvr!|j|jxxdzcc<|jr,||jdk(r|jj�|j
r,||j
dk(r|j
j�|jr|jd|_|jS)z9Internal method called by _popToTag when a tag is closed.rrE)r�r8r�r�r�r�r��rx�tags  r&r�zBeautifulSoup.popTag.s����m�m���!���8�8�t�,�,�,��!�!�#�(�(�+�q�0�+��-�-�#��9[�9[�\^�9_�2_��.�.�2�2�4��&�&�3�$�2M�2M�b�2Q�+Q��'�'�+�+�-��=�=�"�m�m�B�/�D�O����r%c�.�|j�%|jjj|�|jj|�|jd|_|j|j
k7r!|j|jxxdz
cc<|j|jjvr|jj|�|j|jjvr|jj|�yy)z?Internal method called by handle_starttag when a tag is opened.NrEr)r�r�rvr�r�r�r�rg�preserve_whitespace_tagsr�r�r�r�s  r&r�zBeautifulSoup.pushTag<s����?�?�&��O�O�$�$�+�+�C�0��
�
���S�!��-�-��+����8�8�t�)�)�)��!�!�#�(�(�+�q�0�+��8�8�t�|�|�<�<�<��.�.�5�5�c�:��8�8�t�|�|�5�5�5��'�'�.�.�s�3�6r%c���|jr�dj|j�}|js&d}|D]}||jvs�d}n|r	d|vrd}nd}g|_|jrJt|j�dkr2|jjr|jj|�sy|j|�}||�}|j|�yy)zXMethod called by the TreeBuilder when the end of a data segment
        occurs.
        r�TF�
r�rN)r�rYr��ASCII_SPACESr>rUr��text�searchr��object_was_parsed)rx�containerClassr��
strippable�i�os      r&r�zBeautifulSoup.endDataJs�������7�7�4�#4�#4�5�L��5�5�!�
�%�A��� 1� 1�1�%*�
��&���|�+�'+��'*��!#�D�����3�t�}�}�#5��#:����,�,����.�.�|�<��!�2�2�>�B�N��|�,�A��"�"�1�%�9r%c��|�|j}|�|}n|j}dx}x}}t|t�r2|j}|j
}|j}|�|j}|jdu}|j|||||�||_|jj|�|r|j|�yy)zLMethod called by the TreeBuilder to integrate an object into the parse tree.N)r�r�rPr�next_element�next_sibling�previous_sibling�previous_element�setupr�rv�_linkage_fixer)	rxr��parent�most_recent_elementr�r�r�r��fixs	         r&r�zBeautifulSoup.object_was_parsedls����>��_�_�F��*�2��#�8�8��9=�=��=�'�,��a����>�>�L��>�>�L� �1�1���'�#$�#5�#5� ��!�!��-��	����(�,�8H�,�W�$%��!������q�!������'�r%c���|jd}|jd}|}||ur:|j�.||_|j}|�||urd|_||_d|_d|_t
|t�r|jr|jd�}d|_d|_|}	|�y|j
�#|j
|_||j
_y|j}�?)z,Make sure linkage of this fragment is sound.rrENF)	r�r�r�r�r�r�rPr�_last_descendant)rx�el�first�child�
descendant�prev_el�targets       r&r�zBeautifulSoup._linkage_fixer�s������A������B����
��E�>�b�i�i�3�#�B�O��,�,�G��"�w�b�'8�'+��$�%'�E�"�%)�E�"�"����e�S�!�e�n�n��/�/��6�J�
#'�
��"&�
������~���$�$�0�*0�*=�*=�
�'�7<��#�#�4���]�]�F�r%c�^�||jk(ryd}t|j�}t|dz
dd�D]r}|jj|�s|S|j|}||jk(r$||jk(r|r|j�}|S|j�}�t|S)a�Pops the tag stack up to and including the most recent
        instance of the given tag.

        If there are no open tags with the given name, nothing will be
        popped.

        :param name: Pop up to the most recent tag with this name.
        :param nsprefix: The namespace prefix that goes with `name`.
        :param inclusivePop: It this is false, pops the tag stack up
          to but *not* including the most recent instqance of the
          given tag.

        NrrrE)	r�rUr��ranger�rcr�r�r�)rxr�r��inclusivePop�most_recently_popped�
stack_sizer��ts        r&�	_popToTagzBeautifulSoup._popToTag�s����4�%�%�%��#������'�
��z�A�~�q�"�-�A��(�(�,�,�T�2��$�#��
�
�a� �A������8�q�x�x�#7��+/�;�;�=�(��$�#�$(�;�;�=� �.�$�#r%c
���|j�|jrKt|j�dkr3|jjs|jj||�sy|jjtt�||j|||||j|j|||��}|�|S|j�||j_||_|j|�|S)aCalled by the tree builder when a new tag is encountered.

        :param name: Name of the tag.
        :param nsprefix: Namespace prefix for the tag.
        :param attrs: A dictionary of attribute values.
        :param sourceline: The line number where this tag was found in its
            source document.
        :param sourcepos: The character position within `sourceline` where this
            tag was found.
        :param namespaces: A dictionary of all namespace prefix mappings 
            currently in scope in the document.

        If this method returns None, the tag was rejected by an active
        SoupStrainer. You should proceed as if the tag had not occurred
        in the document. For instance, if this was a self-closing tag,
        don't call handle_endtag.
        rN)r�r��
namespaces)r�r>rUr�r��
search_tagrSrcrrgr�r�r�r�)	rxr�r�r�r�r�r�rr�s	         r&�handle_starttagzBeautifulSoup.handle_starttag�s���(	
�����O�O��D�M�M� 2�a� 7����%�%����2�2�4��?��0�d�"�"�&�&�s�C�0��$�,�,��i��5��O�O�T�6�6�!�Y�!�	
���;��J��$�$�0�58�D�%�%�2�$'��!����S���
r%c�H�|j�|j||�y)z�Called by the tree builder when an ending tag is encountered.

        :param name: Name of the tag.
        :param nsprefix: Namespace prefix for the tag.
        N)r�r)rxr�r�s   r&�
handle_endtagzBeautifulSoup.handle_endtag�s��	
�������t�X�&r%c�:�|jj|�y)zGCalled by the tree builder when a chunk of textual data is encountered.N)r�rv)rx�datas  r&�handle_datazBeautifulSoup.handle_datas����� � ��&r%F�minimalc���|jrd}|tvrd}|dk7rd|z}d|z}nd}|sd}nd}|tt|�||||�zS)aoReturns a string or Unicode representation of the parse tree
            as an HTML or XML document.

        :param pretty_print: If this is True, indentation will be used to
            make the document more readable.
        :param eventual_encoding: The encoding of the final document.
            If this is None, the document will be a Unicode string.
        r�Nz encoding="%s"z<?xml version="1.0"%s?>
r)r\r�superrr�)	rx�pretty_print�eventual_encoding�	formatter�iterator�
encoding_partr��indent_level�	__class__s	        �r&r�zBeautifulSoup.decode	sy����;�;��M� �$=�=�%)�!� �D�(� 0�3D� D�
�0�=�@�F��F���L��L���m�T�9��+�Y��B�B�	Br%)r�NNNNNNr�)NN)NT)NNN)#r r!r"r#r�rVr�rfr�r�r�r��classmethodr�rlrmrursr�r�r�r�r�r�r�r�r�r�rrrrrr��
__classcell__�rs@r&rrLs����B!�M�!'��/��*�L�#Y��9=�HL�!%�e!�N�� ��
��
�����:����<�� '+�T���4�
�.� �Z�Y��4� &�D(�8&#�P $�DLP�37�'�R'�'�#(�!8�"�T�B�Br%c�"��eZdZdZ�fd�Z�xZS)�BeautifulStoneSoupz&Deprecated interface to an XML parser.c�n��d|d<tjdtd��tt|�|i|��y)N�xmlryzxThe BeautifulStoneSoup class is deprecated. Instead of using it, pass features="xml" into the BeautifulSoup constructor.rJr3)r5r6r7rrr�)rxr�r;rs   �r&r�zBeautifulStoneSoup.__init__/s;���"��z���
�
�
J��1�	
�
	� �$�0�$�A�&�Ar%)r r!r"r#r�rrs@r&rr,s���0�B�Br%rc��eZdZdZy)�StopParsingzEException raised by a TreeBuilder if it's unable to continue parsing.Nrr$r%r&rr9s��O�r%rc��eZdZdZy)rXzmException raised by the BeautifulSoup constructor if no parser with the
    requested features is found.
    Nrr$r%r&rXrX=s���	r%rX�__main__)8r#�
__author__�__version__�
__copyright__�__license__�__all__�collectionsr�os�rer]�	tracebackr5�version_info�major�ImportErrorrgrr	r
r�dammitr�elementr
rrrrrrrrrrrrrrr�UserWarningrr(r�_s�_soupr�	Exceptionrr_rXr �stdinrw�print�prettifyr$r%r&�<module>r6s��� :�
���<�
����
���	�	�
��������A��
�C�D�D���"������(�[��
�K��ZB�C�ZB�z����
B��
B�	�)�	�	�j�	��z�������#�D�	�4�=�=�?��r%

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists