@enconvert/render-quality
v0.1.0
Published
Score a rendered web page 0-1 and name why it failed: Cloudflare challenge, WAF block, login wall, empty SPA shell, HTTP error, soft 404. The scorer behind EnConvert's render_quality. Zero dependencies.
Readme
render-quality
Score a rendered web page 0-1 and name why it failed. This is the scorer
behind EnConvert's render_quality, as a zero-dependency library (ESM and
CJS). Full documentation, the deduction table and the Python package live in
the repository README: https://github.com/enconvert/render-quality
npm install @enconvert/render-qualityimport { score, QUALITY_FLOOR } from "@enconvert/render-quality";
const verdict = score(html, { statusCode: response.status });
if (verdict.is_blocked || verdict.render_quality < QUALITY_FLOOR) {
console.warn("failed render", verdict.deductions, verdict.reasons);
} else {
ingest(html);
}Adapters: fromCrawl4ai(result), fromFirecrawl(scrapeJson),
fromJina(markdown, statusCode). Markdown-only input goes through
scoreText, which runs the text-based rules and marks the verdict
html_unavailable.
MIT.
