soupsieve - pydoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


soupsieve
NAME DESCRIPTION PACKAGE CONTENTS SUBMODULES CLASSES FUNCTIONS DATA VERSION FILE
Help on package soupsieve:

NAME
    soupsieve - Soup Sieve.

DESCRIPTION
    A CSS selector filter for BeautifulSoup4.

    MIT License

    Copyright (c) 2018 Isaac Muse

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.

PACKAGE CONTENTS
    __meta__
    css_match
    css_parser
    css_types
    pretty
    util

SUBMODULES
    cm
    cp
    ct

CLASSES
    builtins.Exception(builtins.BaseException)
        soupsieve.util.SelectorSyntaxError
    soupsieve.css_types.Immutable(builtins.object)
        soupsieve.css_match.SoupSieve

    class SelectorSyntaxError(builtins.Exception)
     |  SelectorSyntaxError(msg: 'str', pattern: 'str | None' = None, index: 'int | None' = None) -> 'None'
     |
     |  Syntax error in a CSS selector.
     |
     |  Method resolution order:
     |      SelectorSyntaxError
     |      builtins.Exception
     |      builtins.BaseException
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, msg: 'str', pattern: 'str | None' = None, index: 'int | None' = None) -> 'None'
     |      Initialize.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __weakref__
     |      list of weak references to the object (if defined)
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.Exception:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.BaseException:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __reduce__(...)
     |      Helper for pickle.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  __setstate__(...)
     |
     |  __str__(self, /)
     |      Return str(self).
     |
     |  with_traceback(...)
     |      Exception.with_traceback(tb) --
     |      set self.__traceback__ to tb and return self.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.BaseException:
     |
     |  __cause__
     |      exception cause
     |
     |  __context__
     |      exception context
     |
     |  __dict__
     |
     |  __suppress_context__
     |
     |  __traceback__
     |
     |  args

    class SoupSieve(soupsieve.css_types.Immutable)
     |  SoupSieve(pattern: 'str', selectors: 'ct.SelectorList', namespaces: 'ct.Namespaces | None', custom: 'ct.CustomSelectors | None', flags: 'int')
     |
     |  Compiled Soup Sieve selector matching object.
     |
     |  Method resolution order:
     |      SoupSieve
     |      soupsieve.css_types.Immutable
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, pattern: 'str', selectors: 'ct.SelectorList', namespaces: 'ct.Namespaces | None', custom: 'ct.CustomSelectors | None', flags: 'int')
     |      Initialize.
     |
     |  __repr__(self) -> 'str'
     |      Representation.
     |
     |  __str__ = __repr__(self) -> 'str'
     |
     |  closest(self, tag: 'bs4.Tag') -> 'bs4.Tag'
     |      Match closest ancestor.
     |
     |  filter(self, iterable: 'Iterable[bs4.Tag]') -> 'list[bs4.Tag]'
     |      Filter.
     |
     |      `CSSMatch` can cache certain searches for tags of the same document,
     |      so if we are given a tag, all tags are from the same document,
     |      and we can take advantage of the optimization.
     |
     |      Any other kind of iterable could have tags from different documents or detached tags,
     |      so for those, we use a new `CSSMatch` for each item in the iterable.
     |
     |  iselect(self, tag: 'bs4.Tag', limit: 'int' = 0) -> 'Iterator[bs4.Tag]'
     |      Iterate the specified tags.
     |
     |  match(self, tag: 'bs4.Tag') -> 'bool'
     |      Match.
     |
     |  select(self, tag: 'bs4.Tag', limit: 'int' = 0) -> 'list[bs4.Tag]'
     |      Select the specified tags.
     |
     |  select_one(self, tag: 'bs4.Tag') -> 'bs4.Tag'
     |      Select a single tag.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  custom
     |
     |  flags
     |
     |  namespaces
     |
     |  pattern
     |
     |  selectors
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {'custom': 'dict[str, str]', 'flags': 'int', 'namesp...
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from soupsieve.css_types.Immutable:
     |
     |  __eq__(self, other: 'Any') -> 'bool'
     |      Equal.
     |
     |  __hash__(self) -> 'int'
     |      Hash.
     |
     |  __ne__(self, other: 'Any') -> 'bool'
     |      Equal.
     |
     |  __setattr__(self, name: 'str', value: 'Any') -> 'None'
     |      Prevent mutability.
     |
     |  pretty(self) -> 'None'
     |      Pretty print.
     |
     |  ----------------------------------------------------------------------
     |  Class methods inherited from soupsieve.css_types.Immutable:
     |
     |  __base__ = class Immutable(builtins.object)
     |   |  __base__(**kwargs: 'Any') -> 'None'
     |   |
     |   |  Immutable.
     |   |
     |   |  Methods defined here:
     |   |
     |   |  __eq__(self, other: 'Any') -> 'bool'
     |   |      Equal.
     |   |
     |   |  __hash__(self) -> 'int'
     |   |      Hash.
     |   |
     |   |  __init__(self, **kwargs: 'Any') -> 'None'
     |   |      Initialize.
     |   |
     |   |  __ne__(self, other: 'Any') -> 'bool'
     |   |      Equal.
     |   |
     |   |  __repr__(self) -> 'str'
     |   |      Representation.
     |   |
     |   |  __setattr__(self, name: 'str', value: 'Any') -> 'None'
     |   |      Prevent mutability.
     |   |
     |   |  __str__ = __repr__(self) -> 'str'
     |   |
     |   |  pretty(self) -> 'None'
     |   |      Pretty print.
     |   |
     |   |  ----------------------------------------------------------------------
     |   |  Class methods defined here:
     |   |
     |   |  __base__ = class object
     |   |   |  The base class of the class hierarchy.
     |   |   |
     |   |   |  When called, it accepts no arguments and returns a new featureless
     |   |   |  instance that has no instance attributes and cannot be given any.
     |   |   |
     |   |   |  Built-in subclasses:
     |   |   |      anext_awaitable
     |   |   |      async_generator
     |   |   |      async_generator_asend
     |   |   |      async_generator_athrow
     |   |   |      ... and 85 other subclasses
     |   |   |
     |   |   |  Methods defined here:
     |   |   |
     |   |   |  __delattr__(self, name, /)
     |   |   |      Implement delattr(self, name).
     |   |   |
     |   |   |  __dir__(self, /)
     |   |   |      Default dir() implementation.
     |   |   |
     |   |   |  __eq__(self, value, /)
     |   |   |      Return self==value.
     |   |   |
     |   |   |  __format__(self, format_spec, /)
     |   |   |      Default object formatter.
     |   |   |
     |   |   |  __ge__(self, value, /)
     |   |   |      Return self>=value.
     |   |   |
     |   |   |  __getattribute__(self, name, /)
     |   |   |      Return getattr(self, name).
     |   |   |
     |   |   |  __gt__(self, value, /)
     |   |   |      Return self>value.
     |   |   |
     |   |   |  __hash__(self, /)
     |   |   |      Return hash(self).
     |   |   |
     |   |   |  __init__(self, /, *args, **kwargs)
     |   |   |      Initialize self.  See help(type(self)) for accurate signature.
     |   |   |
     |   |   |  __le__(self, value, /)
     |   |   |      Return self<=value.
     |   |   |
     |   |   |  __lt__(self, value, /)
     |   |   |      Return self<value.
     |   |   |
     |   |   |  __ne__(self, value, /)
     |   |   |      Return self!=value.
     |   |   |
     |   |   |  __reduce__(self, /)
     |   |   |      Helper for pickle.
     |   |   |
     |   |   |  __reduce_ex__(self, protocol, /)
     |   |   |      Helper for pickle.
     |   |   |
     |   |   |  __repr__(self, /)
     |   |   |      Return repr(self).
     |   |   |
     |   |   |  __setattr__(self, name, value, /)
     |   |   |      Implement setattr(self, name, value).
     |   |   |
     |   |   |  __sizeof__(self, /)
     |   |   |      Size of object in memory, in bytes.
     |   |   |
     |   |   |  __str__(self, /)
     |   |   |      Return str(self).
     |   |   |
     |   |   |  ----------------------------------------------------------------------
     |   |   |  Class methods defined here:
     |   |   |
     |   |   |  __init_subclass__(...) from builtins.type
     |   |   |      This method is called when a class is subclassed.
     |   |   |
     |   |   |      The default implementation does nothing. It may be
     |   |   |      overridden to extend subclasses.
     |   |   |
     |   |   |  __subclasshook__(...) from builtins.type
     |   |   |      Abstract classes can override this to customize issubclass().
     |   |   |
     |   |   |      This is invoked early on by abc.ABCMeta.__subclasscheck__().
     |   |   |      It should return True, False or NotImplemented.  If it returns
     |   |   |      NotImplemented, the normal algorithm is used.  Otherwise, it
     |   |   |      overrides the normal algorithm (and the outcome is cached).
     |   |   |
     |   |   |  ----------------------------------------------------------------------
     |   |   |  Static methods defined here:
     |   |   |
     |   |   |  __new__(*args, **kwargs) from builtins.type
     |   |   |      Create and return a new object.  See help(type) for accurate signature.
     |   |   |
     |   |   |  ----------------------------------------------------------------------
     |   |   |  Data and other attributes defined here:
     |   |   |
     |   |   |  __class__ = <class 'type'>
     |   |   |      type(object) -> the object's type
     |   |   |      type(name, bases, dict, **kwds) -> a new type
     |   |
     |   |  ----------------------------------------------------------------------
     |   |  Data and other attributes defined here:
     |   |
     |   |  __annotations__ = {'__slots__': 'tuple[str, ...]', '_hash': 'int'}

FUNCTIONS
    closest(select: 'str', tag: 'bs4.Tag', namespaces: 'dict[str, str] | None' = None, flags: 'int' = 0, *, custom: 'dict[str, str] | None' = None, **kwargs: 'Any') -> 'bs4.Tag'
        Match closest ancestor.

    compile(pattern: 'str', namespaces: 'dict[str, str] | None' = None, flags: 'int' = 0, *, custom: 'dict[str, str] | None' = None, **kwargs: 'Any') -> 'cm.SoupSieve'
        Compile CSS pattern.

    filter(select: 'str', iterable: 'Iterable[bs4.Tag]', namespaces: 'dict[str, str] | None' = None, flags: 'int' = 0, *, custom: 'dict[str, str] | None' = None, **kwargs: 'Any') -> 'list[bs4.Tag]'
        Filter list of nodes.

    iselect(select: 'str', tag: 'bs4.Tag', namespaces: 'dict[str, str] | None' = None, limit: 'int' = 0, flags: 'int' = 0, *, custom: 'dict[str, str] | None' = None, **kwargs: 'Any') -> 'Iterator[bs4.Tag]'
        Iterate the specified tags.

    match(select: 'str', tag: 'bs4.Tag', namespaces: 'dict[str, str] | None' = None, flags: 'int' = 0, *, custom: 'dict[str, str] | None' = None, **kwargs: 'Any') -> 'bool'
        Match node.

    select(select: 'str', tag: 'bs4.Tag', namespaces: 'dict[str, str] | None' = None, limit: 'int' = 0, flags: 'int' = 0, *, custom: 'dict[str, str] | None' = None, **kwargs: 'Any') -> 'list[bs4.Tag]'
        Select the specified tags.

    select_one(select: 'str', tag: 'bs4.Tag', namespaces: 'dict[str, str] | None' = None, flags: 'int' = 0, *, custom: 'dict[str, str] | None' = None, **kwargs: 'Any') -> 'bs4.Tag'
        Select a single tag.

DATA
    DEBUG = 1
    __all__ = ('DEBUG', 'SelectorSyntaxError', 'SoupSieve', 'closest', 'co...
    __version_info__ = Version(major=2, minor=6, micro=0, release='final',...

VERSION
    2.6

FILE
    /home/chedong/.local/lib/python3.10/site-packages/soupsieve/__init__.py



Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:16 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top