• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

docs/src/H16-May-2020-3,9273,158

requirements/H03-May-2022-

soupsieve/H16-May-2020-3,4632,648

soupsieve.egg-info/H03-May-2022-12296

tests/H16-May-2020-7,3145,907

.pyspelling.ymlH A D16-May-20202.2 KiB9389

LICENSE.mdH A D16-May-20201.1 KiB2217

MANIFEST.inH A D16-May-2020426 1615

PKG-INFOH A D16-May-20206 KiB12296

README.mdH A D16-May-20204.2 KiB9772

mkdocs.ymlH A D16-May-20202.8 KiB10498

setup.cfgH A D16-May-202076 85

setup.pyH A D16-May-20202.1 KiB7155

tox.iniH A D16-May-20201,000 5648

README.md

1[![Donate via PayPal][donate-image]][donate-link]
2[![Discord][discord-image]][discord-link]
3[![Build][github-ci-image]][github-ci-link]
4[![Coverage Status][codecov-image]][codecov-link]
5[![PyPI Version][pypi-image]][pypi-link]
6[![PyPI - Python Version][python-image]][pypi-link]
7![License][license-image-mit]
8
9# Soup Sieve
10
11## Overview
12
13Soup Sieve is a CSS selector library designed to be used with [Beautiful Soup 4][bs4]. It aims to provide selecting,
14matching, and filtering using modern CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
15specifications up through the latest CSS level 4 drafts and beyond (though some are not yet implemented).
16
17Soup Sieve was written with the intent to replace Beautiful Soup's builtin select feature, and as of Beautiful Soup
18version 4.7.0, it now is :confetti_ball:. Soup Sieve can also be imported in order to use its API directly for
19more controlled, specialized parsing.
20
21Soup Sieve has implemented most of the CSS selectors up through the latest CSS draft specifications, though there are a
22number that don't make sense in a non-browser environment. Selectors that cannot provide meaningful functionality simply
23do not match anything. Some of the supported selectors are:
24
25- `.classes`
26- `#ids`
27- `[attributes=value]`
28- `parent child`
29- `parent > child`
30- `sibling ~ sibling`
31- `sibling + sibling`
32- `:not(element.class, element2.class)`
33- `:is(element.class, element2.class)`
34- `parent:has(> child)`
35- and [many more](https://facelessuser.github.io/soupsieve/selectors/)
36
37
38## Installation
39
40You must have Beautiful Soup already installed:
41
42```
43pip install beautifulsoup4
44```
45
46In most cases, assuming you've installed version 4.7.0, that should be all you need to do, but if you've installed via
47some alternative method, and Soup Sieve is not automatically installed for your, you can install it directly:
48
49```
50pip install soupsieve
51```
52
53If you want to manually install it from source, navigate to the root of the project and run
54
55```
56python setup.py build
57python setup.py install
58```
59
60## Documentation
61
62Documentation is found here: https://facelessuser.github.io/soupsieve/.
63
64## License
65
66MIT License
67
68Copyright (c) 2018 - 2020 Isaac Muse <isaacmuse@gmail.com>
69
70Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
71documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
72rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
73persons to whom the Software is furnished to do so, subject to the following conditions:
74
75The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
76Software.
77
78THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
79WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
80COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
81OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
82
83[bs4]: https://beautiful-soup-4.readthedocs.io/en/latest/#
84
85[github-ci-image]: https://github.com/facelessuser/soupsieve/workflows/build/badge.svg
86[github-ci-link]: https://github.com/facelessuser/soupsieve/actions?workflow=build
87[discord-image]: https://img.shields.io/discord/678289859768745989?logo=discord&logoColor=aaaaaa&color=mediumpurple&labelColor=333333
88[discord-link]:https://discord.gg/XBnPUZF
89[codecov-image]: https://img.shields.io/codecov/c/github/facelessuser/soupsieve/master.svg?logo=codecov&logoColor=aaaaaa&labelColor=333333
90[codecov-link]: https://codecov.io/github/facelessuser/soupsieve
91[pypi-image]: https://img.shields.io/pypi/v/soupsieve.svg?logo=pypi&logoColor=aaaaaa&labelColor=333333
92[pypi-link]: https://pypi.python.org/pypi/soupsieve
93[python-image]: https://img.shields.io/pypi/pyversions/soupsieve?logo=python&logoColor=aaaaaa&labelColor=333333
94[license-image-mit]: https://img.shields.io/badge/license-MIT-blue.svg?labelColor=333333
95[donate-image]: https://img.shields.io/badge/Donate-PayPal-3fabd1?logo=paypal
96[donate-link]: https://www.paypal.me/facelessuser
97