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.2.3.tar.gz
(144.3 kB
view hashes)
Built Distribution
campbells-0.2.3-py3-none-any.whl
(169.5 kB
view hashes)
Close
Hashes for campbells-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8861dffa3aef0316970905f234a6ed37bad6f6f838b986ef0532dc8cb63da40b |
|
MD5 | c0865a16c725a7a67b63df3a233f4c7b |
|
BLAKE2b-256 | 711dc39dd0b03f7b5961b740c2fab9db13162d183ca0a3524e138731db07a981 |