Open source · v0.1.1

Listract/

List extraction,
without the template tax.

One JSON model. Two native runtimes. Deterministic list detection, container selection, and production routing for Python and Go.

PublicPython 3.9+ Go 1.23+JSON model
No HTTP serviceNo CGONo site-specific selectors
2
Native runtimes
134+162
Feature dimensions
85ms
Go cold model load
0
Decision diffs · 1820 pages
Why Listract

The list is the interface.

Templates rot. Selectors break. Listract treats “is this a list?” as a structural model problem — and keeps the answer auditable.

01 / SIGNAL

No template debt

Candidate ranking and a page-level model replace site-by-site rules. A redesign changes the DOM; it does not require a new selector zoo.

134D ranker700 trees
02 / CONTRACT

Two runtimes, one model

Python uses lxml. Go uses x/net/html. Both interpret the same JSON forests and expose the same semantic output — no service hop, no CGO.

PythonGo
03 / TRIAGE

Built for production

Every result carries a status, a container, clean entries, input health, and a routing action: fast list, review, or slow no.

fast_listreview / slow_no
Repository pulse

Trending inside the repo.

Ranked by the work they do, not by stars. These are the paths that turn raw HTML into a defensible list decision.

Architecture

Two lanes. One verdict.

Candidate evidence and page evidence meet at a container decision. Nothing is fetched, proxied, or hand-waved.

flowchart TB
  A["Raw HTML + URL"] --> B["DOM parse"]
  B --> C["Candidate generation"]
  C --> D["134D candidate features"]
  C --> E["162D page features"]
  D --> F["Candidate ranker · 700 trees"]
  E --> G["Page model · 700 trees"]
  F --> H["Top-K candidates"]
  G --> I["list / no_list"]
  H --> J["Container fusion
0.75 model + 0.25 structure"] I --> J J --> K["Entry cleaning + URL normalization"] K --> L["production.action + input_health"] classDef input fill:#10131c,stroke:#394154,color:#e9edf5; classDef python fill:#151326,stroke:#8b5cf6,color:#e9edf5; classDef page fill:#0b1720,stroke:#22d3ee,color:#e9edf5; classDef output fill:#0e1a14,stroke:#3fb950,color:#e9edf5; class A,B input; class C,D,F,H,J,K python; class E,G,I page; class L output;
Quality baseline

Parity is the feature.

Same input, same model, two runtimes. The production decision is identical on all 1,820 pages; numeric tails are documented, not hidden.

status / page_status1820 / 1820
production.action1820 / 1820
entries · non-URL fields14227 / 14227
list_prob1811 / 1820 · max 0.0129
top_prob1801 / 1820 · max 0.0923
main_selector1819 / 1820 · 1627 path
Quickstart

Model included. Start now.

No second download. Python wheel carries the JSON model; Go compiles it into the binary with go:embed.

# pip install listract
from listract import ListExtractor

extractor = ListExtractor()          # bundled model
result = extractor.extract_html(raw_html, page_url)

print(result["status"])               # list / no_list
print(result["main"]["selector"])  # main container
print(result["production"]["action"])
// go build ./cmd/extract
import listract "github.com/isesword/Listract/go"

ext, err := listract.LoadEmbedded()   // model in binary
if err != nil { panic(err) }

result, err := ext.ExtractHTML(rawHTML, pageURL, nil)
if err != nil { panic(err) }

fmt.Println(result.Status)
fmt.Println(result.Production.Action)
$ pip install listract
$ git clone https://github.com/isesword/Listract.git
$ cd Listract/go && go test ./...
Python 3.9+ · Go 1.23+
model included in both artifacts
Terminal demo: curl downloads one HTML document, ListExtractor prints status, selector, and 19 entries
REAL RUN 1 HTML → 1 <ol> → 19 <li> entries · python.org/jobs
Full docs: README.md · AGENT.md · docs/PARITY.md · docs/DISTRIBUTION.md