Skip to main content

Listract

Listract = List + Extract. Structural list extraction from raw HTML: decide whether the page is a list, identify the main list container, and return cleaned entries as one shared JSON model.

The Python package bundles the extraction model. No separate model download is required.

Install

pip install listract

Requires Python 3.9 or newer.

For browser-rendered pages:

pip install "listract[browser]"

The optional browser extra requires playwright>=1.60. On Python 3.9 pip resolves Playwright 1.60; Python 3.10+ resolves current Playwright releases.

Quickstart

from listract import ListExtractor

html = open("page.html", encoding="utf-8").read()

extractor = ListExtractor()
result = extractor.extract_html(
    html,
    "https://example.com/list",  # replace with the page URL the HTML came from
)

print(result["status"])                  # list / no_list
print(result["production"]["action"])    # fast_list / review / slow_no
print(len(result["entries"]))            # cleaned list entries

ListExtractor() loads the bundled model from inside the wheel. Set LIST_EXTRACT_MODEL_DIR only when overriding it with a custom model.

What it returns

Listract returns a shared JSON contract covering:

  • page-level status (list / no_list)
  • production action
  • the selected list container
  • cleaned entries and their links
  • manifest and verification helpers

License

MIT

Metadata

Release files for listract 0.1.1

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

Source distribution (sdist)

Source distribution for listract 0.1.1
File Size Uploaded Provenance Actions
listract-0.1.1.tar.gz 1.8 MB Without provenance Details for listract-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 3.8 MB

Release files / listract-0.1.1.tar.gz

Download URL listract-0.1.1.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
3e3d716ca31921a1dafe85aaea27530e2a1ab2afe902c6d450b1bf3ab841d4ff
BLAKE2b-256 checksum
How to use checksums
f8734b62df90a5f76ff387490659063b49dc8405f2112e63a9e2da07980029f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / listract-0.1.1-py3-none-any.whl

Download URL listract-0.1.1-py3-none-any.whl
Size 2.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3c100a1791d054b97650d617de22333a14f93b45930d289576bf5f4d3becd3be
BLAKE2b-256 checksum
How to use checksums
17933ef70b84c21ef716f9a2d27e9b045ba5ed4a01d54dc872d3ef02122175e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for listract 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.

Release history Release notifications | RSS feed

This release

0.1.1 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