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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file campbells-0.3.0.tar.gz.
File metadata
- Download URL: campbells-0.3.0.tar.gz
- Upload date:
- Size: 145.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.8.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0c2e4d47e8f9eed71fbe1b44daacb7d950bdca877341b22dfe2aee3d3891654
|
|
| MD5 |
71b3ae25abdc425069b897fe5feb5a1b
|
|
| BLAKE2b-256 |
22d0319df779ad1fb74df055066ea003cc0e595a9a6bcb48eff60594067bc0a2
|
File details
Details for the file campbells-0.3.0-py3-none-any.whl.
File metadata
- Download URL: campbells-0.3.0-py3-none-any.whl
- Upload date:
- Size: 173.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.8.2 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40b3bf04eb7ca46621b03b6c06329ce778344ecbdd484885b8f4ff2f178ffa8c
|
|
| MD5 |
f4ae49a5e31e964bf9771180423e0820
|
|
| BLAKE2b-256 |
90370d08f0064ce7a627ae97bafe39af3774fd45f5952bf65414613f3d7c9429
|