feat: add Validate Selected button, Alpha only and No SLD filters to beauty Browse

- /api/validate/batch endpoint: HTTP-check only (no DeepSeek), accepts up to 500 domains
- Validate Selected bulk button: runs validate in 500-domain chunks, shows live/dead summary
- Alpha only checkbox: passes alpha_only=true to /api/domains to exclude hyphens/numbers
- No SLD checkbox: passes no_sld=true to /api/domains to skip com.es / co.uk style domains
- Both flags wired into loadDomains() and resetFilters()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-05 07:59:32 +02:00
parent 5672b61b5e
commit 7ec0304dea
2 changed files with 59 additions and 5 deletions

View File

@@ -188,6 +188,26 @@ async def validator_status():
# ── Pre-screen (shared) ───────────────────────────────────────────────────────
@app.post("/api/validate/batch")
async def validate_batch(body: dict):
"""HTTP-check only — no DeepSeek classification. Fast live/dead check for bulk selection."""
domains_list = body.get("domains", [])
if not domains_list:
return JSONResponse({"error": "no domains provided"}, status_code=400)
if len(domains_list) > 500:
return JSONResponse({"error": "max 500 per batch"}, status_code=400)
from app.prescreener import prescreen_domains
results = await prescreen_domains(domains_list)
await save_prescreen_results(results)
counts: dict = {}
for r in results:
s = r.get("prescreen_status", "dead")
counts[s] = counts.get(s, 0) + 1
return {"total": len(domains_list), "live": counts.get("live", 0),
"dead": counts.get("dead", 0), "parked": counts.get("parked", 0),
"redirect": counts.get("redirect", 0), "error": counts.get("error", 0)}
@app.post("/api/prescreen/batch")
async def prescreen_batch(body: dict):
domains_list = body.get("domains", [])