{
    "content": [
        {
            "type": "text",
            "text": "# soupsieve (pydoc)\n\n**Summary:** soupsieve - Soup Sieve.\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **DESCRIPTION** (24 lines)\n- **PACKAGE CONTENTS** (7 lines)\n- **SUBMODULES** (4 lines)\n- **CLASSES** (5 lines) — 2 subsections\n  - class SelectorSyntaxError (71 lines)\n  - class SoupSieve (220 lines)\n- **FUNCTIONS** (1 lines) — 7 subsections\n  - closest (2 lines)\n  - compile (2 lines)\n  - filter (2 lines)\n  - iselect (2 lines)\n  - match (2 lines)\n  - select (2 lines)\n  - select_one (2 lines)\n- **DATA** (4 lines)\n- **VERSION** (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\nsoupsieve - Soup Sieve.\n\n### DESCRIPTION\n\nA CSS selector filter for BeautifulSoup4.\n\nMIT License\n\nCopyright (c) 2018 Isaac Muse\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n### PACKAGE CONTENTS\n\nmeta\ncssmatch\ncssparser\ncsstypes\npretty\nutil\n\n### SUBMODULES\n\ncm\ncp\nct\n\n### CLASSES\n\nbuiltins.Exception(builtins.BaseException)\nsoupsieve.util.SelectorSyntaxError\nsoupsieve.csstypes.Immutable(builtins.object)\nsoupsieve.cssmatch.SoupSieve\n\n#### class SelectorSyntaxError\n\n|  SelectorSyntaxError(msg: 'str', pattern: 'str | None' = None, index: 'int | None' = None) -> 'None'\n|\n|  Syntax error in a CSS selector.\n|\n|  Method resolution order:\n|      SelectorSyntaxError\n|      builtins.Exception\n|      builtins.BaseException\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, msg: 'str', pattern: 'str | None' = None, index: 'int | None' = None) -> 'None'\n|      Initialize.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  weakref\n|      list of weak references to the object (if defined)\n|\n|  ----------------------------------------------------------------------\n|  Static methods inherited from builtins.Exception:\n|\n|  new(*args, kwargs) from builtins.type\n|      Create and return a new object.  See help(type) for accurate signature.\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from builtins.BaseException:\n|\n|  delattr(self, name, /)\n|      Implement delattr(self, name).\n|\n|  getattribute(self, name, /)\n|      Return getattr(self, name).\n|\n|  reduce(...)\n|      Helper for pickle.\n|\n|  repr(self, /)\n|      Return repr(self).\n|\n|  setattr(self, name, value, /)\n|      Implement setattr(self, name, value).\n|\n|  setstate(...)\n|\n|  str(self, /)\n|      Return str(self).\n|\n|  withtraceback(...)\n|      Exception.withtraceback(tb) --\n|      set self.traceback to tb and return self.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from builtins.BaseException:\n|\n|  cause\n|      exception cause\n|\n|  context\n|      exception context\n|\n|  dict\n|\n|  suppresscontext\n|\n|  traceback\n|\n|  args\n\n#### class SoupSieve\n\n|  SoupSieve(pattern: 'str', selectors: 'ct.SelectorList', namespaces: 'ct.Namespaces | None', custom: 'ct.CustomSelectors | None', flags: 'int')\n|\n|  Compiled Soup Sieve selector matching object.\n|\n|  Method resolution order:\n|      SoupSieve\n|      soupsieve.csstypes.Immutable\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  init(self, pattern: 'str', selectors: 'ct.SelectorList', namespaces: 'ct.Namespaces | None', custom: 'ct.CustomSelectors | None', flags: 'int')\n|      Initialize.\n|\n|  repr(self) -> 'str'\n|      Representation.\n|\n|  str = repr(self) -> 'str'\n|\n|  closest(self, tag: 'bs4.Tag') -> 'bs4.Tag'\n|      Match closest ancestor.\n|\n|  filter(self, iterable: 'Iterable[bs4.Tag]') -> 'list[bs4.Tag]'\n|      Filter.\n|\n|      `CSSMatch` can cache certain searches for tags of the same document,\n|      so if we are given a tag, all tags are from the same document,\n|      and we can take advantage of the optimization.\n|\n|      Any other kind of iterable could have tags from different documents or detached tags,\n|      so for those, we use a new `CSSMatch` for each item in the iterable.\n|\n|  iselect(self, tag: 'bs4.Tag', limit: 'int' = 0) -> 'Iterator[bs4.Tag]'\n|      Iterate the specified tags.\n|\n|  match(self, tag: 'bs4.Tag') -> 'bool'\n|      Match.\n|\n|  select(self, tag: 'bs4.Tag', limit: 'int' = 0) -> 'list[bs4.Tag]'\n|      Select the specified tags.\n|\n|  selectone(self, tag: 'bs4.Tag') -> 'bs4.Tag'\n|      Select a single tag.\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  custom\n|\n|  flags\n|\n|  namespaces\n|\n|  pattern\n|\n|  selectors\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  annotations = {'custom': 'dict[str, str]', 'flags': 'int', 'namesp...\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from soupsieve.csstypes.Immutable:\n|\n|  eq(self, other: 'Any') -> 'bool'\n|      Equal.\n|\n|  hash(self) -> 'int'\n|      Hash.\n|\n|  ne(self, other: 'Any') -> 'bool'\n|      Equal.\n|\n|  setattr(self, name: 'str', value: 'Any') -> 'None'\n|      Prevent mutability.\n|\n|  pretty(self) -> 'None'\n|      Pretty print.\n|\n|  ----------------------------------------------------------------------\n|  Class methods inherited from soupsieve.csstypes.Immutable:\n|\n|  base = class Immutable(builtins.object)\n|   |  base(kwargs: 'Any') -> 'None'\n|   |\n|   |  Immutable.\n|   |\n|   |  Methods defined here:\n|   |\n|   |  eq(self, other: 'Any') -> 'bool'\n|   |      Equal.\n|   |\n|   |  hash(self) -> 'int'\n|   |      Hash.\n|   |\n|   |  init(self, kwargs: 'Any') -> 'None'\n|   |      Initialize.\n|   |\n|   |  ne(self, other: 'Any') -> 'bool'\n|   |      Equal.\n|   |\n|   |  repr(self) -> 'str'\n|   |      Representation.\n|   |\n|   |  setattr(self, name: 'str', value: 'Any') -> 'None'\n|   |      Prevent mutability.\n|   |\n|   |  str = repr(self) -> 'str'\n|   |\n|   |  pretty(self) -> 'None'\n|   |      Pretty print.\n|   |\n|   |  ----------------------------------------------------------------------\n|   |  Class methods defined here:\n|   |\n|   |  base = class object\n|   |   |  The base class of the class hierarchy.\n|   |   |\n|   |   |  When called, it accepts no arguments and returns a new featureless\n|   |   |  instance that has no instance attributes and cannot be given any.\n|   |   |\n|   |   |  Built-in subclasses:\n|   |   |      anextawaitable\n|   |   |      asyncgenerator\n|   |   |      asyncgeneratorasend\n|   |   |      asyncgeneratorathrow\n|   |   |      ... and 85 other subclasses\n|   |   |\n|   |   |  Methods defined here:\n|   |   |\n|   |   |  delattr(self, name, /)\n|   |   |      Implement delattr(self, name).\n|   |   |\n|   |   |  dir(self, /)\n|   |   |      Default dir() implementation.\n|   |   |\n|   |   |  eq(self, value, /)\n|   |   |      Return self==value.\n|   |   |\n|   |   |  format(self, formatspec, /)\n|   |   |      Default object formatter.\n|   |   |\n|   |   |  ge(self, value, /)\n|   |   |      Return self>=value.\n|   |   |\n|   |   |  getattribute(self, name, /)\n|   |   |      Return getattr(self, name).\n|   |   |\n|   |   |  gt(self, value, /)\n|   |   |      Return self>value.\n|   |   |\n|   |   |  hash(self, /)\n|   |   |      Return hash(self).\n|   |   |\n|   |   |  init(self, /, *args, kwargs)\n|   |   |      Initialize self.  See help(type(self)) for accurate signature.\n|   |   |\n|   |   |  le(self, value, /)\n|   |   |      Return self<=value.\n|   |   |\n|   |   |  lt(self, value, /)\n|   |   |      Return self<value.\n|   |   |\n|   |   |  ne(self, value, /)\n|   |   |      Return self!=value.\n|   |   |\n|   |   |  reduce(self, /)\n|   |   |      Helper for pickle.\n|   |   |\n|   |   |  reduceex(self, protocol, /)\n|   |   |      Helper for pickle.\n|   |   |\n|   |   |  repr(self, /)\n|   |   |      Return repr(self).\n|   |   |\n|   |   |  setattr(self, name, value, /)\n|   |   |      Implement setattr(self, name, value).\n|   |   |\n|   |   |  sizeof(self, /)\n|   |   |      Size of object in memory, in bytes.\n|   |   |\n|   |   |  str(self, /)\n|   |   |      Return str(self).\n|   |   |\n|   |   |  ----------------------------------------------------------------------\n|   |   |  Class methods defined here:\n|   |   |\n|   |   |  initsubclass(...) from builtins.type\n|   |   |      This method is called when a class is subclassed.\n|   |   |\n|   |   |      The default implementation does nothing. It may be\n|   |   |      overridden to extend subclasses.\n|   |   |\n|   |   |  subclasshook(...) from builtins.type\n|   |   |      Abstract classes can override this to customize issubclass().\n|   |   |\n|   |   |      This is invoked early on by abc.ABCMeta.subclasscheck().\n|   |   |      It should return True, False or NotImplemented.  If it returns\n|   |   |      NotImplemented, the normal algorithm is used.  Otherwise, it\n|   |   |      overrides the normal algorithm (and the outcome is cached).\n|   |   |\n|   |   |  ----------------------------------------------------------------------\n|   |   |  Static methods defined here:\n|   |   |\n|   |   |  new(*args, kwargs) from builtins.type\n|   |   |      Create and return a new object.  See help(type) for accurate signature.\n|   |   |\n|   |   |  ----------------------------------------------------------------------\n|   |   |  Data and other attributes defined here:\n|   |   |\n|   |   |  class = <class 'type'>\n|   |   |      type(object) -> the object's type\n|   |   |      type(name, bases, dict, kwds) -> a new type\n|   |\n|   |  ----------------------------------------------------------------------\n|   |  Data and other attributes defined here:\n|   |\n|   |  annotations = {'slots': 'tuple[str, ...]', 'hash': 'int'}\n\n### FUNCTIONS\n\n#### closest\n\nMatch closest ancestor.\n\n#### compile\n\nCompile CSS pattern.\n\n#### filter\n\nFilter list of nodes.\n\n#### iselect\n\nIterate the specified tags.\n\n#### match\n\nMatch node.\n\n#### select\n\nSelect the specified tags.\n\n#### select_one\n\nSelect a single tag.\n\n### DATA\n\nDEBUG = 1\nall = ('DEBUG', 'SelectorSyntaxError', 'SoupSieve', 'closest', 'co...\nversioninfo = Version(major=2, minor=6, micro=0, release='final',...\n\n### VERSION\n\n2.6\n\n### FILE\n\n/home/chedong/.local/lib/python3.10/site-packages/soupsieve/init.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "soupsieve",
        "section": "",
        "mode": "pydoc",
        "summary": "soupsieve - Soup Sieve.",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "PACKAGE CONTENTS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "SUBMODULES",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 5,
                "subsections": [
                    {
                        "name": "class SelectorSyntaxError",
                        "lines": 71
                    },
                    {
                        "name": "class SoupSieve",
                        "lines": 220
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "closest",
                        "lines": 2
                    },
                    {
                        "name": "compile",
                        "lines": 2
                    },
                    {
                        "name": "filter",
                        "lines": 2
                    },
                    {
                        "name": "iselect",
                        "lines": 2
                    },
                    {
                        "name": "match",
                        "lines": 2
                    },
                    {
                        "name": "select",
                        "lines": 2
                    },
                    {
                        "name": "select_one",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}