A condensed web scraping library.
Project description
Adapted from beautifulsoup4's inner package, then linted, refactored, reduced, and seasoned to taste.
Development
To run pre-commit checks and tests:
pre-commit run --all-files && pdm run python -m pytest
Examples
To parse a string as HTML, your reciple should call for CampbellsSoup
:
from campbells import CampbellsSoup
html_str = "<html><body><p>Hello world!</p></body></html>"
soup = CampbellsSoup(html_str)
Installation
Campbells is available on PyPi:
pip install campbells
The dependencies needed to use html5lib
and lxml
parsers are not installed by default.
They can be installed with:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
campbells-0.3.0.tar.gz
(145.3 kB
view hashes)
Built Distribution
campbells-0.3.0-py3-none-any.whl
(173.4 kB
view hashes)
Close
Hashes for campbells-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40b3bf04eb7ca46621b03b6c06329ce778344ecbdd484885b8f4ff2f178ffa8c |
|
MD5 | f4ae49a5e31e964bf9771180423e0820 |
|
BLAKE2b-256 | 90370d08f0064ce7a627ae97bafe39af3774fd45f5952bf65414613f3d7c9429 |