No description
Find a file
Edward Betts 05eec29b7d Show Eurostar seat availability and no-prices notice
fetch_prices now returns {'price': ..., 'seats': ...} per departure.
Seat count (labelled "N at this price") is shown below the fare — it
reflects price-band depth rather than total remaining seats. A yellow
notice is shown when the API returns journeys but all prices are null
(tickets not yet on sale).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 14:12:54 +01:00
config Add config system with TFL_DATA_DIR and CACHE_DIR 2026-04-04 13:37:44 +01:00
scraper Show Eurostar seat availability and no-prices notice 2026-04-04 14:12:54 +01:00
templates Show Eurostar seat availability and no-prices notice 2026-04-04 14:12:54 +01:00
tests Show Eurostar seat availability and no-prices notice 2026-04-04 14:12:54 +01:00
.gitignore Add config system with TFL_DATA_DIR and CACHE_DIR 2026-04-04 13:37:44 +01:00
app.py Show Eurostar seat availability and no-prices notice 2026-04-04 14:12:54 +01:00
cache.py Add config system with TFL_DATA_DIR and CACHE_DIR 2026-04-04 13:37:44 +01:00
circle_line.py Add config system with TFL_DATA_DIR and CACHE_DIR 2026-04-04 13:37:44 +01:00
pyproject.toml Initial commit. 2026-03-30 19:34:46 +01:00
README.md Include link to git repo. 2026-03-31 15:13:11 +01:00
requirements.txt Initial commit. 2026-03-30 19:34:46 +01:00
trip_planner.py Use real Circle Line timetable; add Eurostar duration 2026-04-04 13:26:35 +01:00

Bristol Eurostar

Source: https://git.4angle.com/edward/bristol-eurostar

Plan a trip from Bristol Temple Meads to Europe on Eurostar.

Combines GWR trains (Bristol → Paddington) with Eurostar services (St Pancras → destination) and shows all valid same-day connections, filtering by journey time and minimum/maximum transfer window at Paddington/St Pancras.

Destinations

  • Paris Gare du Nord
  • Brussels Midi
  • Lille Europe
  • Amsterdam Centraal

How it works

Train times are fetched from two sources simultaneously:

  • GWR — scraped from Realtime Trains using httpx
  • Eurostar — scraped from the Eurostar timetable pages via the embedded __NEXT_DATA__ JSON (no browser required)

Results are cached to disk by date and destination.

Connection constraints

Minimum Paddington → St Pancras 75 min
Maximum Paddington → St Pancras 2h 20m
Maximum Bristol → Paddington 1h 50m

Setup

pip install -e ".[dev]"

Running

flask --app app run

Then open http://localhost:5000.

Tests

pytest

License

MIT