Xcrap Parser
Xcrap Parser is a declarative, model-driven parser for extracting data from HTML and JSON files, with the ability to interleave both to extract even more information.
It is inspired by the parser embedded in the Xcrap Framework available for Node.js. It was built using Parsel for HTML parsing and JMESPath for JSON parsing.
Installation
pip install xcrap-parser
Simple Usage
from xcrap_parser import HtmlParsingModel
html = "<html><title>Title</title><body><h1>Heading</h1></body></html>"
root_parsing_model = HtmlParsingModel({
"title": {
"query": "title::text"
},
"heading": {
"query": "h1::text"
}
})
data = root_parsing_model.parse(html)
print(data)
Metadata
Release files for xcrap-parser 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xcrap_parser-0.1.1.tar.gz | 2.9 kB | Without provenance | Details for xcrap_parser-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xcrap_parser-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for xcrap_parser-0.1.1-py3-none-any.whl |
Total release size: 7.7 kB
Release files / xcrap_parser-0.1.1.tar.gz
| Download URL | xcrap_parser-0.1.1.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a72a120914054f31e494b6852314fd8507c0ee3595a80816565eaf78336e9acd
|
|
BLAKE2b-256 checksum How to use checksums |
b583392d85491696504a296d874d42661884f91e7041b4b0ee739b3b42ed93a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Windows/10
|
Release files / xcrap_parser-0.1.1-py3-none-any.whl
| Download URL | xcrap_parser-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
412805eebd452ecc5d44418bcd8facd57e33830550b32511d75f161eadbe8e92
|
|
BLAKE2b-256 checksum How to use checksums |
4baf2ab6fe18dde51af3993b49a06097d28f54523013ca8482c72b899ecb1fa9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.2 Windows/10
|
Security for xcrap-parser 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.