SPB Git forge

spb/rareindex

Public
54commits 1branches 0releases
7.1 MBsize
maindefault branch
10 days agolast push
TypeScript 61.9% HTML 37.2% SQL 0.7%
1.1 KB · 15 lines markdown
Rendered Raw Blame History
1# psa-cert — PSA certificate verification23Verifies PSA cert numbers against the public page `https://www.psacard.com/cert/<cert>` (Firecrawl render, Scrapfly4fallback; the site serves a Cloudflare challenge to plain HTTP). One request per cert — the cert space is never5enumerated. APR and the population report proper are login-gated and never touched.67- **Input**: `ctx.options.seeds` (cert numbers or `psacard.com/cert/...` URLs), `config.certs`, or `lookup(url)`.8  `certUrl(cert)` builds the canonical verify URL; `certFromUrl(url)` accepts `/cert/<n>`, `/cert/<n>/psa`, `/en-CA/cert/<n>`.9- **Output**: `catalog_item` (description, set/brand, subject, card number, year, category, grade + qualifier,10  `identifiers.psa_cert` + `psa_spec_id`, cert images, PSA Estimate in metadata) and a partial `population_report`11  (`byGrade = { <grade>: n, higher: m }`, `metadata.population_scope = grade_and_higher`).12- **Not found** → zero records, no throw.13- Fixtures: `data/fixtures/psa-cert/` (live captures, trimmed `<main>`). Rebuild:14  `pnpm tsx connectors/firecrawl/_g2-grading-lib/capture.ts psa-cert charizard-psa10=69211238 not-found=99999999`.15