403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /tmp/calpy/cssselect2/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tmp/calpy/cssselect2/__pycache__/tree.cpython-311.pyc
�

ϥ=j,5��`�ddlmZddlmZddlmZddlmZmZGd�d��Z	d�Z
d	�Zd
S)�)�cached_property)�warn)�ascii_lower�)�compile_selector_list�split_whitespacec��eZdZdZedd���Zedd���Zed d���Z	dd�Zd�Z	d	�Z
d
�Zd�Ze
d���Ze
d
���Zd�Zd�Zd�Zd�Zd�Zd�Zed���Zd�Zd�Zd�Zed���Zed���Zed���Zed���Zed���Z ed���Z!ed���Z"dS)!�ElementWrappera�Wrapper of :class:`xml.etree.ElementTree.Element` for Selector matching.

    This class should not be instanciated directly. :meth:`from_xml_root` or
    :meth:`from_html_root` should be used for the root element of a document,
    and other elements should be accessed (and wrappers generated) using
    methods such as :meth:`iter_children` and :meth:`iter_subtree`.

    :class:`ElementWrapper` objects compare equal if their underlying
    :class:`xml.etree.ElementTree.Element` do.

    Nc�2�|�||d���S)a.Wrap for selector matching the root of an XML or XHTML document.

        :param root:
            An ElementTree :class:`xml.etree.ElementTree.Element`
            for the root element of a document.
            If the given element is not the root,
            selector matching will behave is if it were.
            In other words, selectors will be not be `scoped`_
            to the subtree rooted at that element.
        :returns:
            A new :class:`ElementWrapper`

        .. _scoped: https://drafts.csswg.org/selectors-4/#scoping

        F��in_html_document��
_from_root��cls�root�content_languages   �B/tmp/claude-1015/pip-target-jmvfl800/lib/python/cssselect2/tree.py�
from_xml_rootzElementWrapper.from_xml_roots��"�~�~�d�$4�u�~�M�M�M�c�2�|�||d���S)z�Same as :meth:`from_xml_root` with case-insensitive attribute names.

        Useful for documents parsed with an HTML parser like html5lib, which
        should be the case of documents with the ``text/html`` MIME type.

        Trrrs   r�from_html_rootzElementWrapper.from_html_root(s���~�~�d�$4�t�~�L�L�LrTc�l�t|d��r|���}||ddd||���S)N�getrootr)�parent�index�previousr
r)�hasattrr)rrrr
s    rrzElementWrapper._from_root2sM���4��#�#�	"��<�<�>�>�D��s���Q��-�@P�R�R�R�	Rrc��||_||_||_|�
|j|_n|g|_||_||_||_d|_d|_	dS�N)
�
etree_elementrr�etree_children�etree_siblingsrr
�transport_content_language�
_ancestors�_previous_siblings)�selfr!rrrr
rs       r�__init__zElementWrapper.__init__:sn��+������!��
���
#)�"7�D���#0�/�D����
� 0���*:��'����"&����rc�^�t|��t|��uo|j|jkSr )�typer!�r'�others  r�__eq__zElementWrapper.__eq__Vs.����J�J�$�u�+�+�%�
6���%�"5�5�	7rc��||kSr �r+s  r�__ne__zElementWrapper.__ne__[s���E�M�"�"rc�H�tt|��|jf��Sr )�hashr*r!�r's r�__hash__zElementWrapper.__hash__^s���T�$�Z�Z��!3�4�5�5�5rc#�>K�|���Ed{V��dSr )�
iter_childrenr3s r�__iter__zElementWrapper.__iter__as0�����%�%�'�'�'�'�'�'�'�'�'�'�'rc�f�|j�$|j�dng|jj�|j�R|_|jS)u�Tuple of existing ancestors.

        Tuple of existing :class:`ElementWrapper` objects for this element’s
        ancestors, in reversed tree order, from :attr:`parent` to the root.

        Nr/)r%r�	ancestorsr3s rr9zElementWrapper.ancestorsds>���?�"��k�)���/T���1F�/T���/T�/T�
�O���rc�f�|j�$|j�dng|jj�|j�R|_|jS)u�Tuple of previous siblings.

        Tuple of existing :class:`ElementWrapper` objects for this element’s
        previous siblings, in reversed tree order.

        Nr/)r&r�previous_siblingsr3s rr;z ElementWrapper.previous_siblingsqsC���"�*��m�+���A�$�-�1�A�4�=�A�A�
�#��&�&rc#�NK�tdt��|jEd{V��dS)u�Iterate over ancestors.

        Return an iterator of existing :class:`ElementWrapper` objects for this
        element’s ancestors, in reversed tree order (from :attr:`parent` to the
        root).

        The element itself is not included, this is an empty sequence for the
        root element.

        This method is deprecated and will be removed in version 0.7.0. Use
        :attr:`ancestors` instead.

        zfThis method is deprecated and will be removed in version 0.7.0. Use the "ancestors" attribute instead.N)r�DeprecationWarningr9r3s r�iter_ancestorszElementWrapper.iter_ancestorssD����	
�
5��	 �	 �	 ��>�!�!�!�!�!�!�!�!�!rc#�NK�tdt��|jEd{V��dS)u�Iterate over previous siblings.

        Return an iterator of existing :class:`ElementWrapper` objects for this
        element’s previous siblings, in reversed tree order.

        The element itself is not included, this is an empty sequence for a
        first child or the root element.

        This method is deprecated and will be removed in version 0.7.0. Use
        :attr:`previous_siblings` instead.

        znThis method is deprecated and will be removed in version 0.7.0. Use the "previous_siblings" attribute instead.N)rr=r;r3s r�iter_previous_siblingsz%ElementWrapper.iter_previous_siblings�sE����	
�
=��	 �	 �	 ��)�)�)�)�)�)�)�)�)�)rc#�bK�|j�|V�dS|j���Ed{V��dS)u�Iterate over siblings.

        Return an iterator of newly-created :class:`ElementWrapper` objects for
        this element’s siblings, in tree order.

        N)rr6r3s r�
iter_siblingszElementWrapper.iter_siblings�sI�����;���J�J�J�J�J��{�0�0�2�2�2�2�2�2�2�2�2�2�2rc#�XK�d}|���D]}|r|V�||krd}�dS)u�Iterate over next siblings.

        Return an iterator of newly-created :class:`ElementWrapper` objects for
        this element’s next siblings, in tree order.

        FTN)rB)r'�found�siblings   r�iter_next_siblingsz!ElementWrapper.iter_next_siblings�sR�������)�)�+�+�	�	�G��
��
�
�
��$������		�	rc#�K�d}t|j��D]+\}}t|��|||||j���}|V��,dS)u�Iterate over children.

        Return an iterator of newly-created :class:`ElementWrapper` objects for
        this element’s child elements, in tree order.

        N)rrrr
)�	enumerater"r*r
)r'�child�i�etree_childs    rr6zElementWrapper.iter_children�sm������'��(;�<�<�	�	�N�A�{��D��J�J��D��E�!%�!6�8�8�8�E��K�K�K�K�		�	rc#��K�t|g��g}|r\t|dd��}|�|���n+|V�|�|�����|�ZdSdS)a�Iterate over subtree.

        Return an iterator of newly-created :class:`ElementWrapper` objects for
        the entire subtree rooted at this element, in tree order.

        Unlike in other methods, the element itself *is* included.

        This loops over an entire document:

        .. code-block:: python

            for element in ElementWrapper.from_root(root_etree).iter_subtree():
                ...

        ���N)�iter�next�pop�appendr6)r'�stack�elements   r�iter_subtreezElementWrapper.iter_subtree�s����� �t�f������	6��5��9�d�+�+�G����	�	������
�
�
����W�2�2�4�4�5�5�5�
�	6�	6�	6�	6�	6rc��d�|D��S)Nc��g|]<}t|d��r|gnt|��D]}|j�	|j�|j���=S)�test)rr�pseudo_element�
never_matchesrW)�.0�selector�compiled_selectors   r�
<listcomp>z+ElementWrapper._compile.<locals>.<listcomp>�sr��1�1�1��%�h��7�7�5��
�
�*�8�4�4�1�1�"�!�/�7�!�/�8�
�"�
8�7�7�7rr/)�	selectorss r�_compilezElementWrapper._compile�s#��1�1�%�1�1�1�	1rc�`��t�fd���|��D����S)z�Return wether this elememt matches any of the given selectors.

        :param selectors:
            Each given selector is either a :class:`compiler.CompiledSelector`,
            or an argument to :func:`compile_selector_list`.

        c3�.�K�|]}|���V��dSr r/)rZrWr's  �r�	<genexpr>z)ElementWrapper.matches.<locals>.<genexpr>�s+�����C�C�$�4�4��:�:�C�C�C�C�C�Cr)�anyr_�r'r^s` r�matcheszElementWrapper.matches�s4����C�C�C�C�$�-�-�	�*B�*B�C�C�C�C�C�Crc���|�|���t���dkr(t�d|�����S|r �fd�|���D��St	d��S)a�Return elements, in tree order, that match any of given selectors.

        Selectors are `scoped`_ to the subtree rooted at this element.

        .. _scoped: https://drafts.csswg.org/selectors-4/#scoping

        :param selectors:
            Each given selector is either a :class:`compiler.CompiledSelector`,
            or an argument to :func:`compile_selector_list`.
        :returns:
            An iterator of newly-created :class:`ElementWrapper` objects.

        rrc3�T��K�|]!�t�fd��D������V��"dS)c3�.�K�|]}|���V��dSr r/)rZrWrSs  �rrbz5ElementWrapper.query_all.<locals>.<genexpr>.<genexpr>s+�����7�7��t�t�G�}�}�7�7�7�7�7�7rN)rc)rZrS�testss @�rrbz+ElementWrapper.query_all.<locals>.<genexpr>s[������9�9�#��7�7�7�7��7�7�7�7�7�9��9�9�9�9�9�9rr/)r_�len�filterrTrN)r'r^ris  @r�	query_allzElementWrapper.query_all�s�����
�
�i�(�(���u�:�:��?�?��%��(�D�$5�$5�$7�$7�8�8�8�
�	�9�9�9�9�'+�'8�'8�':�':�9�9�9�
9���8�8�Orc�2�t|j|�d��S)ajReturn first element that matches any of given selectors.

        :param selectors:
            Each given selector is either a :class:`compiler.CompiledSelector`,
            or an argument to :func:`compile_selector_list`.
        :returns:
            A newly-created :class:`ElementWrapper` object,
            or :obj:`None` if there is no match.

        N)rOrlrds  r�queryzElementWrapper.querys���N�D�N�I�.��5�5�5rc�$�d�|jD��S)a%Children as a list of :class:`xml.etree.ElementTree.Element`.

        Other ElementTree nodes such as
        :func:`comments <xml.etree.ElementTree.Comment>` and
        :func:`processing instructions
        <xml.etree.ElementTree.ProcessingInstruction>`
        are not included.

        c�F�g|]}t|jt���|��Sr/)�
isinstance�tag�str)rZrSs  rr]z1ElementWrapper.etree_children.<locals>.<listcomp>,s:��-�-�-���'�+�s�+�+�-��-�-�-r)r!r3s rr"zElementWrapper.etree_children!s&��-�-�#'�#5�-�-�-�	-rc�R�t|jj��\}}||jd<|S)z,The local name of this element, as a string.�
namespace_url��_split_etree_tagr!rr�__dict__�r'ru�
local_names   rrzzElementWrapper.local_name0s.��%5�T�5G�5K�$L�$L�!�
�z�)6��
�o�&��rc�R�t|jj��\}}||jd<|S)z/The namespace URL of this element, as a string.rzrvrys   rruzElementWrapper.namespace_url7s.��%5�T�5G�5K�$L�$L�!�
�z�&0��
�l�#��rc�6�|j�d��S)z$The ID of this element, as a string.�id)r!�getr3s rr}zElementWrapper.id>s���!�%�%�d�+�+�+rc�l�tt|j�dd������S)z:The classes of this element, as a :class:`set` of strings.�class�)�setrr!r~r3s r�classeszElementWrapper.classesCs.���#�D�$6�$:�$:�7�B�$G�$G�H�H�I�I�Irc�&�|j�d��}|�t|��S|jp
|jdk}|r+|j�d��}|�t|��S|j�|jjS|r}d}|j�d��}|D]M}|�dd��}t|��dkr"t|�d	����}�N|�t|��St|j	��pdS)
z*The language of this element, as a string.z*{http://www.w3.org/XML/1998/namespace}langNzhttp://www.w3.org/1999/xhtml�langz"{http://www.w3.org/1999/xhtml}metaz
http-equivr�zcontent-language�content)
r!r~rr
rurr�rN�_parse_content_languager$)r'�xml_lang�is_htmlr�r�iterator�meta�
http_equivs        rr�zElementWrapper.langHs6���%�)�)�*V�W�W�����x�(�(�(��!�
A���"@�@�	��	)��%�)�)�&�1�1�D���"�4�(�(�(��;�"��;�#�#��	5�#���)�.�.�/S�T�T�H� �
T�
T��!�X�X�l�B�7�7�
��z�*�*�.@�@�@�'>�t�x�x�	�?R�?R�'S�'S�$���+�"�#3�4�4�4�&�t�'F�G�G�M�2�Mrc� ��|j�dSd}d�|jjj|ko]|jj�d��duo<|jj�kp,t	�fd�|���D����}|p|jjS)NFz&{http://www.w3.org/1999/xhtml}fieldsetz${http://www.w3.org/1999/xhtml}legend�disabledc3�8�K�|]}|jj�kV��dSr )r!rr)rZrE�legends  �rrbz6ElementWrapper.in_disabled_fieldset.<locals>.<genexpr>nsJ�����8B�8B���)�-��7�8B�8B�8B�8B�8B�8Br)rr!rrr~rcr@�in_disabled_fieldset)r'�fieldset�disabled_fieldsetr�s   @rr�z#ElementWrapper.in_disabled_fieldsetes�����;���5�;��7���K�%�)�X�5�
C��K�%�)�)�*�5�5�T�A�
C��"�&�&�0�B�C�8B�8B�8B�8B�#'�#>�#>�#@�#@�8B�8B�8B�5B�5B�	�!�D�D�K�$D�Drr )T)#�__name__�
__module__�__qualname__�__doc__�classmethodrrrr(r-r0r4r7�propertyr9r;r>r@rBrFr6rT�staticmethodr_rerlrnrr"rzrur}r�r�r�r/rrr
r
	s�������
�
��N�N�N��[�N�$�M�M�M��[�M��R�R�R��[�R�59�'�'�'�'�87�7�7�
#�#�#�6�6�6�(�(�(��
�
��X�
��'�'��X�'�"�"�"�(*�*�*�&
3�
3�
3�������6�6�6�2�1�1��\�1�D�D�D����06�6�6��-�-��_�-�����_������_���,�,��_�,��J�J��_�J��N�N��_�N�8�E�E��_�E�E�Err
c��|�d��}|dks|ddkrd|fS|d|�||dzd�fS)N�}rMr�{r�r)�rfind)rr�positions  rrwrwtsO���y�y��~�~�H��2�~�~��Q��3����3�w���1�X�:���H�Q�J�K�K� 0�0�0rc�n�|�.d|vr,t|��}t|��dkr|dSdSdSdS)N�,rr)rrj)�value�partss  rr�r�|sJ����S��-�-� ��'�'���u�:�:��?�?���8�O���-�-��?rN)�	functoolsr�warningsr�webencodingsr�compilerrrr
rwr�r/rr�<module>r�s���%�%�%�%�%�%�������$�$�$�$�$�$�=�=�=�=�=�=�=�=�hE�hE�hE�hE�hE�hE�hE�hE�V1�1�1�����r

Youez - 2016 - github.com/yon3zu
LinuXploit