__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
�

��g���h�%SSKJr SrSSKrSSKrSSKJr SSKJrJ	r	J
r
 SSKJrJ
r
Jr SSKJr SSKJrJrJrJrJrJrJrJrJrJrJrJrJrJrJ r J!r!J"r" SS	K#J$r$J%r% \(a6SS
K&J'r' SSK(J)r) SSK*J+r+ SS
KJ,r,J-r- SSK.J/r/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r: \!\S\\S4r;S\<S'\\!Sr=S\<S'\>"SS9r?\R�"S5rAS\<S'STSjrBSrCS\<S'\R�"S5rDS\<S'\E"/SQ5rFS \<S!'"S"S#\G5rH"S$S%\G5rI"S&S'\I5rJ"S(S)\\G5rK"S*S+\\\45rL"S,S-\L5rM"S.S/\L5rN"S0S1\I5rO"S2S3\P5rQ"S4S\G\Q5rR"S5S6\R5rS"S7S8\S5rT"S9S:\S5rU"S;S<\U5rV"S=S>\S5rW"S?S@\S5rX"SASB\S5rY"SCSD\R5rZ"SESF\R5r["SGSH\R5r\"SISJ\R5r]"SKSL\R5r^"SMSN\Q5r_\ "SO\QSP9r`"SQSR\\`\\`5raSSSK*Jbrb g)U�)�annotations�MITN��CSS)�_deprecated�_deprecated_alias�_deprecated_function_alias)�	Formatter�
HTMLFormatter�XMLFormatter)�!AttributeResemblesVariableWarning)�Any�Callable�Dict�Generic�Iterable�Iterator�List�Mapping�Optional�Pattern�Set�
TYPE_CHECKING�Tuple�Type�TypeVar�Union�cast)�Self�	TypeAlias��
BeautifulSoup)�TreeBuilder��
ElementFilter)�_EntitySubstitutionFunction�_FormatterOrName)�_AtMostOneElement�_AttributeValue�_AttributeValues�	_Encoding�_InsertableElement�_OneElement�
_QueryResults�_RawOrProcessedAttributeValues�_StrainableElement�_StrainableAttribute�_StrainableAttributes�_StrainableString�NavigableStringr �_OneOrMoreStringTypes)r0r%�_FindMethodNamezYThe {name} attribute was deprecated in version 4.7.0. If you need it, make your own copy.)�
whitespace_rez\s+�Pattern[str]�_deprecated_whitespace_re�strc���U[;a@[Un[R"URUS9[SS9 [5SU3$[
S[<SU<35e)N��name���
stacklevel�_deprecated_zmodule z has no attribute )�_deprecated_names�warnings�warn�format�DeprecationWarning�globals�AttributeError�__name__)r=�messages  �-/usr/lib/python3/dist-packages/bs4/element.py�__getattr__rLTs_��� � �#�D�)���
�
�g�n�n�$�n�/�1C�PQ�R��y�<��v�.�/�/�
�7�8�,�.@���I�
J�J��utf-8�DEFAULT_OUTPUT_ENCODINGz\S+�nonwhitespace_re)�idna�mbcs�oem�palmos�punycode�raw_unicode_escape�	undefined�unicode_escapezraw-unicode-escapezunicode-escapez
string-escape�
string_escapezSet[_Encoding]�PYTHON_SPECIFIC_ENCODINGSc�X�\rSrSr%SrS\S'S\S'S\S'S
SSjjrS	rg)�NamespacedAttribute�z�A namespaced attribute (e.g. the 'xml:lang' in 'xml:lang="en"')
which remembers the namespace prefix ('xml') and the name ('lang')
that were used to create it.
�
Optional[str]�prefixr=�	namespaceNc���U(dSnU(d[RX5nO8U(d[RX5nOXS-U-5nXlX$lX4lU$)N�:)r:�__new__r_r=r`)�clsr_r=r`�objs     rKrc�NamespacedAttribute.__new__�s[����D���+�+�c�*�C���+�+�c�(�C��+�+�c�C�<�$�#6�7�C��
���!�
��
rM�)NN)r_r^r=r^r`r^�returnr)rI�
__module__�__qualname__�__firstlineno__�__doc__�__annotations__rc�__static_attributes__rgrMrKr\r\�sS���

��
����
#�#'�	�����!�	�

��rMr\c�.�\rSrSr%SrS\S'SSjrSrg)	�%AttributeValueWithCharsetSubstitution�a�An abstract class standing in for a character encoding specified
inside an HTML ``<meta>`` tag.

Subclasses exist for each place such a character encoding might be
found: either inside the ``charset`` attribute
(`CharsetMetaAttributeValue`) or inside the ``content`` attribute
(`ContentMetaAttributeValue`)

This allows Beautiful Soup to replace that part of the HTML file
with a different encoding when ouputting a tree as a string.
r:�original_valuec��[5e)zwDo whatever's necessary in this implementation-specific
portion an HTML document to substitute in a specific encoding.
��NotImplementedError��self�eventual_encodings  rK�substitute_encoding�9AttributeValueWithCharsetSubstitution.substitute_encoding�s
��"�#�#rMrgN)rxr:rhr:)rIrirjrkrlrmryrnrgrMrKrprp�s��
���$rMrpc�0�\rSrSrSrSSjrSS	SjjrSrg)
�CharsetMetaAttributeValue�abA generic stand-in for the value of a ``<meta>`` tag's ``charset``
attribute.

When Beautiful Soup parses the markup ``<meta charset="utf8">``, the
value of the ``charset`` attribute will become one of these objects.

If the document is later encoded to an encoding other than UTF-8, its
``<meta>`` tag will mention the new encoding instead of ``utf8``.
c�<�[RX5nXlU$�N)r:rcrr�rdrrres   rKrc�!CharsetMetaAttributeValue.__new__�s���k�k�#�.��+���
rMc��U[;agU$)z�When an HTML document is being encoded to a given encoding, the
value of a ``<meta>`` tag's ``charset`` becomes the name of
the encoding.
�)rZrvs  rKry�-CharsetMetaAttributeValue.substitute_encoding�s��
� 9�9�� � rMrgN�rrr:rhr�rN�rxr+rhr:)rIrirjrkrlrcryrnrgrMrKr|r|�s����!�!rMr|c��\rSrSrSrSrg)�AttributeValueList��aClass for the list used to hold the values of attributes which
have multiple values (such as HTML's 'class'). It's just a regular
list, but you can subclass it and pass it in to the TreeBuilder
constructor as attribute_value_list_class, to have your subclass
instantiated instead.
rgN�rIrirjrkrlrnrgrMrKr�r�����rMr�c��\rSrSrSrSrg)�
AttributeDict��z�Superclass for the dictionary used to hold a tag's
attributes. You can use this, but it's just a regular dict with no
special logic.
rgNr�rgrMrKr�r��s��rMr�c�0^�\rSrSrSrSU4SjjrSrU=r$)�XMLAttributeDict��zqA dictionary for holding a Tag's attributes, which processes
incoming values for consistency with the HTML spec.
c�>�UcSn[U[5(aO&[U[[45(a[	U5n[
TU]X5 g)z�Set an attribute value, possibly modifying it to comply with
the XML spec.

This just means converting common non-string values to
strings: XML attributes may have "any literal string as a
value."
Nr�)�
isinstance�bool�int�floatr:�super�__setitem__�rw�key�value�	__class__s   �rKr��XMLAttributeDict.__setitem__�sJ����=��E��e�T�"�"�

�
���U�|�
,�
,���J�E�
���C�'rMrg�r�r:r�rrh�None�rIrirjrkrlr�rn�
__classcell__�r�s@rKr�r��s����(�(rMr�c�0^�\rSrSrSrSU4SjjrSrU=r$)�HTMLAttributeDicti	arA dictionary for holding a Tag's attributes, which processes
incoming values for consistency with the HTML spec, which says
'Attribute values are a mixture of text and character
references...'

Basically, this means converting common non-string values into
strings, like XMLAttributeDict, though HTML also has some rules
around boolean attributes that XML doesn't have.
c�>�US;aX;aX	g[U[5(a%[U[5(a
URnO)UnO&[U[[
45(a[
U5n[TU]!X5 g)zLSet an attribute value, possibly modifying it to comply
with the HTML spec,
)FNN)	r�r�r\r=r�r�r:r�r�r�s   �rKr��HTMLAttributeDict.__setitem__sp����M�!��{��I���e�T�"�"��#�2�3�3�������
���U�|�
,�
,���J�E�
���C�'rMrgr�r�r�s@rKr�r�	s����(�(rMr�c�v�\rSrSr%Sr\R"S\R5rS\	S'S
Sjr
SSSjjrSrg	)
�ContentMetaAttributeValuei4a�A generic stand-in for the value of a ``<meta>`` tag's ``content``
attribute.

When Beautiful Soup parses the markup:
 ``<meta http-equiv="content-type" content="text/html; charset=utf8">``

The value of the ``content`` attribute will become one of these objects.

If the document is later encoded to an encoding other than UTF-8, its
``<meta>`` tag will mention the new encoding instead of ``utf8``.
z((^|;)\s*charset=)([^;]*)r8�
CHARSET_REc�r�URRU5 [RX5nXlU$r)r��searchr:rcrrr�s   rKrc�!ContentMetaAttributeValue.__new__Fs-�������n�-��k�k�#�.��+���
rMc�^�T[;a&URRSUR5$SU4SjjnURRX R5$)z�When an HTML document is being encoded to a given encoding, the
value of the ``charset=`` in a ``<meta>`` tag's ``content`` becomes
the name of the encoding.
r�c�,>�URS5T-$)N�)�group)�matchrxs �rK�rewrite�>ContentMetaAttributeValue.substitute_encoding.<locals>.rewriteTs����;�;�q�>�$5�5�5rM)r�z
re.Match[str]rhr:)rZr��subrr)rwrxr�s ` rKry�-ContentMetaAttributeValue.substitute_encodingLsM���
� 9�9��?�?�&�&�r�4�+>�+>�?�?�	6����"�"�7�,?�,?�@�@rMrgNr�r�r�)
rIrirjrkrl�re�compile�Mr�rmrcryrnrgrMrKr�r�4s4��
� "�z�z�*F����M�J��M��A�ArMr�c���\rSrSr%SrSrS\S'S\S'S\S	'S
\S'S
\S'S
\S
'S
\S'SrS\S'SjSkSjjrSlSjr	SmSjr
\SnSj5r\
"SS
S5r\
"SSS5rSoSpSjjrSqSjr\"5rS\S'S\4SrSjjr\SsSj5rSS\4StSjjr\r\"\5rSuS jr\"S!S"S5rSvS#jrSwSxS$jjrSyS%jrSzS{S&jjr\
"S'S(S5r S|S)jr!S|S*jr"S0S4S}S+jjr#\"S,S-S5r$S0SSS.4S~S/jjr%\"S0S1S5r&S0S4S}S2jjr'\"S3S4S5r(S0SSS.4S~S5jjr)\"S6S7S5r*\"S8S7S95r+S0S4S}S:jjr,\"S;S<S95r-S0SSS.4S~S=jjr.\"S>S?S5r/\"S@S?S95r0S0S4S}SAjjr1\"SBSCS5r2S0SSS.4S~SDjjr3\"SESFS5r4\"SGSFS95r5S04SSHjjr6\"SISJS5r7S0SS.4S�SKjjr8\"SLSMS5r9\"SNSMS95r:\S�SOj5r;\S�SPj5r<S�SQjr=S�S�SRjjr>\S�SSj5r?\S�STj5r@\S�SUj5rA\S�SVj5rB\S�SWj5rC\S�SXj5rD\S�SYj5rE\S�SZj5rF\S�S[j5rG\S�S\j5rHS�S]jrI\SnS^j5rJ\K"S_S5S�S`j5rL\K"SaS5S�Sbj5rM\K"ScS5S�Sdj5rN\K"SeS5S�Sfj5rO\K"SgS5S�Shj5rPSirQg)��PageElementiZabAn abstract class representing a single element in the parse tree.

`NavigableString`, `Tag`, etc. are all subclasses of
`PageElement`. For this reason you'll see a lot of methods that
return `PageElement`, but you'll never see an actual `PageElement`
object. For the most part you can think of `PageElement` as
meaning "a `Tag` or a `NavigableString`."
N�Optional[bool]�	known_xmlr��_decomposed�
Optional[Tag]�parentr(�next_element�previous_element�next_sibling�previous_siblingF�hiddenc��XlX lURbXRlX0lURbXRlXPlURbXRlUcAURb4URR
(aURR
SnX@lURbXRlgg)a�Sets up the initial relations between this element and
other elements.

:param parent: The parent of this element.

:param previous_element: The element parsed immediately before
    this one.

:param next_element: The element parsed immediately before
    this one.

:param previous_sibling: The most recently encountered element
    on the same level of the parse tree as this one.

:param previous_sibling: The next element to be encountered
    on the same level of the parse tree as this one.
N���)r�r�r�r�r��contents)rwr�r�r�r�r�s      rK�setup�PageElement.setupxs���2�� 0��� � �,�15�!�!�.�(�����(�15���.�(�����(�15���.�
�$����'����$�$�#�{�{�3�3�B�7�� 0��� � �,�15�!�!�.�-rMc�~�UcU$[U[5(dURU5nURU5nU$)z�Format the given string using the given formatter.

:param s: A string.
:param formatter: A Formatter object, or a string naming one of the standard formatters.
)r�r
�formatter_for_name�
substitute)rw�s�	formatter�outputs    rK�
format_string�PageElement.format_string�sA�����H��)�Y�/�/��/�/�	�:�I��%�%�a�(���
rMc���[U[5(aU$UR(a[n[RnO[
n[
Rn[
U5(aU"US9$X1$)a�Look up or create a Formatter for the given identifier,
if necessary.

:param formatter: Can be a `Formatter` object (used as-is), a
    function (used as the entity substitution hook for an
    `bs4.formatter.XMLFormatter` or
    `bs4.formatter.HTMLFormatter`), or a string (used to look
    up an `bs4.formatter.XMLFormatter` or
    `bs4.formatter.HTMLFormatter` in the appropriate registry.

)�entity_substitution)r�r
�_is_xmlr�REGISTRYr�callable)rw�formatter_name�c�registrys    rKr��PageElement.formatter_for_name�s_���n�i�0�0�!�!��<�<��A�#�,�,�H��A�$�-�-�H��N�#�#���8�8��'�'rMc��URbUR$URc
[USS5$URR$)z�Is this element part of an XML tree or an HTML tree?

This is used in formatter_for_name, when deciding whether an
XMLFormatter or HTMLFormatter is more appropriate. It can be
inefficient, but it should be called very rarely.
�is_xmlF)r�r��getattrr��rws rKr��PageElement._is_xml�sG���>�>�%��>�>�!�
�;�;���4��5�1�1��{�{�"�"�"rM�nextSibling�4.0.0�previousSiblingc��[5errt�rw�memo�	recursives   rK�__deepcopy__�PageElement.__deepcopy__�s��!�#�#rMc�$�UR05$)zxA copy of a PageElement can only be a deep copy, because
only one PageElement can occupy a given place in a parse tree.
)r�r�s rK�__copy__�PageElement.__copy__�s��� � ��$�$rM�Iterable[type[NavigableString]]�defaultc��[5e)z�Yield all strings of certain classes, possibly stripping them.

This is implemented differently in `Tag` and `NavigableString`.
rt)rw�strip�typess   rK�_all_strings�PageElement._all_strings�s
��"�#�#rMc#�D# �URS5HnUv� M	 g7f)z�Yield all interesting strings in this PageElement, stripping them
first.

See `Tag` for information on which strings are considered
interesting in a given context.
TN�r�)rw�strings  rK�stripped_strings�PageElement.stripped_stringss!����'�'��-�F��L�.�s� r�c�h�URURX#S9Vs/sHoDPM sn5$s snf)a8Get all child strings of this PageElement, concatenated using the
given separator.

:param separator: Strings will be concatenated using this separator.

:param strip: If True, strings will be stripped before being
    concatenated.

:param types: A tuple of NavigableString subclasses. Any
    strings of a subclass not found in this list will be
    ignored. Although there are exceptions, the default
    behavior in most cases is to consider only NavigableString
    and CData objects. That means no comments, processing
    instructions, etc.

:return: A string.
)r�)�joinr�)rw�	separatorr�r�r�s     rK�get_text�PageElement.get_texts5��.�~�~�$�*;�*;�E�*;�*O�P�*O�Q�q�*O�P�Q�Q��Ps�/c�f^�TRc[S5e[U5S:Xa
USTLaT$[U4SjU55(a[S5eTRnTRR	T5nTRUS9 [
XS9HupEURXE5 M T$)z�Replace this `PageElement` with one or more other `PageElement`,
objects, keeping the rest of the tree the same.

:return: This `PageElement`, no longer part of the tree.
z^Cannot replace one element with another when the element to be replaced is not part of a tree.r�rc3�>># �UHoTRLv� M g7fr�r���.0�xrws  �rK�	<genexpr>�+PageElement.replace_with.<locals>.<genexpr>6s����.��A�D�K�K���s�z%Cannot replace a Tag with its parent.��_self_index)�start)r��
ValueError�len�any�index�extract�	enumerate�insert)rw�args�
old_parent�my_index�idx�replace_withs`     rKr�PageElement.replace_with(s�����;�;���@��
��t�9��>�d�1�g��o��K��.��.�.�.��D�E�E��[�[�
��;�;�$�$�T�*�������*�!*�4�!@��C����c�0�"A��rM�replaceWithrc�J�URU5nURU5 U$)z�Wrap this `PageElement` inside a `Tag`.

:return: ``wrap_inside``, occupying the position in the tree that used
   to be occupied by this object, and with this object now inside it.
)r�append)rw�wrap_inside�mes   rK�wrap�PageElement.wrapAs(���
�
�{�
+�����2���rMc���URb5UcURRU5nURRU	UR5n[	[
U5nURnURbURULaX0RlUbX0RLaURUlSUlSUlSUlURb4URURLaURURl	URb4URURLaURURlS=UlUl	U$)z�Destructively rips this element out of the tree.

:param _self_index: The location of this element in its parent's
   .contents, if known. Passing this in allows for a performance
   optimization.

:return: this `PageElement`, no longer part of the tree.
N)
r�rr��_last_descendantrr�r�r�r�r�)rwr�
last_childr�s    rKr
�PageElement.extractKs<���;�;�"��"�"�k�k�/�/��5�����$�$�[�1�
�*�*�,�
��+�z�2�
�!�.�.��� � �,��$�$�L�8�5A�%�%�2��#��<Q�<Q�(Q�,0�,A�,A�L�)� $���"&�
������!�!�-��%�%�T�->�->�>�15�1B�1B�D�!�!�.����)��!�!��)>�)>�>�15�1F�1F�D���.�48�8���� 1��rMc���UR5 UnSnUbQURnURR5 [	U[
5(a/UlSUlUnUbMPgg)amRecursively destroys this `PageElement` and its children.

The element will be removed from the tree and wiped out; so
will everything beneath it.

The behavior of a decomposed `PageElement` is undefined and you
should never use one for anything, but if you need to *check*
whether an element has been decomposed, you can use the
`PageElement.decomposed` property.
NT)r
r��__dict__�clearr��Tagr�r�)rw�e�next_ups   rK�	decompose�PageElement.decompose{s\��	
����#��%)���m��n�n�G�
�J�J�����!�S�!�!���
� �A�M��A�
�mrMc�4�U(a$URbURRnO_Un[U[5(aHUR(a7URSn[U[5(aUR(aM7U(dX0LaSnU$)aFinds the last element beneath this object to be parsed.

Special note to help you figure things out if your type
checking is tripped up by the fact that this method returns
_AtMostOneElement instead of PageElement: the only time
this method returns None is if `accept_self` is False and the
`PageElement` has no children--either it's a NavigableString
or an empty Tag.

:param is_initialized: Has `PageElement.setup` been called on
    this `PageElement` yet?

:param accept_self: Is ``self`` an acceptable answer to the
    question?
Nr�)r�r�r�r$r�)rw�is_initialized�accept_selfrs    rKr�PageElement._last_descendant�sz��$�d�/�/�;��*�*�;�;�J��J��Z��-�-�*�2E�2E�'�0�0��4�
��Z��-�-�*�2E�2E�2E��z�1��J��rM�_lastRecursiveChildrc�H^�TRnUc[S5e[U4SjU55(a[S5e/nUHYn[U[5(aUR5 UR
T5nURURXT55 M[ U$)a&Makes the given element(s) the immediate predecessor of this one.

All the elements will have the same `PageElement.parent` as
this one, and the given elements will occur immediately before
this one.

:param args: One or more PageElements.

:return The list of PageElements that were inserted.
z2Element has no parent, so 'before' has no meaning.c3�*># �UHoTLv� M
 g7frrgrs  �rKr�,PageElement.insert_before.<locals>.<genexpr>������'�$�Q�D�y�$���z&Can't insert an element before itself.�	r�r	rr�r�r
r�extendr)rwrr��results�predecessorrs`     rK�
insert_before�PageElement.insert_before�s���������>��Q�R�R��'�$�'�'�'��E�F�F�%'���K��+�{�3�3��#�#�%��L�L��&�E��N�N�6�=�=��<�=�
 ��rMc�d^�TRnUc[S5e[U4SjU55(a[S5eSn/nUHen[U[5(aUR5 UR
T5nURURUS-U-U55 US-
nMg U$)aMakes the given element(s) the immediate successor of this one.

The elements will have the same `PageElement.parent` as this
one, and the given elements will occur immediately after this
one.

:param args: One or more PageElements.

:return The list of PageElements that were inserted.
z1Element has no parent, so 'after' has no meaning.c3�*># �UHoTLv� M
 g7frrgrs  �rKr�+PageElement.insert_after.<locals>.<genexpr>�r1r2z%Can't insert an element after itself.rr�r3)rwrr��offsetr5�	successorrs`      rK�insert_after�PageElement.insert_after�s���������>��P�Q�Q��'�$�'�'�'��D�E�E���%'���I��)�[�1�1��!�!�#��L�L��&�E��N�N�6�=�=����V�);�Y�G�H��a�K�F���rMc�@�UR"URXU40UD6$)a�Find the first PageElement that matches the given criteria and
appears later in the document than this PageElement.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:kwargs: Additional filters on attribute values.
)�	_find_one�
find_all_next�rwr=�attrsr��kwargss     rK�	find_next�PageElement.find_next�s"��$�~�~�d�0�0�$�v�P��P�PrM�findNextrFr>c�N�UR"UUUUUR4SUS-0UD6$)a-Find all `PageElement` objects that match the given criteria and
appear later in the document than this `PageElement`.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:param _stacklevel: Used internally to improve warning messages.
:kwargs: Additional filters on attribute values.
�_stacklevelr�)�	_find_all�
next_elements�rwr=rDr��limitrJrEs       rKrB�PageElement.find_all_next�B��,�~�~��������
�$�a��

��
�	
rM�findAllNextrBc�@�UR"URXU40UD6$)a�Find the closest sibling to this PageElement that matches the
given criteria and appears later in the document.

All find_* methods take a common set of arguments. See the
online documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param string: A filter for a `NavigableString` with specific text.
:kwargs: Additional filters on attribute values.
)rA�find_next_siblingsrCs     rK�find_next_sibling�PageElement.find_next_sibling#s"��$�~�~�d�5�5�t�F�U�f�U�UrM�findNextSiblingrTc�N�UR"UUUUUR4SUS-0UD6$)a Find all siblings of this `PageElement` that match the given criteria
and appear later in the document.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param string: A filter for a `NavigableString` with specific text.
:param limit: Stop looking after finding this many results.
:param _stacklevel: Used internally to improve warning messages.
:kwargs: Additional filters on attribute values.
rJr�)rK�
next_siblingsrMs       rKrS�PageElement.find_next_siblings;rPrM�findNextSiblingsrS�fetchNextSiblings�3.0.0c�@�UR"URXU40UD6$)a�Look backwards in the document from this `PageElement` and find the
first `PageElement` that matches the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param string: A filter for a `NavigableString` with specific text.
:kwargs: Additional filters on attribute values.
)rA�find_all_previousrCs     rK�
find_previous�PageElement.find_previousbs"��$�~�~�d�4�4�d�6�T�V�T�TrM�findPreviousr_c�N�UR"UUUUUR4SUS-0UD6$)a)Look backwards in the document from this `PageElement` and find all
`PageElement` that match the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param string: A filter for a `NavigableString` with specific text.
:param limit: Stop looking after finding this many results.
:param _stacklevel: Used internally to improve warning messages.
:kwargs: Additional filters on attribute values.
rJr�)rK�previous_elementsrMs       rKr^�PageElement.find_all_previousx�B��,�~�~������"�"�
�$�a��

��
�	
rM�findAllPreviousr^�fetchAllPreviousc�@�UR"URXU40UD6$)a�Returns the closest sibling to this `PageElement` that matches the
given criteria and appears earlier in the document.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param string: A filter for a `NavigableString` with specific text.
:kwargs: Additional filters on attribute values.
)rA�find_previous_siblingsrCs     rK�find_previous_sibling�!PageElement.find_previous_sibling�s*��$�~�~��'�'��f�
�@F�
�	
rM�findPreviousSiblingrjc�N�UR"UUUUUR4SUS-0UD6$)a!Returns all siblings to this PageElement that match the
given criteria and appear earlier in the document.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param string: A filter for a NavigableString with specific text.
:param limit: Stop looking after finding this many results.
:param _stacklevel: Used internally to improve warning messages.
:kwargs: Additional filters on attribute values.
rJr�)rK�previous_siblingsrMs       rKri�"PageElement.find_previous_siblings�rerM�findPreviousSiblingsri�fetchPreviousSiblingsc�N�SnUR"XS4SS0UD6nU(aUSnU$)a�Find the closest parent of this PageElement that matches the given
criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param self: Whether the PageElement itself should be considered
   as one of its 'parents'.
:kwargs: Additional filters on attribute values.
Nr�rJ�r)�find_parents)rwr=rDrE�rr5s      rK�find_parent�PageElement.find_parent�sA��(
���#�#���
�()�
�-3�
�����
�A��rM�
findParentrvc�N�URnUR"XSX64SUS-0UD6$)a�Find all parents of this `PageElement` that match the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param limit: Stop looking after finding this many results.
:param _stacklevel: Used internally to improve warning messages.
:kwargs: Additional filters on attribute values.
NrJr�)�parentsrK)rwr=rDrNrJrE�iterators       rKrt�PageElement.find_parents�s9��&�<�<���~�~���u�
�<G�!�O�
�OU�
�	
rM�findParentsrt�fetchParentsc��UR$)z?The `PageElement`, if any, that was parsed just after this one.�r�r�s rK�next�PageElement.nexts��� � � rMc��UR$)z@The `PageElement`, if any, that was parsed just before this one.�r�r�s rK�previous�PageElement.previous����$�$�$rMc�<�SnU"X#US4SS0UD6nU(aUSnU$)Nr�rJ�rrg)rw�methodr=rDr�rErur5s        rKrA�PageElement._find_one%s3�� $��!'��V�Q�!X�A�!X�QW�!X�����
�A��rMc�"�Uc1SU;a+URS5n[R"S[US9 SU;a3[R"[R
[
SSS9-[US9 SS	KJn [X5(aUn	O
[XU40UD6n	Uc�U(d�U(d�U(d�US
LdUcSU5n
[X�5$[U[5(a�URS5S
:XaURSS
5up�OSnUn/n
UHbn
[U
[5(dMU
R U:Xd'U
R U:XdM<UbU
R"U:XdMQU
R%U
5 Md [X�5$U	R'XT5$)z8Iterates over a generator looking for things that match.N�textzOThe 'text' argument to find()-type methods is deprecated. Use 'string' instead.r?�_class�class_)�original�autocorrectrr$Tc3�T# �UHn[U[5(dMUv� M  g7fr)r�r$)r�elements  rKr�(PageElement._find_all.<locals>.<genexpr>as���W��g�j��RU�>V�'�'��s�(�	(rbr�)�poprCrDrFr
�MESSAGE�dict�
bs4.filterr%r��SoupStrainer�	ResultSetr:�count�splitr$r=r_r�find_all)rwr=rDr�rN�	generatorrJrEr%�matcher�resultr_�
local_namer�s              rKrK�PageElement._find_all7so���>�f��.��Z�Z��'�F��M�M�a�"�&�
��v���M�M�1�9�9��%� (���
2�&�
�	-��d�*�*��G�"�4��A�&�A�G��>�%��f��t�|�t�|�W��W�� ��1�1��D�#�&�&��:�:�c�?�a�'�*.���C��);�&�F�J�!�F�!%�J���(�G�%�g�s�3�3� ��|�|�t�+����
�2�#�^�w�~�~��/G��
�
�g�.� )�!��1�1����	�1�1rMc#�Z# �URnUbURnUv� UnUbMgg7f)z1All PageElements that were parsed after this one.Nr��rw�ir=s   rKrL�PageElement.next_elements{s1���
�����m����I��G��A��m���%+�+c�8�URUR5$)zBThis PageElement, then all PageElements that were parsed after it.)�	_self_andrLr�s rK�self_and_next_elements�"PageElement.self_and_next_elements�����~�~�d�0�0�1�1rMc#�Z# �URnUbURnUv� UnUbMgg7f)zFAll PageElements that are siblings of this one but were parsed
later.
N)r�r�s   rKrX�PageElement.next_siblings�s1���

�����m����I��G��A��m�r�c�8�URUR5$)z+This PageElement, then all of its siblings.)r�rXr�s rK�self_and_next_siblings�"PageElement.self_and_next_siblings�r�rMc#�Z# �URnUbURnUv� UnUbMgg7f)zXAll PageElements that were parsed before this one.

:yield: A sequence of PageElements.
Nr�r�s   rKrc�PageElement.previous_elements�s3���
�!�!���m��*�*�I��G��A��m�r�c�8�URUR5$)z=This PageElement, then all elements that were parsed
earlier.)r�rcr�s rK�self_and_previous_elements�&PageElement.self_and_previous_elements�����~�~�d�4�4�5�5rMc#�Z# �URnUbURnUv� UnUbMgg7f)zmAll PageElements that are siblings of this one but were parsed
earlier.

:yield: A sequence of PageElements.
N)r�r�s   rKrn�PageElement.previous_siblings�s3���
�!�!���m��*�*�I��G��A��m�r�c�8�URUR5$)zDThis PageElement, then all of its siblings that were parsed
earlier.)r�rnr�s rK�self_and_previous_siblings�&PageElement.self_and_previous_siblings�r�rMc#�Z# �URnUbURnUv� UnUbMgg7f)ztAll elements that are parents of this PageElement.

:yield: A sequence of Tags, ending with a BeautifulSoup object.
Nrr�s   rKrz�PageElement.parents�s/���
�K�K���m����I��G��A��m�r�c�8�URUR5$)zpThis element, then all of its parents.

:yield: A sequence of PageElements, ending with a BeautifulSoup object.
)r�rzr�s rK�self_and_parents�PageElement.self_and_parents�s���~�~�d�l�l�+�+rMc#�P# �UR(dUv� UHnUv� M	 g7f)z]Modify a generator by yielding this element, then everything
yielded by the other generator.
N)r�)rw�other_generatorr�s   rKr��PageElement._self_and�s"����{�{��J� �A��G�!�s�$&c�.�[USS5=(d S$)z0Check whether a PageElement has been decomposed.r�F)r�r�s rK�
decomposed�PageElement.decomposed�s���t�]�E�2�;�e�;rMrLc��UR$�z:meta private:)rLr�s rK�
nextGenerator�PageElement.nextGenerator�����!�!�!rMrXc��UR$r�)rXr�s rK�nextSiblingGenerator� PageElement.nextSiblingGenerator�r�rMrcc��UR$r�)rcr�s rK�previousGenerator�PageElement.previousGenerator�����%�%�%rMrnc��UR$r�)rnr�s rK�previousSiblingGenerator�$PageElement.previousSiblingGenerator�r�rMrzc��UR$r�)rzr�s rK�parentGenerator�PageElement.parentGenerator�s���|�|�rM)r�r�r�r�r�)NNNNN)r�r�r�r(r�r(r�r(r�r(rhr�)r�r:r��Optional[_FormatterOrName]rhr:)r�z4Union[_FormatterOrName, _EntitySubstitutionFunction]rhr
�rhr��F�r�zDict[Any, Any]r�r�rhr�rhr)r�r�r�r�rh�
Iterator[str]�rhr�)r�r:r�r�r�zIterable[Type[NavigableString]]rhr:)rr�rhr)rr$rhr$r)r�
Optional[int]rhr�rhr�)TT)r*r�r+r�rhr()rr,rh�List[PageElement])
r=r6rDr2r��Optional[_StrainableString]rEr1rhr()r=r6rDr2r�r�rNr�rJr�rEr1rhr.)r=r6rDr2rEr1rhr()r=r6rDr2rNr�rJr�rEr1rhr.)rhr()r�rr=r6rDr2r�r�rEr1rhr()rs)r=r6rDr2r�r�rNr�r��Iterator[PageElement]rJr�rEr1rhr.�rhr�)rhz
Iterator[Tag])r�r�rhr�)RrIrirjrkrlr�rmr�r�r�r��propertyr�rr�r�r�r��tupler�r�r�r��getTextr�rr	rrr
r'rr-r7r>rFrHrBrQrTrVrSrZr[r_rar^rfrgrjrlrirprqrvrxrtr}r~r�r�rArKrLr�rXr�rcr�rnr�rzr�r�r�rr�r�r�r�r�rnrgrMrKr�r�Zs���!%�I�~�$�����#�#�'�'�#�#�'�'��F�D��!%�.2�*.�.2�*.�
06��06�,�06�(�	06�
,�06�(�
06�
�06�d�(�R�(�	�(�8�#��#�,$�M�>�7�K�K�'�(9�;M�w�W�O�$�%�05�w�G�
,�6�"�G�$��$�*I�$�	�$�������18�	R��R��R�/�	R�


�R�2�G��H��D��.-�]�N�G�T�K��.�`�.@D��"��8<��	��8,��1�7����6�B!%�')�.2�	Q��Q�%�Q�,�	Q�
'�Q�
�
Q�(*�*�k�7�K�H�!%�')�.2�#��

��
�%�
�,�	
�
�
��

�'�
�
�
�@-�]�O�W�U�K�!%�')�.2�	V��V�%�V�,�	V�
'�V�
�
V�(1��.���O�!%�')�.2�#��

��
�%�
�,�	
�
�
��

�'�
�
�
�@2��0�'���3��1�7���!%�')�.2�	U��U�%�U�,�	U�
'�U�
�
U�(.�n�o�w�W�L�!%�')�.2�#��

��
�%�
�,�	
�
�
��

�'�
�
�
�@1��.���O�2��/����!%�')�.2�	
��
�%�
�,�	
�
'�
�
�

�,5��6����!%�')�.2�#��

��
�%�
�,�	
�
�
��

�'�
�
�
�@6�� 8�'���7��!9�7���!%�')����%��'�	�

��8,�L�-��Q�J�!%�')�#��
��
�%�
��	
�
�
�'�

�
�
�0-�]�N�G�T�K�-�n�n�g�V�L�
�!��!��%��%���
���%��,��'��
��2�@2��@2�%�@2�,�	@2�
�@2�)�
@2��@2�'�@2�
�@2�H�����2��2������2��2��	��	��6��6�
�
��
��6��6�
�	��	��,��,���<��<���'�*�"�+�"���'�*�"�+�"��$�g�.�&�/�&��$�g�.�&�/�&���G�$��%�rMr�c��\rSrSr%SrSrS\S'SrS\S'SSjrSSS	jjr	SS
jr
\SSj5rSSSjjr
\SS
j5r\RSSj5rS\R"4SSjjr\SSj5rSrg)r4i�z�A Python string that is part of a parse tree.

When Beautiful Soup parses the markup ``<b>penguin</b>``, it will
create a `NavigableString` for the string "penguin".
r�r:�PREFIX�SUFFIXc��[U[5(a[RX5nO[RX[5nSUlUR5 U$)aCreate a new NavigableString.

When unpickling a NavigableString, this method is called with
the string in DEFAULT_OUTPUT_ENCODING. That encoding needs to be
passed in to the superclass's __new__ or the superclass won't know
how to handle non-ASCII characters.
F)r�r:rcrOr�r�)rdr��us   rKrc�NavigableString.__new__sE���e�S�!�!����C�'�A����C�(?�@�A����	���	��rMFc�$�[U5"U5$)aA copy of a NavigableString has the same contents and class
as the original, but it is not connected to the parse tree.

:param recursive: This parameter is ignored; it's only defined
   so that NavigableString.__deepcopy__ implements the same
   signature as Tag.__deepcopy__.
)�typer�s   rKr��NavigableString.__deepcopy__s���D�z�$��rMc��[U54$r)r:r�s rK�__getnewargs__�NavigableString.__getnewargs__%s���D�	�|�rMc��U$)z�Convenience property defined to match `Tag.string`.

:return: This property always returns the `NavigableString` it was
   called on.

:meta private:
rgr�s rKr��NavigableString.string(s	���rMc�\�URX5nURU-UR-$)z�Run the string through the provided formatter, making it
ready for output as part of an HTML or XML document.

:param formatter: A `Formatter` object, or a string naming one
    of the standard formatters.
�r�r�r�)rwr�r�s   rK�output_ready�NavigableString.output_ready3s,���#�#�D�4���{�{�V�#�d�k�k�1�1rMc��g)z�Since a NavigableString is not a Tag, it has no .name.

This property is implemented so that code like this doesn't crash
when run on a mixture of Tag and NavigableString objects:
    [x.name for x in tag.children]

:meta private:
Nrgr�s rKr=�NavigableString.name=s��rMc��[S5e)zBPrevent NavigableString.name from ever being set.

:meta private:
z)A NavigableString cannot be given a name.�rH)rwr=s  rKr=r�Is���H�I�IrMc#�# �X RLa[Rn[U5nUb![	U[5(aX2LagOX2;agUnU(aUR5nOUn[
U5S:�aUv� gg7f)a�Yield all strings of certain classes, possibly stripping them.

This makes it easy for NavigableString to implement methods
like get_text() as conveniences, creating a consistent
text-extraction API across all PageElements.

:param strip: If True, all strings will be stripped before being
    yielded.

:param types: A tuple of NavigableString subclasses. If this
    NavigableString isn't one of those subclasses, the
    sequence will be empty. By default, the subclasses
    considered are NavigableString and CData objects. That
    means no comments, processing instructions, etc.

:yield: A sequence that either contains this string, or is empty.
Nr)r�r$�MAIN_CONTENT_STRING_TYPESr�r�r�r
)rwr�r��my_typer��final_values      rKr��NavigableString._all_stringsQs����(�L�L� ��1�1�E��t�*�����%��&�&��'��(��%������+�+�-�K��K��{��a���� �s�A?Bc�"�UR5$)a	Yield this string, but only if it is interesting.

This is defined the way it is for compatibility with
`Tag.strings`. See `Tag` for information on which strings are
interesting in a given context.

:yield: A sequence that either contains this string, or is empty.
r�r�s rK�strings�NavigableString.strings�s��� � �"�"rMrgN)r��Union[str, bytes]rhrr�r�)rhz
Tuple[str]�rhr:)�minimal)r�r'rhr:r�)r=r:rhr��r�r�r�r5rhr�r�)rIrirjrkrlr�rmr�rcr�r�r�r�r�r=�setterr�r�r�rrnrgrMrKr4r4�s�����F�C��
�F�C���  ������2��	��	�
�[�[�J��J�"�+�BU�BU�0��0�*?�0�	�0�d�	#��	#rMc�D�\rSrSr%SrSrS\S'SrS\S'S
SSjjrS	r	g)�PreformattedStringi�z�A `NavigableString` not subject to the normal formatting rules.

This is an abstract class used for special kinds of strings such
as comments (`Comment`) and CDATA blocks (`CData`).
r�r:r�r�Nc�b�UbURX5 URU-UR-$)a�Make this string ready for output by adding any subclass-specific
    prefix or suffix.

:param formatter: A `Formatter` object, or a string naming one
    of the standard formatters. The string will be passed into the
    `Formatter`, but only to trigger any side effects: the return
    value is ignored.

:return: The string, with any subclass-specific prefix and
   suffix added on.
r�)rwr�s  rKr��PreformattedString.output_ready�s0��� ����t�/��{�{�T�!�D�K�K�/�/rMrgr)r�r�rhr:)
rIrirjrkrlr�rmr�r�rnrgrMrKrr�s'����F�C���F�C��0�0rMrc�6�\rSrSr%SrSrS\S'SrS\S'Srg	)
�CDatai�zQA `CDATA section <https://dev.w3.org/html5/spec-LC/syntax.html#cdata-sections>`_.z	<![CDATA[r:r�z]]>r�rgN�	rIrirjrkrlr�rmr�rnrgrMrKrr�s��[��F�C���F�C�rMrc�6�\rSrSr%SrSrS\S'SrS\S'Srg	)
�ProcessingInstructioni�zA SGML processing instruction.�<?r:r��>r�rgNrrgrMrKrr�s��(��F�C���F�C�rMrc�6�\rSrSr%SrSrS\S'SrS\S'Srg	)
�XMLProcessingInstructioni�zIAn `XML processing instruction <https://www.w3.org/TR/REC-xml/#sec-pi>`_.rr:r��?>r�rgNrrgrMrKrr�s��S��F�C���F�C�rMrc�6�\rSrSr%SrSrS\S'SrS\S'Srg	)
�Commenti�z�An `HTML comment <https://dev.w3.org/html5/spec-LC/syntax.html#comments>`_ or `XML comment <https://www.w3.org/TR/REC-xml/#sec-comments>`_.z<!--r:r�z-->r�rgNrrgrMrKrr�s��V��F�C���F�C�rMrc�6�\rSrSr%SrSrS\S'SrS\S'Srg	)
�Declarationi�zFAn `XML declaration <https://www.w3.org/TR/REC-xml/#sec-prolog-dtd>`_.rr:r�rr�rgNrrgrMrKrr�s��P��F�C���F�C�rMrc�~�\rSrSr%Sr\SSj5r\S
Sj5rSrS\	S'Sr
S\	S	'S
rg)�Doctypei�zKA `document type declaration <https://www.w3.org/TR/REC-xml/#dt-doctype>`_.r:c�8�[URXU55$)a�Generate an appropriate document type declaration for a given
public ID and system ID.

:param name: The name of the document's root element, e.g. 'html'.
:param pub_id: The Formal Public Identifier for this document type,
    e.g. '-//W3C//DTD XHTML 1.1//EN'
:param system_id: The system identifier for this document type,
    e.g. 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'
)r �_string_for_name_and_ids)rdr=�pub_id�	system_ids    rK�for_name_and_ids�Doctype.for_name_and_ids�s���s�3�3�D�)�L�M�MrMc�b�U=(d SnUbUSU--
nUbUSU--
nU$UbUSU--
nU$)z�Generate a string to be used as the basis of a Doctype object.

This is a separate method from for_name_and_ids() because the lxml
TreeBuilder needs to call it.
r�z PUBLIC "%s"z "%s"z SYSTEM "%s"rg)rwr=r#r$r�s     rKr"� Doctype._string_for_name_and_ids�sZ���
������^�f�,�,�E��$���9�,�,�����
"��^�i�/�/�E��rMz
<!DOCTYPE r�z>
r�rgN)r=r:r#r^r$r^rhr )r=r:r#r^r$r^rhr:)rIrirjrkrl�classmethodr%r"r�rmr�rnrgrMrKr r �s���U��N��N� -�N�:G�N�	�N��N�����!.��;H��	����"�F�C���F�C�rMr c��\rSrSrSrSrg)�
Stylesheeti�z�A `NavigableString` representing the contents of a `<style> HTML
tag <https://dev.w3.org/html5/spec-LC/Overview.html#the-style-element>`_
(probably CSS).

Used to distinguish embedded stylesheets from textual content.
rgNr�rgrMrKr+r+�r�rMr+c��\rSrSrSrSrg)�Scripti�z�A `NavigableString` representing the contents of a `<script>
HTML tag
<https://dev.w3.org/html5/spec-LC/Overview.html#the-script-element>`_
(probably Javascript).

Used to distinguish executable code from textual content.
rgNr�rgrMrKr-r-�s��rMr-c��\rSrSrSrSrg)�TemplateStringi	aA `NavigableString` representing a string found inside an `HTML
<template> tag <https://html.spec.whatwg.org/multipage/scripting.html#the-template-element>`_
embedded in a larger document.

Used to distinguish such strings from the main body of the document.
rgNr�rgrMrKr/r/	r�rMr/c��\rSrSrSrSrg)�RubyTextStringiz�A NavigableString representing the contents of an `<rt> HTML
tag <https://dev.w3.org/html5/spec-LC/text-level-semantics.html#the-rt-element>`_.

Can be used to distinguish such strings from the strings they're
annotating.
rgNr�rgrMrKr1r1r�rMr1c��\rSrSrSrSrg)�RubyParenthesisStringiz�A NavigableString representing the contents of an `<rp> HTML
tag <https://dev.w3.org/html5/spec-LC/text-level-semantics.html#the-rp-element>`_.
rgNr�rgrMrKr3r3s��rMr3c��\rSrSr%SrSjSkSjjrS\S'S\S'S\S'S\S'S\S'S\S
'S\S'S	\S'S\S'S\S'S\S'S	\S
'S\S'S\S'\"SSS5rSlSmS!jjr	SnS"jr
\SoS#j5r\
"S$S5SoS%j5r\SpS&j5r\R SqS'j5r\\1rS(\R*4SrS)jjr\"\5rSsS*jrStS+jrSnS,jr\r\
"S-S5SuS.j5rSvS/jrSwS0jrSxSyS1jjrSzS2jr S{S3jr!S|S}S4jjr"S|S~S5jjr#SS6jr$S�S7jr%S�S8jr&S�S9jr'S�S:jr(S�S;jr)SoS<jr*S�S=jr+S�S>jr,S0S SSS?4S�S@jjr-S�SAjr.S�SBjr/S�SCjr0S�SDjr1\1=r2r3\4SSESF4S�SGjjr5S\4SES4S�SHjjr6"SISJ\75r8\8"5r9\8"5r:\8"5r;\8"5r<S|S�SKjjr=S�SLjr>S�SMjr?S�S�SNjjr@S�S�SOjjrAS\4SE4S�SPjjrBS\4SE4S�SQjjrC\
"SRS5\4S(SS4S�STjj5rDS0S S4S�SUjjrE\F"SVSWSX5rGS0S SSS?4S�SYjjrH\F"SZS[S5rI\F"S\S[SX5rJ\S�S]j5rK\S�S^j5rL\S�S_j5rMS|S�S`jjrNS�S�SajjrO\S�Sbj5rP\
"ScS5S�Sdj5rQ\
"SeS5S�Sfj5rR\
"SgS5SShj5rSSirTg)�r$i!a	An HTML or XML tag that is part of a parse tree, along with its
attributes, contents, and relationships to other parts of the tree.

When Beautiful Soup parses the markup ``<b>penguin</b>``, it will
create a `Tag` object representing the ``<b>`` tag. You can
instantiate `Tag` objects directly, but it's not necessary unless
you're adding entirely new markup to a parsed document. Most of
the constructor arguments are intended for use by the `TreeBuilder`
that's parsing a document.

:param parser: A `BeautifulSoup` object representing the parse tree this
    `Tag` will be part of.
:param builder: The `TreeBuilder` being used to build the tree.
:param name: The name of the tag.
:param namespace: The URI of this tag's XML namespace, if any.
:param prefix: The prefix for this tag's XML namespace, if any.
:param attrs: A dictionary of attribute values.
:param parent: The `Tag` to use as the parent of this `Tag`. May be
   the `BeautifulSoup` object itself.
:param previous: The `PageElement` that was parsed immediately before
    parsing this tag.
:param is_xml: If True, this is an XML tag. Otherwise, this is an
    HTML tag.
: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 can_be_empty_element: If True, this tag should be
    represented as <tag/>. If False, this tag should be represented
    as <tag></tag>.
:param cdata_list_attributes: A dictionary of attributes whose values should
    be parsed as lists of strings if they ever show up on this tag.
:param preserve_whitespace_tags: Names of tags whose contents
    should have their whitespace preserved if they are encountered inside
    this tag.
:param interesting_string_types: When iterating over this tag's
    string contents in methods like `Tag.strings` or
    `PageElement.get_text`, these are the types of strings that are
    interesting enough to be considered. By default,
    `NavigableString` (normal strings) and `CData` (CDATA
    sections) are the only interesting string subtypes.
:param namespaces: A dictionary mapping currently active
    namespace prefixes to URIs, as of the point in the parsing process when
    this tag was encountered. This can be used later to
    construct CSS selectors.

Nr=r^r`r_rDr��
sourceliner��	sourcepos�can_be_empty_element�cdata_list_attributes�Optional[Dict[str, Set[str]]]�preserve_whitespace_tags�Optional[Set[str]]�interesting_string_types�$Optional[Set[Type[NavigableString]]]c���UcSUlOURUlUc[S5eX0lX@lU=(d 0UlXPlU(aUR(aU
cUb
X�lX�l	OX�lX�l	UcU	(a[nO[n[nOURnURnUUlUc
U"5UlO�Ub3UR (a"UR#URU5UlO[U"5UlUR%5H;unn['U[(5(aURU5nUURU'M= U(aUR*UlOX�l/UlUR1Xx5 SUlUcX�lX�lX�lX�lgURUlUR;U5 UR5U5UlUR UlUR6UlURUR<;a UR<UR1UlgUR>Ulg)Nz%No value provided for new tag's name.F) �parser_classr�r	r=r`�_namespacesr_�store_line_numbersr5r6r�r�r��attribute_dict_class�attribute_value_list_classrDr8�$_replace_cdata_list_attribute_values�itemsr��listr�r�r�r�r�r7r:r<�set_up_substitutions�string_containersr)rw�parser�builderr=r`r_rDr�r�r�r5r6r7r8r:r<�
namespaces�attr_dict_classrC�k�vs                     rK�__init__�Tag.__init__Rs��,�>� $�D��!'� 0� 0�D���<��D�E�E��	�"��%�+�������7�5�5��"�i�&;�(�O�&�N�(�O�&�N��?��"2��"3��);�&�%�:�:�O�)0�)K�)K�&�*D��'��=�(�*�D�J��"�w�'D�'D�$�I�I��I�I�u���
�-�.��
�"�K�K�M�D�A�q�!�!�T�*�*��K�K��N��$%�D�J�J�q�M�*��$�^�^�D�N�#�N�+-��
��
�
�6�$�����?�)=�%�)>�&�,D�)�,D�)�/6�.P�.P�D�+��(�(��.�)0�(D�(D�T�(J�D�%�*1�)F�)F�D�&�-4�,L�,L�D�)��y�y�G�5�5�5�29�1J�1J�4�9�9�1U�0V��-�04�0N�0N��-rMzOptional[type[BeautifulSoup]]r?r:r*r�r�r�r�r��parserClassr�Tc�|�UR5nU(a�U/nURUR5H�upVU[RLaUR5 M*UR
USS9nUSRU5 U[RLdMcUR[[U55 M� U$)ztA deepcopy of a Tag is a new Tag, unconnected to the parse tree.
Its contents are a copy of the old Tag's contents.
F)r�r�)
�	copy_self�
_event_stream�descendantsr$�END_ELEMENT_EVENTr�r�r�START_ELEMENT_EVENTr)rwr�r��clone�	tag_stack�eventr��descendant_clones        rKr��Tag.__deepcopy__�s������ ���%*�7�I�"&�"4�"4�T�5E�5E�"F����C�1�1�1��M�M�O�'.�';�';�D�E�';�'R�$��b�M�(�(�)9�:��� 7� 7�7�"�(�(��c�3C�)D�E�#G��rMc�j�[U5"SSURURURURUR
URURURURURURURS9nSHn[X[X55 M U$)z�Create a new Tag just like this one, but with no
contents and unattached to any parse tree.

This is the first step in the deepcopy process, but you can
call it on its own to create a copy of a Tag without copying its
contents.
N)r�r5r6r7r8r:r<rK)r7r�)r�r=r`r_rDr�r5r6r7r8r:r<r@�setattrr�)rwrX�attrs   rKrS�
Tag.copy_self�s����T�
����I�I��N�N��K�K��J�J��<�<�����n�n�!%�!:�!:�"&�"<�"<�%)�%B�%B�%)�%B�%B��'�'�
�� 7�D��E���!4�5�7��rMc�\�[UR5S:H=(a URSL$)aIIs this tag an empty-element tag? (aka a self-closing tag)

A tag that has contents is never an empty-element tag.

A tag that has no contents may or may not be an empty-element
tag. It depends on the `TreeBuilder` used to create the
tag. If the builder has a designated list of empty-element
tags, then only a tag whose name shows up in that list is
considered an empty-element tag. This is usually the case
for HTML documents.

If the builder has no designated list of empty-element, then
any tag with no contents is an empty-element tag. This is usually
the case for XML documents.
rT)r
r�r7r�s rK�is_empty_element�Tag.is_empty_elements(��"�4�=�=�!�Q�&�L�4�+D�+D��+L�LrMrbc��UR$�z: :meta private:)rbr�s rK�
isSelfClosing�Tag.isSelfClosing'r�rMc���[UR5S:wagURSn[U[5(aU$[U[5(aUR
$g)aConvenience property to get the single string within this
`Tag`, assuming there is just one.

:return: If this `Tag` has a single child that's a
 `NavigableString`, the return value is that string. If this
 element has one child `Tag`, the return value is that child's
 `Tag.string`, recursively. If this `Tag` has no children,
 or has more than one child, the return value is ``None``.

 If this property is unexpectedly returning ``None`` for you,
 it's probably because your `Tag` has more than one thing
 inside it.
r�Nr)r
r�r�r4r$r�)rw�childs  rKr��
Tag.string,sR���t�}�}���"���
�
�a� ���e�_�-�-��L�
��s�
#�
#��<�<��rMc��UR5 [U[5(a
URnO[nUR	U"U55 g)z>Replace the `Tag.contents` of this `Tag` with a single string.N)r#r�r4r�r)rwr��	new_classs   rKr�rjDs;��	
�
�
���f�o�.�.��(�(�I�'�I����I�f�%�&rMFc#�# �X RLa&URc
URnOURnURH}n[	U[
5(dM[
U5n[	U[5(aXBLaM@O
UbXB;aMKU(a'UR5n[U5S:XaMsUv� MyUv� M g7f)aYield all strings of certain classes, possibly stripping them.

:param strip: If True, all strings will be stripped before being
    yielded.

:param types: A tuple of NavigableString subclasses. Any strings of
    a subclass not found in this list will be ignored. By
    default, the subclasses considered are the ones found in
    self.interesting_string_types. If that's not specified,
    only NavigableString and CData objects will be
    considered. That means no comments, processing
    instructions, etc.
Nr)	r�r<rrUr�r4r�r�r
)rwr�r��
descendant�descendant_type�strippeds      rKr��Tag._all_stringsQs���� �L�L� ��,�,�4��6�6���5�5���*�*�J��j�/�:�:��"�:�.�O��%��&�&�"�/��0��"��'C���%�+�+�-���x�=�A�%���� � �#+�s�CCc�f�/nUH(nURURX55 US-
nM* U$)a{Insert one or more new PageElements as a child of this `Tag`.

This works similarly to :py:meth:`list.insert`, except you can insert
multiple elements at once.

:param position: The numeric position that should be occupied
   in this Tag's `Tag.children` by the first new `PageElement`.

:param new_children: The PageElements to insert.

:return The newly inserted PageElements.
r�)r4�_insert)rw�position�new_children�inserted�	new_childs     rKr�
Tag.insert|s8��')��%�I��O�O�D�L�L��=�>���M�H�&��rMc���Uc[S5eX La[S5e[U[5(a [U[5(d[U5nSSKJn [X#5(a&UR"U/[UR5Q76$[U[UR55n[US5(aPURbCURULa$URU5nXA:aUS-nOXA:XaU/$UR5 XlSnUS:XaSUlXlO>URUS-
nXRlX"RlUR%S5UlUR bX"R lUR%SSS	9n[)[*U5nU[UR5:�aGSUlUnSnUc'Ub$UR"nURnUbOUcUbM$UbX�lO@SUlO8URUn	X�lUR"bX"R"lX�lUR&bUUR&lURR
X5 U/$)
NzCannot insert None into a tag.z Cannot insert a tag into itself.rr!r�r�FT)r*r+)r	r�r:r4�bs4r"rrFr��minr
�hasattrr�rr
r�r�r�rr�rr�)
rwrtrwr"�
current_index�previous_child�new_childs_last_elementr��parents_next_sibling�
next_childs
          rKrs�Tag._insert�sh�����=�>�>����?�@�@��i��%�%�j��O�.T�.T�'�	�2�I�%��i�/�/��;�;�x�C�$�y�/A�/A�*B�C�C��x��T�]�]�!3�4���9�h�'�'�I�,<�,<�,H����4�'� $�
�
�9� 5�
� �+�
��M�H�"�.�&�;�&����������q�=�)-�I�&�)-�&�!�]�]�8�a�<�8�N�)7�&�6?�&�&�3�)7�)H�)H��)O�I�&��%�%�1�6?�&�&�3�"+�"<�"<� �d�#=�#
��#'�{�4K�"L���s�4�=�=�)�)�%)�I�"�$(�F�#'� �&�.�6�3E�'-�':�':�$�����'�3��'�.�6�3E�$�/�7K�4�8<�'�4����x�0�J�%/�"��%�%�1�:C�&�&�7�3=�0�"�/�/�;�'�
$�0�0�A�	
�
�
���X�1��{�rMc���URnUc[S5eURU5nURUS9 [	UR
SS5HnUR
X#5 M U$)zaReplace this `PageElement` with its contents.

:return: This object, no longer part of the tree.
NzTCannot replace an element with its contents when that element is not part of a tree.r)r�r	rr
�reversedr�r)rw�	my_parentrris    rK�unwrap�
Tag.unwrap�sn��
�K�K�	����1��
��?�?�4�(�������*��d�m�m�A�.�/�E����X�-�0��rMr�c�"�UR5$re)r�r�s rK�replaceWithChildren�Tag.replaceWithChildren�s���{�{�}�rMc�R�UR[UR5U5S$)z�
Appends the given `PageElement` to the contents of this `Tag`.

:param tag: A PageElement.

:return The newly appended PageElement.
r)rr
r�)rw�tags  rKr�
Tag.append�s#���{�{�3�t�}�}�-�s�3�A�6�6rMc���[U[5(a[UR5nO�[U[[
45(aS[R"S[SS9 [U[
5(a [U[5(d[U5nU/nO [U[5(a[U5n/nWH#nURURU55 M% U$)a_Appends one or more objects to the contents of this
`Tag`.

:param tags: If a list of `PageElement` objects is provided,
    they will be appended to this tag's contents, one at a time.
    If a single `Tag` is provided, its `Tag.contents` will be
    used to extend this object's `Tag.contents`.

:return The list of PageElements that were appended.
zIA single non-Tag item was passed into Tag.extend. Use Tag.append instead.r>r?)r�r$rFr�r�r:rCrD�UserWarningr4rr)rw�tags�tag_listr5r�s     rKr4�
Tag.extends����d�C� � ��D�M�M�*�H�
��{�C�0�
1�
1�
�M�M�[���
�
�$��$�$�Z��k�-J�-J�&�t�,���v�H�
��h�
'�
'��D�z�H�%'���C��N�N�4�;�;�s�+�,���rMc��URSSH,nU(aUR5 MUR5 M. g)z�Destroy all children of this `Tag` by calling
   `PageElement.extract` on them.

:param decompose: If this is True, `PageElement.decompose` (a
    more destructive method) will be called instead of
    `PageElement.extract`.
N)r�r'r
)rwr'r�s   rKr#�	Tag.clear-s0���}�}�Q�'�G���!�!�#����!�	(rMc���/n[UR5H�up#[U[5(aUR	5 U[UR5S-
:XaMHURUS-n[U[5(dMq[U[5(dM�[U[5(aM�[U[5(aM�URU5 M� [U5Hnn[[URU5n[[URUS-5nUR5 [
X4-5nURU5 Mp g)z�Smooth out the children of this `Tag` by consolidating consecutive
strings.

If you perform a lot of operations that modify the tree,
calling this method afterwards can make pretty-printed output
look more natural.
r�N)
rr�r�r$�smoothr
r4rrr�rr
r)rw�markedr��a�b�ns      rKr��
Tag.smooth;s�����d�m�m�,�D�A��!�S�!�!����
��C��
�
�&��*�*���
�
�a�!�e�$�A��1�o�.�.��q�/�2�2�"�1�&8�9�9�"�1�&8�9�9��
�
�a� �-�(�&�!�A��_�d�m�m�A�&6�7�A��_�d�m�m�A��E�&:�;�A�
�I�I�K����&�A�
�N�N�1��"rMc�d�[UR5H
up#X1LdMUs $ [S5e)z�Find the index of a child of this `Tag` (by identity, not value).

Doing this by identity avoids issues when a `Tag` contains two
children that have string equality.

:param element: Look for this `PageElement` in this object's contents.
zTag.index: element not in tag)rr�r	)rwr�r�ris    rKr�	Tag.indexcs2��"�$�-�-�0�H�A�����1��8�9�9rMc�8�URRX5$)z�Returns the value of the 'key' attribute for the tag, or
the value given for 'default' if it doesn't have that
attribute.

:param key: The attribute to look for.
:param default: Use this value if the attribute is not present
    on this `Tag`.
)rD�get)rwr�r�s   rKr��Tag.getps���z�z�~�~�c�+�+rMc���URX5nUcUR5nU$[U[5(aUnU$[U[5(d[[U5nURU/5nU$)a
The same as get(), but always returns a (possibly empty) list.

:param key: The attribute to look for.
:param default: Use this value if the attribute is not present
    on this `Tag`.
:return: A list of strings, usually empty or containing only a single
    value.
)r�rCr�rFr:r)rwr�r�r��
list_values     rK�get_attribute_list�Tag.get_attribute_list}s|������&���=��8�8�:�J���
��t�
$�
$��J�
���e�S�)�)��S�%�(���8�8�%��A�J��rMc��XR;$)z6Does this `Tag` have an attribute with the given name?�rD�rwr�s  rK�has_attr�Tag.has_attr�s���j�j� � rMc�4�[U5R5$r)r:�__hash__r�s rKr��Tag.__hash__�s���4�y�!�!�#�#rMc� �URU$)zitag[key] returns the value of the 'key' attribute for the Tag,
and throws an exception if it's not there.r�r�s  rK�__getitem__�Tag.__getitem__�s���z�z�#��rMc�,�[UR5$)z0Iterating over a Tag iterates over its contents.)�iterr�r�s rK�__iter__�Tag.__iter__�s���D�M�M�"�"rMc�,�[UR5$)z:The length of a Tag is the length of its list of contents.)r
r�r�s rK�__len__�Tag.__len__�s���4�=�=�!�!rMc��XR;$r�r�)rwrs  rK�__contains__�Tag.__contains__�s���M�M�!�!rMc��g)z-A tag is non-None even if it has no contents.Trgr�s rK�__bool__�Tag.__bool__�s��rMc� �X RU'g)zCSetting tag[key] sets the value of the 'key' attribute for the
tag.Nr�)rwr�r�s   rKr��Tag.__setitem__�s�� �
�
�3�rMc�<�URRUS5 g)z;Deleting tag[key] deletes all 'key' attributes for the tag.N)rDr�r�s  rK�__delitem__�Tag.__delitem__�s���
�
���s�D�!rMr>c�,�UR"XX4XV40UD6$)z�Calling a Tag like a function is the same as calling its
find_all() method. Eg. tag('a') returns a list of all the A tags
found within this tag.�r�)rwr=rDr�r�rNrJrEs        rK�__call__�Tag.__call__�s$���}�}���E�
�BH�
�	
rMc��[U5S:�aQURS5(a;USSn[R"S[	US9-[
SS9 UR
U5nOLURS	5(dUS
:XdUR
U5nO[SUR<SU<S35e[[[U5$)
zACalling tag.subtag is the same as calling tag.find(name="subtag")rsr$N���z�.%(name)sTag is deprecated, use .find("%(name)s") instead. If you really were looking for a tag called %(name)sTag, use .find("%(name)sTag")r<r>r?�__r��'z' object has no attribute ')
r
�endswithrCrDr�rF�find�
startswithrHr�rrr$)rw�subtag�tag_namer�s    rKrL�Tag.__getattr__�s����v�;��?�v���u�5�5��c�r�{�H��M�M�_��H�%�&�"��	
��Y�Y�x�(�F��"�"�4�(�(��:�1E��Y�Y�v�&�F� �7;�~�~�v�N��
��H�S�M�6�*�*rMc��XLag[U[5(dg[US5(an[US5(a][US5(aLURUR:wd2URUR:wd[U5[U5:wag[
UR5Hup#X1RU:wdM g g)zqReturns true iff this Tag has the same name, the same attributes,
and the same contents (recursively) as `other`.TFr=rDr�)r�r$r|r=rDr
rr�)rw�otherr��my_childs    rK�__eq__�
Tag.__eq__�s����=���%��%�%����v�&�&��5�'�*�*��5�*�-�-��y�y�E�J�J�&��z�z�U�[�[�(��4�y�C��J�&��$�T�]�]�3�K�A��>�>�!�,�,��4�rMc��X:X+$)zLReturns true iff this Tag is not identical to `other`,
as defined in __eq__.rg)rwr�s  rK�__ne__�
Tag.__ne__�s
��� � rMc�"�UR5$)zRenders this `Tag` as a string.)�decoder�s rK�__repr__�Tag.__repr__�s���{�{�}�rMr
�xmlcharrefreplacec�H�URX!U5nURX5$)a�Render this `Tag` and its contents as a bytestring.

:param encoding: The encoding to use when converting to
   a bytestring. This may also affect the text of the document,
   specifically any encoding declarations within the document.
:param indent_level: Each line of the rendering will be
   indented this many levels. (The ``formatter`` decides what a
   'level' means, in terms of spaces or other characters
   output.) This is used internally in recursive calls while
   pretty-printing.
:param formatter: Either a `Formatter` object, or a string naming one of
    the standard formatters.
:param errors: An error handling strategy such as
    'xmlcharrefreplace'. This value is passed along into
    :py:meth:`str.encode` and its value should be one of the `error
    handling constants defined by Python's codecs module
    <https://docs.python.org/3/library/codecs.html#error-handlers>`_.
�r��encode)rw�encoding�indent_levelr��errorsr�s      rKr��
Tag.encode	s#��6
�K�K��	�:���x�x��)�)rMc���/n[U[5(dURU5nUSLaSnSnURU5GH�upxU[R
[R4;a![[U5nURX#SS9n	O]U[RLa)[[U5nURX#SS9n	UbUS-nO![[U5nURU5n	U(aS=p�OS=p�U[R
La1U(d*[[U5R5(dSn
SnUnOU[RLa
X�LaSn
SnSnUbfU
(dU(a?[U[5(aU	R5n	U	(aURX�X:U5n	U[R
:XaUS-
nURU	5 GM� SR!U5$)a~Render this `Tag` and its contents as a Unicode string.

:param indent_level: Each line of the rendering will be
   indented this many levels. (The ``formatter`` decides what a
   'level' means, in terms of spaces or other characters
   output.) This is used internally in recursive calls while
   pretty-printing.
:param encoding: The encoding you intend to use when
   converting the string to a bytestring. decode() is *not*
   responsible for performing that encoding. This information
   is needed so that a real encoding can be substituted in if
   the document contains an encoding declaration (e.g. in a
   <meta> tag).
:param formatter: Either a `Formatter` object, or a string
    naming one of the standard formatters.
:param iterator: The iterator to use when navigating over the
    parse tree. This is only used by `Tag.decode_contents` and
    you probably won't need to use it.
TrN)�openingFr�r�)r�r
r�rTr$rW�EMPTY_ELEMENT_EVENTr�_format_tagrVr4r��_should_pretty_printr��_indent_stringrr�)rwr�rxr�r{�pieces�string_literal_tagrZr��piece�
indent_before�indent_afters            rKr��
Tag.decode	s���4���)�Y�/�/��/�/�	�:�I��4���L�"��"�0�0��:�N�E���0�0�#�2I�2I�J�J��s�G�,���+�+�,=�RV�+�W���#�/�/�/��s�G�,���+�+�,=�RW�+�X���+� �A�%�L�����8���,�,�Y�7��"�/4�4�
��/3�3�
���0�0�0�*��S�'�*�?�?�A�A�!%�
�$��%,�"��#�/�/�/�G�4Q�!&�
�#��%)�"��'� �L�!�'�?�;�;� %���
��� $� 3� 3�!��<�!���C�3�3�3� �A�%�L��M�M�%� �};�~�w�w�v��rMc��\rSrSrSrSrg)�Tag._TreeTraversalEventi�	zcAn internal class representing an event in the process
of traversing a parse tree.

:meta private:
rgNr�rgrMrK�_TreeTraversalEventr��	s��	rMr�c#�X# �/nU=(d URnUH�nU(aSURUS:wa@UR5n[RU4v� U(aURUS:waM@[U[5(aNUR(a[RU4v� M�[RU4v� URU5 M�[RU4v� M� U(a.UR5n[RU4v� U(aM-gg7f)aYield a sequence of events that can be used to reconstruct the DOM
for this element.

This lets us recreate the nested structure of this element
(e.g. when formatting it as a string) without using recursive
method calls.

This is similar in concept to the SAX API, but it's a simpler
interface designed for internal use. The events are different
from SAX and the arguments associated with the events are Tags
and other Beautiful Soup objects.

:param iterator: An alternate iterator to use when traversing
 the tree.
r�N)�self_and_descendantsr�r�r$rVr�rbr�rWr�STRING_ELEMENT_EVENT)rwr{rYr��now_closed_tags     rKrT�Tag._event_stream�	s����$ "�	��8�t�8�8���A�����I�b�M� 9�!*������+�+�^�;�;�����I�b�M� 9��!�S�!�!��%�%��1�1�1�4�4��1�1�1�4�4��$�$�Q�'���.�.��1�1�!�$�&�]�]�_�N��'�'��7�7��i�s�A5D*�9B-D*�(D*c�d�SnU(aU(aURU-nSnU(aSnXa-U-$)apAdd indentation whitespace before and/or after a string.

:param s: The string to amend with whitespace.
:param indent_level: The indentation level; affects how much
   whitespace goes before the string.
:param indent_before: Whether or not to add whitespace
   before the string.
:param indent_after: Whether or not to add whitespace
   (a newline) after the string.
r��
)�indent)rwr�r�r�r�r��space_before�space_afters        rKr��Tag._indent_string�	s9��$���\�$�+�+�l�:�L�����K���+�-�-rMc�.�UR(agSnU(dSnSnUR(aURS-nSnU(GaURU5n/nUH�up�U
cU	nO�[U
[5(d[U
[
5(aSR
U
5n
OJ[U
[5(d[U
5n
O)[U
[5(aUbU
RU5n
URU
5n[U	5S-URU5-nURU5 M� U(aSSR
U5-nSn
UR(aUR=(d Sn
SU-U-UR-U-U
-S-$)Nr��/rb� �=�<r)r�r_�
attributesr�rFr�r�r:rpry�attribute_value�quoted_attribute_valuerrb�void_element_close_prefixr=)rwrxr�r��
closing_slashr_�attribute_stringrrDr��val�decodedr��void_element_closing_slashs              rKr��Tag._format_tag�	s����;�;��
�
���M����;�;��[�[�3�&�F����"�-�-�d�3�J��E�&����;�!�G�!�#�t�,�,�
�3��0F�0F�!�h�h�s�m��'��S�1�1�!�#�h��"�3�(M�N�N�-�9�!�5�5�6G�H��$�4�4�S�9�D�!�#�h��n�y�/O�/O�PT�/U�U�G����W�%�!'�"�#&����%��#8� �&(�"�� � �)2�)L�)L�)R�PR�&�
��
��
��i�i�
��	
�
)�
)��

�	
rMc�z�USL=(a1 UR(+=(d URUR;$)zpShould this tag be pretty-printed?

Most of them should, but some (such as <pre> in HTML
documents) should not.
N)r:r=)rwr�s  rKr��Tag._should_pretty_print
s9���4�'�
��-�-�-�
>��y�y�� =� =�=�	
rMc�J�UcURSUS9$URUSUS9$)a3Pretty-print this `Tag` as a string or bytestring.

:param encoding: The encoding of the bytestring, or None if you want Unicode.
:param formatter: A Formatter object, or a string naming one of
    the standard formatters.
:return: A string (if no ``encoding`` is provided) or a bytestring
    (otherwise).
r)r�r�)r�r�r�r�)rwr�r�s   rK�prettify�Tag.prettify)
s2�����;�;�A��;�C�C��;�;��q�I�;�V�VrMc�6�URXX0RS9$)a�Renders the contents of this tag as a Unicode string.

:param indent_level: Each line of the rendering will be
   indented this many levels. (The formatter decides what a
   'level' means in terms of spaces or other characters
   output.) Used internally in recursive calls while
   pretty-printing.

:param eventual_encoding: The tag is destined to be
   encoded into this encoding. decode_contents() is *not*
   responsible for performing that encoding. This information
   is needed so that a real encoding can be substituted in if
   the document contains an encoding declaration (e.g. in a
   <meta> tag).

:param formatter: A `Formatter` object, or a string naming one of
    the standard Formatters.
)r{)r�rU)rwr�rxr�s    rK�decode_contents�Tag.decode_contents;
s%��0�{�{��Y�AQ�AQ��
�	
rMc�H�URXU5nURU5$)a�Renders the contents of this PageElement as a bytestring.

:param indent_level: Each line of the rendering will be
   indented this many levels. (The ``formatter`` decides what a
   'level' means, in terms of spaces or other characters
   output.) This is used internally in recursive calls while
   pretty-printing.
:param formatter: Either a `Formatter` object, or a string naming one of
    the standard formatters.
:param encoding: The bytestring will be in this encoding.
)rr�)rwr�r�r�r�s     rK�encode_contents�Tag.encode_contentsW
s%��"�'�'��	�J�����x�(�(rMrrc�2�U(dSnURX1S9$)z9Deprecated method for BS3 compatibility.

:meta private:
N)r�r�)r)rwr��prettyPrint�indentLevels    rK�renderContents�Tag.renderContentsk
s ����K��#�#��#�P�PrMc�P�SnUR"XX4S4SS0UD6nU(aUSnU$)auLook in the children of this PageElement and find the first
PageElement that matches the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param recursive: If this is True, find() will perform a
    recursive search of this Tag's children. Otherwise,
    only the direct children will be considered.
:param string: A filter on the `Tag.string` attribute.
:param limit: Stop looking after finding this many results.
:kwargs: Additional filters on attribute values.
Nr�rJrsrr�)rwr=rDr�r�rErur5s        rKr��Tag.find|
s7��.
���-�-��Y��[�q�[�TZ�[�����
�A��rM�	findChildr�r\c�t�URnU(dURnUR"XXEU4SUS-0UD6$)a�Look in the children of this `PageElement` and find all
`PageElement` objects that match the given criteria.

All find_* methods take a common set of arguments. See the online
documentation for detailed explanations.

:param name: A filter on tag name.
:param attrs: Additional filters on attribute values.
:param recursive: If this is True, find_all() will perform a
    recursive search of this PageElement's children. Otherwise,
    only the direct children will be considered.
:param limit: Stop looking after finding this many results.
:param _stacklevel: Used internally to improve warning messages.
:kwargs: Additional filters on attribute values.
rJr�)rU�childrenrK)	rwr=rDr�r�rNrJrEr�s	         rKr��Tag.find_all�
sG��2�$�$�	���
�
�I��~�~���	�
�?J�Q��
�RX�
�	
rM�findAllr��findChildrenc�(�SUR5$)z7Iterate over all direct children of this `PageElement`.c3�$# �UHov� M g7frrg)rrs  rKr�Tag.children.<locals>.<genexpr>�
s���)�=�a��=�s�r�r�s rKr"�Tag.children�
s��*�4�=�=�)�)rMc�8�URUR5$)zFIterate over this `Tag` and its children in a
breadth-first sequence.
)r�rUr�s rKr��Tag.self_and_descendants�
s��
�~�~�d�.�.�/�/rMc#�# �[UR5(dg[[UR	SS95nUR
nURSnX2La!UbUR
nUv� UnX2LaUbMgggg7f)zEIterate over all children of this `Tag` in a
breadth-first sequence.
NT)r+r)r
r�rr�rr�)rw�last_descendant�stopNode�currentr=s     rKrU�Tag.descendants�
s����
�4�=�=�!�!���{�D�,A�,A�d�,A�,S�T��"�/�/��%)�]�]�1�%5���%�'�*=��,�,�I��M��G��%�'�*=�%�*=�%�s�A4A<�8A<c�<�URR"X40UD6$)a�Perform a CSS selection operation on the current element.

:param selector: A CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
   used in the CSS selector to namespace URIs. By default,
   Beautiful Soup will use the prefixes it encountered while
   parsing the document.

:param kwargs: Keyword arguments to be passed into Soup Sieve's
   soupsieve.select() method.
)�css�
select_one)rw�selectorrKrEs    rKr3�Tag.select_one�
s���x�x�"�"�8�B�6�B�BrMc�>�URR"XU40UD6$)aPerform a CSS selection operation on the current element.

This uses the SoupSieve library.

:param selector: A string containing a CSS selector.

:param namespaces: A dictionary mapping namespace prefixes
   used in the CSS selector to namespace URIs. By default,
   Beautiful Soup will use the prefixes it encountered while
   parsing the document.

:param limit: After finding this number of results, stop looking.

:param kwargs: Keyword arguments to be passed into SoupSieve's
   soupsieve.select() method.
)r2�select)rwr4rKrNrEs     rKr7�
Tag.select�
s��.�x�x���x�U�E�f�E�ErMc��[U5$)z,Return an interface to the CSS selector API.rr�s rKr2�Tag.csss���4�y�rMr"c��UR$�z&Deprecated generator.

:meta private:
)r"r�s rK�childGenerator�Tag.childGenerators���}�}�rMrUc��UR$r<)rUr�s rK�recursiveChildGenerator�Tag.recursiveChildGenerators�����rMr�c�$�URU5$)z�Deprecated method. This was kind of misleading because has_key()
(attributes) was different from __in__ (contents).

has_key() is gone in Python 3, anyway.

:meta private:
)r�r�s  rK�has_key�Tag.has_keys���}�}�S�!�!rM)r@rCrDr7r8r�r�r<r�r=r`r?r_r:r5r6)NNNNNNNNNNNNNNNN) rIzOptional[BeautifulSoup]rJzOptional[TreeBuilder]r=r^r`r^r_r^rDz(Optional[_RawOrProcessedAttributeValues]r�z#Optional[Union[BeautifulSoup, Tag]]r�r(r�r�r5r�r6r�r7r�r8r9r:r;r<r=rK�Optional[Dict[str, str]])Tr�r�r�)rhr^)r�r:rhr�r)rtr�rur,rhr�)rtr�rwr,rhr�)rhr-)r�r,rhr�)r�z(Union[Iterable[_InsertableElement], Tag]rhr�r�)r'r�rhr�r�)r�r�rhr�r)r�r:r��Optional[_AttributeValue]rhrF)r�r:r�zOptional[AttributeValueList]rhr�)r�r:rhr�)rhr�)r�r:rhr)r�)rrrhr�)r�r:r�r)rhr��r�r:rhr�)r=zOptional[_StrainableElement]rDr2r�r�r�r�rNr�rJr�rEr1rhr.)r�r:rhr�)r�rrhr�r	)
r�r+r�r�r�r'r�r:rh�bytes)
r�r�rxr+r�r'r{�Optional[Iterator[PageElement]]rhr:)r{rIrhz1Iterator[Tuple[_TreeTraversalEvent, PageElement]])r�r:r�r�r�r
r�r�r�r�rhr:)rxr:r�r
r�r�rhr:)r�)r�r�rhr�)Nr
)r�zOptional[_Encoding]r�r'rhr)r�r�rxr+r�r'rhr:)r�r�r�r+r�r'rhrH)r�r+rr�rr�rhrH)r=r6rDr2r�r�r�r�rEr1rhr()r=r6rDr2r�r�r�r�rNr�rJr�rEr1rhr.)r4r:rKrErErrhr�)Nr)
r4r:rKrErNr�rErrhzResultSet[Tag])rhr)UrIrirjrkrlrOrmrrQr�rSr�rbrrfr�rr4rrr�r�r�rrrsr��replace_with_childrenr�rr4r#r�rr�r�r�r�r�r�r�r�r�r�r�r�rLr�r�r��__str__�__unicode__rOr�r��objectr�rWrVr�r�rTr�r�r�rrrrr�r	r r�r$r%r"r�rUr3r7r2r=r@rCrnrgrMrKr$r$!s���.�d+/�)-�"�#'� $�:>�6:�&*�!%�$(�#'�/3�?C�7;�IM�/3�#wO�'�wO�'�wO��	wO�
!�wO��
wO�8�wO�4�wO�$�wO��wO�"�wO�!�wO�-�wO� =�wO�#5�wO� #G�!wO�"-�#wO�r0�/�

�I����������������L�B�B�(�(�8�8�0�0�$�M�>�7�K�K��4�8�M��M�$�#�W�-�%�.�%�����.�]�]�'��'�"1�%� 8��"�+�BU�BU�'!��'!�*?�'!�	�'!�R�|�$�G��&U�n�"#����7�#��$��7�#�J"�&�P:�>B�,��,�!:�,�	"�,�AE����!=��	��.!�$��
#�"�"�� �
"�.2�')��.2�#��
�*�
�%�
��	
�
,�
��

��
�'�
�
�
�"+�.�*!�
�%�$�G�k�6�&*�&/�)�*��*�$�*�$�	*�
�*�
�
*�@'+�'>�&/�48�k�#�k�%�k�$�	k�
2�k�

�
k�Z�f��.�/��+�-��-�/��.�0��;?�*8�7�*8�	:�*8�X.��.��.��	.�
�.��
.�

�.�8<
�!$�<
�1:�<
�EI�<
�	�<
�|	
�)-�&/�W�%�W�$�W�
�	W�('+�'>�&/�	
�#�
�%�
�$�	
�


�
�<'+�5�&/�	)�#�)��)�$�	)�

�)�(�"�G�,�6�!�%&�	Q��Q��Q�#�	Q�

�Q�-�Q�$!%�')��.2����%���	�
,��'�
�
��:+�;���H�I�!%�')��.2�#��
��
�%�
��	
�
,�
��

��
�'�
�
�
�@)��J��H�G�-�n�j�'�R�L��*��*��0��0�� �� �&EI�C��C�)A�C�TW�C�	�C�(04��	F��F�-�F��	F�
�F�
�
F�2����
��W�%��&�����(� �)� ���W�%�"�&�"rMr$�
_PageElementT)�boundc�V^�\rSrSr%SrS\S'SS	U4SjjjrS
SjrSrU=r	$)r�i-z�A ResultSet is a list of `PageElement` objects, gathered as the result
of matching an :py:class:`ElementFilter` against a parse tree. Basically, a list of
search results.
�Optional[ElementFilter]�sourcec�8>�[[U]U5 Xlgr)r�r�rOrR)rwrRr�r�s   �rKrO�ResultSet.__init__5s���	�i��'��/��rMc� �[SUS35e)z7Raise a helpful exception to explain a common code fix.z#ResultSet object has no attribute "z|". You're probably treating a list of elements like a single element. Did you call find_all() when you meant to call find()?r�r�s  rKrL�ResultSet.__getattr__;s"���3�C�5�9u�
x�
�	
rM)rR)rg)rRrQr�zIterable[_PageElementT]rhr�rG)
rIrirjrkrlrmrOrLrnr�r�s@rKr�r�-sC����

$�#�RT��-��7N��	
���
�
rMr�)r�)r=r:rhr)c�
__future__r�__license__r�rC�bs4.cssr�bs4._deprecationrrr	�
bs4.formatterr
rr�
bs4._warningsr
�typingrrrrrrrrrrrrrrrrr�typing_extensionsrr rzr"�bs4.builderr#r�r%r&r'�bs4._typingr(r)r*r+r,r-r.r/r0r1r2r3r5rmr6r�rBr�r9rLrOrP�setrZr:r\rpr|r�r�r�r�r�rMr�r4rrrrrrr r+r-r/r1r3r$rNr�r�rgrMrK�<module>rbs���"���	�����
��
<������&�
�!�'�(��
�
�
�
�$)��	��X�d�+<�&=�>�>�$��y��&�e�,Q�&R�S���S��m���+-�*�*�V�*<��<�<�K� '���&�"$���F�!3��,�3�-0�
�-��>��$�#��D$�C�$�0!� E�!�8��c����D��S��M��(�}�(�@((�
�((�V#A� E�#A�L]�&�]�@S#�c�;�S#�l0��0�6����.���4��� ���$��%� �%�P����_���_���_���O��F"�+�F"�R(��{�;�
�
��]�#�W�]�%;�
�2$rM

Filemanager

Name Type Size Permission Actions
__init__.cpython-313.pyc File 38.36 KB 0644
_deprecation.cpython-313.pyc File 3.62 KB 0644
_typing.cpython-313.pyc File 3.49 KB 0644
_warnings.cpython-313.pyc File 5.51 KB 0644
css.cpython-313.pyc File 13.19 KB 0644
dammit.cpython-313.pyc File 44.59 KB 0644
diagnose.cpython-313.pyc File 12.43 KB 0644
element.cpython-313.pyc File 102.48 KB 0644
exceptions.cpython-313.pyc File 1.78 KB 0644
filter.cpython-313.pyc File 27.9 KB 0644
formatter.cpython-313.pyc File 9.93 KB 0644
Filemanager