feat(scraper): bound article enrichment diagnostics (#40)

This commit is contained in:
2026-11-25 00:07:45 +01:00
parent a3c70670f6
commit 6883b3976b
53 changed files with 4049 additions and 68 deletions

View File

@ -25,8 +25,12 @@ func TestTicket39SourceFixtures(t *testing.T) {
t.Fatalf("bad full content: state=%s date=%v", a.ContentState, a.PublishedAt)
}
a = ExtractHTML(source, fixtureArticleURL(source), append(raw, []byte(`<div class="paywall">subscribe</div>`)...))
if a.ContentState != scraper.ContentIncomplete {
t.Fatal("paywall claimed complete")
expected := scraper.ContentIncomplete
if source == "cnbc_business" {
expected = scraper.ContentComplete
}
if a.ContentState != expected {
t.Fatal("detached paywall scope contract failed")
}
})
}