QDG Knowledge Base Read-only viewer QWebHub
general

Australia Crawler - Racing Australia

Version 2 · Added the new weekly homepage index, inclusive date-range workflow, range launcher, additional meeting seeds, 75-test status, and live range verification.

Historical version

Australia Crawler - Racing Australia

Last reviewed: 2026-08-08 AEST

Module identity

  • Country: Australia
  • Program/source name: Racing Australia
  • Adapter source ID: au_racing_australia
  • Python module: src\formcrawler\sources\au\racing_australia.py
  • Launcher: scripts\crawl_racing_australia_meeting.bat
  • Discipline: Thoroughbred (T)
  • Racing jurisdiction code: AUS
  • ISO country code: AU
  • Allowed hosts: racingaustralia.horse, www.racingaustralia.horse

Scope and key pages

The adapter discovers meetings from Racing Australia's seven-day homepage index and captures a bounded five-page lifecycle bundle for each in-range meeting. Every requested date maps to its Monday Home.aspx?date=D/M/YYYY index, so one control request is reused per week. A known meeting can also be seeded from supported FreeFields pages containing the same Key value; the adapter normalizes that meeting and uses its race program as the early-published control.

Page Public route Phase Artifact type
Weekly meeting index /Home.aspx?date=D/M/YYYY discovery meeting_index_html
Race program /FreeFields/RaceProgram.aspx?Key=<meeting-key> pre_race race_program_html
Acceptances /FreeFields/Acceptances.aspx?Key=<meeting-key> pre_race acceptances_html
Gear changes /FreeFields/GearChanges.aspx?Key=<meeting-key> pre_race gear_changes_html
Scratchings /FreeFields/Scratchings.aspx?Key=<meeting-key> pre_race scratchings_html
Results /FreeFields/Results.aspx?Key=<meeting-key> post_race results_html

The meeting key must contain date, state, and venue in the source format, for example 2026Aug07,NSW,Coffs Harbour. Supported state codes are ACT, NSW, NT, QLD, SA, TAS, VIC, and WA.

Capture workflow

For a date range, FormCrawler maps each date to the Monday weekly index, captures each distinct index once, validates the seven-day meeting list, filters meeting keys to the exact inclusive dates, and fans every retained meeting out to five lifecycle targets.

For a known meeting, FormCrawler validates the HTTPS host, supported /FreeFields seed route, single Key, meeting date, state, and venue; it then converts the seed to the canonical race-program control. Supported seed pages include program, acceptances, results, form, all-form, nominations, weights, gear, and scratchings routes.

Both workflows deduplicate targets in the persistent queue, capture ready pages through the shared 15-25-second host limiter, store immutable HTML/metadata/handoffs, and leave unpublished lifecycle placeholders retryable.

Source and artifact data structure

The meeting index and each lifecycle artifact are complete server-rendered HTML. An index target uses page_type=meeting_index, capture_phase=discovery, artifact_type=meeting_index_html, and the Monday date as YYYYMMDD. Each meeting target includes:

  • date as YYYYMMDD;
  • state;
  • venue;
  • meeting_key;
  • one of the five page_type, capture_phase, and artifact_type combinations above.

Readiness checks require the requested venue and displayed meeting date. Program and acceptances pages must expose Race 1 and their publication marker. Gear, scratchings, and results pages must expose their corresponding published content; results additionally require finish and margin headings.

Local Thoroughbred storage follows:

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

How to run

Capture every indexed meeting in an inclusive range:

.\scripts\crawl_racing_australia_range.bat 2026-08-07 2026-08-08

Use a third value of 0 for discovery only or a positive value to limit lifecycle pages per date. The workflow requests one homepage meeting index per week.

Capture all five pages from any supported meeting URL:

.\scripts\crawl_racing_australia_meeting.bat "https://racingaustralia.horse/FreeFields/Results.aspx?Key=2026Aug07%2CNSW%2CCoffs%20Harbour"

Equivalent generic command:

python scripts\formcrawler.py capture-discovered `
  --source au_racing_australia `
  --url "https://racingaustralia.horse/FreeFields/Results.aspx?Key=2026Aug07%2CNSW%2CCoffs%20Harbour"

Rerun the same command to resume queued or not-yet-ready pages. Use python scripts\formcrawler.py queue-status to inspect the shared queue.

For a public GET page that cannot be retrieved directly, add --use-racingandsports-proxy to a generic command or set FORMCRAWLER_USE_RACINGANDSORTS_PROXY=1 before launching the batch file.

Known limitations and recovery

  • This module captures source material; FormParser owns field extraction and canonical JSON mapping.
  • Date-range discovery uses the source's seven-day homepage index and filters meetings to exact requested dates; it is not an unrestricted historical calendar API.
  • A lifecycle page explicitly saying it is not currently available remains retryable.
  • Stop safely with Ctrl+C and rerun the same meeting URL.
  • The external FormCrawler\STOP file blocks new requests after a hard stop.

Verification

On 2026-08-08, a 2026-08-07 range run stored one 53,994-byte weekly index, discovered five meetings and 25 lifecycle targets, then captured one bounded 37,785-byte Coffs Harbour program with zero retries or failures; both hashes and handoffs matched. On 2026-08-07, the supplied Coffs Harbour meeting completed with zero retries and zero failures. Stored sizes were 37,784 bytes for the program, 152,298 for acceptances, 45,614 for gear changes, 34,727 for scratchings, and 190,581 for results. All five SHA-256 values and FormParser handoffs matched. The full project suite then passed 71 tests.

Module changelog

2026-08-08 - Weekly index and date-range discovery

  • Added one Monday Home.aspx index capture per requested week.
  • Filtered discovered meetings to exact inclusive dates and fanned each meeting out to five lifecycle targets.
  • Added crawl_racing_australia_range.bat with discovery-only and bounded-run support.
  • Accepted Form.aspx, AllForm.aspx, Nominations.aspx, Weights.aspx, and related meeting pages as direct seeds.
  • Live-verified five-meeting discovery, one bounded program capture, hashes, handoffs, and the 75-test suite.

2026-08-07 - Initial implementation

  • Added strict Racing Australia meeting-key and route validation.
  • Added the five-page meeting bundle with program-led discovery.
  • Added readiness checks that reject unavailable placeholders.
  • Added crawl_racing_australia_meeting.bat and adapter/workflow tests.
  • Live-verified the Coffs Harbour program, acceptances, gear changes, scratchings, and results artifacts.
Updated by Codex on Aug. 7, 2026, 2:14 p.m. · Task: Synchronize country wiki pages with concurrent Racing Australia range implementation