Back to Work
Multiregion Results Agent — 59-Source Acquisition System
Data Engineering
Demo

Multiregion Results Agent — 59-Source Acquisition System

One person, ten days: a resilient acquisition system that collects, validates, and archives official draw results from 59 incompatible sources — without solving a single CAPTCHA or using stealth evasion

Next.js 15React 19TypeScriptFastAPIPostgreSQL 16PlaywrightDocker
59
Official sources
100%
Acquisition success
184K+
Official draws archived
10 days
Build time
0
CAPTCHA solves
US + CA + EU
Regions

Fifty-nine official publishers in three regions, no two alike: JSON APIs, server-rendered tables, JavaScript applications, PDF documents, bot-protected pages, and geo-restricted endpoints. There is no common feed, and no aggregator carries complete coverage. The hard part is not storing the data — it is acquiring it from all of them, reliably, politely, and sustainably.

Multiregion Results Agent is a single-author engineering case study: a compliant acquisition engine that respects robots.txt, budgets requests per host with jitter, saves every raw page before parsing, and never solves a CAPTCHA or uses stealth evasion — protected sources wait for an assisted manual import. Everything lands in a local PostgreSQL archive: a searchable dashboard, per-jurisdiction pages, date-range reports with streaming Excel export, derived next-draw schedules, and an honest probability lab.

The Problem

Official draw results are scattered across 59 incompatible publishers in the US, Canada, and Europe. Some expose JSON APIs; some serve server-rendered HTML; some are JavaScript applications that need a browser; some publish PDFs; some sit behind bot protection or geo-restrictions. There is no common feed, and aggregators don't carry complete coverage.

The engineering problem isn't storage — it's acquisition. Fetch all 59 without a single CAPTCHA solve or stealth evasion, stay within robots.txt and per-host politeness budgets, keep geo-restricted pages reachable, and lose nothing: every raw response must be archived before parsing so a source can never be lost, even if its parser doesn't exist yet.

The Approach

A three-tier fetch pipeline built around compliance instead of evasion:

  1. Direct tier — httpx with browser-header profiles for plain HTML and JSON API sources.
  2. Browser tier — containerized Chromium via Playwright for JavaScript-rendered pages, only when the direct tier fails with 403/406/5xx/timeout.
  3. API tier — first-class JSON endpoints (e.g. Mega Millions).

Around the tiers, the discipline layer: robots.txt checks, ≥2s per-host delay with jitter, one concurrent request per host, exponential backoff, and every raw page saved before parsing. Geo-aware egress through a controlled VPN with per-jurisdiction exit pins unlocks region-locked official pages. Sources are classified api | html | js | restricted; restricted sites are never fetched automatically — they go to an assisted import queue (scripts/import_manual.py, POST /api/import).

A fleet of per-source parsers with fixture-tested coverage normalizes each format into PostgreSQL 16 (jurisdictions · draws · raw_pages · logs). Simple HTML sources can be added via backend/sources.json with CSS selectors — no Python required. The web is queried once at acquisition time and never at read time.

On top sits the Next.js dashboard: per-jurisdiction pages, date-range reports, streaming XLSX export, derived draw schedules, and a probability lab that scores 8 history-gated strategies against a uniform baseline with walk-forward backtests, Brier/log-loss skill scores, calibration checks, and χ² fairness tests. Security is fail-closed: no accounts, unguessable secret links in three roles (admin, full-access, view-only), constant-time token checks, per-IP throttling, and server-enforced read-only limits.

The Outcome

Live as of September 2026: 59 enabled sources → 59 ok, 0 failed, 0 restricted; every source yields parsed draws; 184K+ draws archived with a 100.0% acquisition success rate. The whole system — first commit to feature-complete — was built by one person in ten days (2026-09-04 → 2026-09-14).

The build was then put through a hostile review of its own surface: a security assessment against the live prototype produced 21 findings that collapse to 16 distinct issues, two of them critical — a framework middleware-bypass CVE and a fail-open authorization path. The remediation plan is written, the fixes are committed and deployed, the framework was upgraded from 15.1.6 to 15.2.3 in the same pass, and the bypass no longer reproduces. Reporting what a hostile read of my own work found matters more than the finding count.

The probability lab says plainly what the math shows: on deep, fair games no strategy beats chance. That honesty is the point of the experiment — the tool reports a distribution, never a prediction, and the access model (secret links, no user database) is itself a security exercise. It carries no uptime commitment and offers no financial, statistical, or wagering guidance; nothing places, prices, or facilitates a wager.

Visit the project

The public site at prototype.datawork.top is open and explains the build. A view-only demonstration link — rotatable, server-enforced read-only — is issued on request; ask for a current one. This is an engineering prototype, not a product: no uptime commitment, no accounts, and no financial or wagering guidance.

Visit the project

Key Takeaway

Reliability across 59 incompatible sources isn't a parsing problem — it's a compliance problem. Respect robots.txt, rate limits, and bot protections, and the hard cases stop being hard: they become an honest assisted-import queue instead of a cat-and-mouse game.

Ready to Build Your Platform?

One 30-minute call to see if we're a fit. No pitch. No pressure. Just a conversation about what you need to build.

Most engagements start with a bounded architecture diagnostic: $5,000 to $12,000, 1 to 3 weeks. Fixed-price platform builds: $20,000 to $80,000, milestone-gated, 50% deposit. Fractional CTO: $6,000 to $10,000 per month, 90-day minimum.

Multiregion Results Agent — 59-Source Acquisition System — LogicBison