Skip to main content

htmlparser2

A faithful-shape Python port of fb55/htmlparser2, backed by domonic DOM nodes.

pip install htmlparser2
htmlparser2 page.html --stats
cat page.html | htmlparser2 --text
from htmlparser2 import DomUtils, parseDocument

doc = parseDocument("<ul><li>One<li>Two</ul>")
print(DomUtils.textContent(doc))

It can also register itself as a domonic parser backend:

from domonic import domonic
from htmlparser2 import install_domonic_parser

install_domonic_parser()
page = domonic.parseString("<main><h1>Hello</h1></main>", parser="htmlparser2")

This package is built from the same repository as domonic-libs, but ships as its own top-level import so the umbrella package does not own the parser source.

Metadata

Release files for htmlparser2 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for htmlparser2 0.0.4
File Size Uploaded Provenance Actions
htmlparser2-0.0.4.tar.gz 20.6 kB Without provenance Details for htmlparser2-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for htmlparser2 0.0.4
File Interpreter ABI Platform Actions
htmlparser2-0.0.4-py3-none-any.whl Python 3 none any Details for htmlparser2-0.0.4-py3-none-any.whl

Total release size: 42.8 kB

Release files / htmlparser2-0.0.4.tar.gz

Download URL htmlparser2-0.0.4.tar.gz
Size 20.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6a2dc2d57837e2b52e1bfb23d245bc0a54ebbef42a18ccb875a823284f5a0a0d
BLAKE2b-256 checksum
How to use checksums
6d02a385a3dc3873ec12dd5735eae2a62398d9cb3fe46bf3ee20b9e4afec2590
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / htmlparser2-0.0.4-py3-none-any.whl

Download URL htmlparser2-0.0.4-py3-none-any.whl
Size 22.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b10cf8e1bce758f07fa6959d61fb1a536fbeb7e4ff4c21e2a151b472f096862
BLAKE2b-256 checksum
How to use checksums
888072517e75db227fc12c112bd3b174474ccdb7b7ca8693819d4b4149fdb247
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for htmlparser2 0.0.4

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.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page