Parsel
Parsel is a BSD-licensed Python library to extract data from HTML, JSON, and XML documents.
It supports:
JMESPath expressions for JSON documents
Find the Parsel online documentation at https://parsel.readthedocs.org.
Example (open online demo):
>>> from parsel import Selector
>>> text = """
... <html>
... <body>
... <h1>Hello, Parsel!</h1>
... <ul>
... <li><a href="http://example.com">Link 1</a></li>
... <li><a href="http://scrapy.org">Link 2</a></li>
... </ul>
... <script type="application/json">{"a": ["b", "c"]}</script>
... </body>
... </html>"""
>>> selector = Selector(text=text)
>>> selector.css("h1::text").get()
'Hello, Parsel!'
>>> selector.xpath("//h1/text()").re(r"\w+")
['Hello', 'Parsel']
>>> for li in selector.css("ul > li"):
... print(li.xpath(".//@href").get())
...
http://example.com
http://scrapy.org
>>> selector.css("script::text").jmespath("a").get()
'b'
>>> selector.css("script::text").jmespath("a").getall()
['b', 'c']
Release files for parsel 1.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parsel-1.12.0.tar.gz | 113.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parsel-1.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 129.3 kB
Release files / parsel-1.12.0.tar.gz
| Download URL | parsel-1.12.0.tar.gz |
|---|---|
| Size | 113.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25dabcf09578c3d571d905de4428194cf932ce1c736d8961c23886956074e330
|
|
BLAKE2b-256 checksum How to use checksums |
b9a37cc3694c3bf852f656911c29b815a20352d0cb781d79d7bfd647c05b8d7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / parsel-1.12.0-py3-none-any.whl
| Download URL | parsel-1.12.0-py3-none-any.whl |
|---|---|
| Size | 15.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df7b207665c4aa9d4f8c62cea88f6d585e7e1cd1dea84f367dfcb65cb9605b15
|
|
BLAKE2b-256 checksum How to use checksums |
6f5c5cba14535c3fdf3b17bcd613481dd804a0ad7dfbad59f81ec1034e6dc9c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log