- Support any station with direct trains to Paddington; station CRS code is now part of the URL (/results/<crs>/<slug>/<date>) - Load station list from data/direct_to_paddington.tsv; show dropdown on index page; 404 for unknown station codes - Fetch live GWR walk-on fares via api.gwr.com for all stations (SSS/SVS/SDS with restrictions already applied per train); cache 30 days - Scrape Paddington arrival platform numbers from RTT - Show unreachable morning Eurostars (before first reachable service only) - Circle line: show actual KX St Pancras arrival times (not check-in estimate) and add a second backup service in the transfer column - Widen page max-width to 1100px for longer station names Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| config | ||
| data | ||
| scraper | ||
| templates | ||
| tests | ||
| .gitignore | ||
| app.py | ||
| cache.py | ||
| circle_line.py | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| trip_planner.py | ||
Bristol Eurostar
Source: https://git.4angle.com/edward/bristol-eurostar
Plan a trip from Bristol Temple Meads to Europe via Eurostar.
Combines GWR trains (Bristol → Paddington) with Eurostar services (St Pancras → destination) and shows all valid same-day connections, including Circle Line times for the Paddington → St Pancras transfer. Displays GWR walk-on fares, Eurostar Standard prices, seat availability, and total journey cost.
Destinations
- Paris Gare du Nord
- Brussels Midi
- Lille Europe
- Amsterdam Centraal
- Rotterdam Centraal
- Cologne Hbf
How it works
Train times and prices are fetched from two sources:
- GWR — scraped from Realtime Trains using httpx
- Eurostar — fetched from the Eurostar GraphQL API (single call returns timetable, Standard fares, and seat availability)
The Paddington → St Pancras transfer uses a real Circle Line timetable parsed from a TfL TransXChange XML file, accounting for walk time to the platform at Paddington and walk time from the platform to the St Pancras check-in.
Results are cached to disk by date and destination.
Connection constraints
Configurable via the search form. Defaults:
| Minimum Paddington → St Pancras | 50 min |
| Maximum Paddington → St Pancras | 110 min |
Valid range: 45–120 min (min), 60–180 min (max).
GWR fares
Walk-on single fares for Bristol Temple Meads → Paddington, selected automatically by departure time:
| Ticket | Price | Restriction (weekdays) |
|---|---|---|
| Super Off-Peak | £45.00 | Not valid 05:05–09:57 |
| Off-Peak | £63.60 | Not valid before 08:26 |
| Anytime | £138.70 | No restriction |
Weekends always use Super Off-Peak.
Setup
pip install -e ".[dev]"
Configuration
Copy or create config/local.py (gitignored) to override defaults:
CACHE_DIR = '/var/cache/bristol-eurostar'
CIRCLE_LINE_XML = '/path/to/output_txc_01CIR_.xml'
Defaults (in config/default.py) use ~/lib/data/tfl/.
The Circle Line XML is a TfL TransXChange timetable file. The Paddington (H&C Line) stop is 9400ZZLUPAH1; the King's Cross St Pancras stop is 9400ZZLUKSX3.
Running
flask --app app run
Then open http://localhost:5000.
Tests
pytest
License
MIT