QDG Knowledge Base Read-only viewer QWebHub
general

Chile Crawler - Hip?dromo Chile

Version 1 · Created the Chile crawler page with public/API routes, JSON structures, results and workout commands, validation, verification, and module changelog.

Historical version

Chile Crawler - Hip?dromo Chile

Last reviewed: 2026-08-08 AEST

Module identity

  • Country: Chile
  • Program/source name: Hip?dromo Chile
  • Adapter source ID: cl_hipodromo_chile
  • Python module: src\formcrawler\sources\cl\hipodromo_chile.py
  • Result launcher: scripts\crawl_hipodromo_chile_results.bat
  • Workout launcher: scripts\crawl_hipodromo_chile_workouts.bat
  • Discipline: Thoroughbred (T)
  • Racing jurisdiction code: CHI
  • ISO country code: CL
  • Allowed hosts: hipodromo.cl, www.hipodromo.cl

Scope and key pages

Public page First-party capture endpoint Artifact
/carreras-ultimos-resultados?fecha=YYYY-MM-DD /api/general/carreras/general/resultados/fecha/<date>?id_pais=0 Meeting/index JSON
/carreras-ultimos-resultados?id_reunion=<id> /api/general/carreras/general/resultados/<meeting-id>?id_pais=0 Meeting/index JSON
/carreras-resultado-ver?id_carrera=<id> /api/general/resultado-testfp/general/<race-id> Complete race-result JSON
/carreras-aprontes /api/general/aprontes-carreras Rolling workout JSON snapshot

The public URL remains the canonical source location. The adapter retrieves the same-origin first-party JSON endpoint and may send the canonical page as a same-origin Referer.

Capture workflows

Date-range results

  1. Build one dated public results URL for each date in the inclusive range.
  2. Capture the corresponding meeting-index JSON.
  3. Read reuniones[], then each meeting's carreras[] list.
  4. Queue one complete JSON target per numeric id_carrera.
  5. Validate that each result matches its race ID and contains at least one published placing.
  6. Store immutable JSON, metadata, and FormParser handoff records.

Workouts

One request captures the entire rolling workout feed currently exposed by the source. This is a supplementary snapshot, not a historical date-range API. Validation requires at least one published workout row.

Source and artifact data structure

Meeting/index JSON

The control response is a JSON object with reuniones[]. Each meeting may contain:

  • id_reunion;
  • fecha_reunion;
  • meeting labels such as nombre_hipodromo and numero_reunion;
  • carreras[], where each race supplies id_carrera and may supply correlativo.

Discovered race target metadata may include race_id, meeting_id, date, and race_number.

Race-result JSON

Each race response is a JSON object with:

  • carrera, including the source id_carrera, race name, number, and venue details;
  • ejemplares[] for runners;
  • a runner's published placing under resultado.lugar.

The artifact uses page_type=race, capture_phase=post_race, and artifact_type=race_result_json.

Workout JSON

The workout response is a top-level JSON array of venue objects. Each venue can expose fechaAprontes[]; each date contains fecha and aprontes[]. A row is considered published when it carries an id_apronte or horse name.

C:\Users\Robert\project-data\FormCrawler\t-artifacts\<year>\CHI\cl_hipodromo_chile\<event>\
C:\Users\Robert\project-data\FormParser\inbox\T\<year>\CHI\cl_hipodromo_chile\<artifact-id>.json

How to run

Full inclusive results range:

.\scripts\crawl_hipodromo_chile_results.bat 2026-08-01 2026-08-06

One-date, one-race smoke test:

.\scripts\crawl_hipodromo_chile_results.bat 2026-08-06 2026-08-06 1

Use a third value of 0 for discovery only. Rerun the same range without a limit to resume queued races.

Capture the current workout snapshot:

.\scripts\crawl_hipodromo_chile_workouts.bat

Equivalent generic range command:

python scripts\formcrawler.py capture-date-range `
  --source cl_hipodromo_chile `
  --start 2026-08-01 `
  --end 2026-08-06

Known limitations and recovery

  • Results are stored per race; the control JSON is also preserved.
  • The workout endpoint exposes a rolling recent window and accepts no requested historical range.
  • A race without a matching carrera.id_carrera or published resultado.lugar remains retryable.
  • FormCrawler preserves source JSON; FormParser owns canonical field mapping.
  • Ctrl+C is safe; rerun the same command to resume the queue.

Verification

On 2026-08-07, meeting 101140 exposed 20 race targets for 2026-08-06. A bounded smoke test stored the meeting-index JSON and race 820996, then the full run captured the remaining results without reported failures. The workout launcher stored one 127,616-byte response containing nine dates from 2026-07-23 through 2026-08-05 and 185 workout rows. Recorded SHA-256 values and FormParser handoffs matched.

Module changelog

2026-08-07 - Results and workout implementation

  • Added cl_hipodromo_chile with same-origin first-party meeting and race JSON capture.
  • Added dated, meeting, latest-results, and per-race URL normalization.
  • Added inclusive date-range capture, target limiting, discovery-only operation, and resumable queue processing.
  • Added safe same-origin Referer support for API-backed pages.
  • Added rolling workout feed capture and crawl_hipodromo_chile_workouts.bat.
  • Live-verified meeting 101140, race 820996, complete result processing, workout rows, hashes, and handoffs.
Updated by Codex on Aug. 7, 2026, 2:07 p.m. · Task: Create one FormCrawler wiki page per implemented country module