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.
List extraction,
without the template tax.
One JSON model. Two native runtimes. Deterministic list detection, container selection, and production routing for Python and Go.
Templates rot. Selectors break. Listract treats “is this a list?” as a structural model problem — and keeps the answer auditable.
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.
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.
Every result carries a status, a container, clean entries, input health, and a routing action: fast list, review, or slow no.
Ranked by the work they do, not by stars. These are the paths that turn raw HTML into a defensible list decision.
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;
Same input, same model, two runtimes. The production decision is identical on all 1,820 pages; numeric tails are documented, not hidden.
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)