No description
Find a file
Edward Betts 804fcedfad Show cheapest GWR fare per journey and flag unreachable morning Eurostars
Add cheapest_gwr_ticket() to trip_planner.py encoding the SSS/SVS/SDS
walk-on single restrictions for Bristol Temple Meads → Paddington: on
weekdays, Super Off-Peak (£45) is valid before 05:05 or from 09:58,
Off-Peak (£63.60) from 08:26, and Anytime (£138.70) covers the gap.
Weekends have no restrictions. The fare is included in each trip dict
and displayed in a new GWR Fare column on the results page.

Also wire up find_unreachable_morning_eurostars() into the results view
so early Eurostar services unreachable from Bristol appear in the table,
with tests covering both features.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-04 10:22:47 +01:00
scraper Generate Eurostar timetable URLs from station IDs 2026-04-01 12:17:50 +01:00
templates Show cheapest GWR fare per journey and flag unreachable morning Eurostars 2026-04-04 10:22:47 +01:00
tests Show cheapest GWR fare per journey and flag unreachable morning Eurostars 2026-04-04 10:22:47 +01:00
.gitignore Initial commit. 2026-03-30 19:34:46 +01:00
app.py Show cheapest GWR fare per journey and flag unreachable morning Eurostars 2026-04-04 10:22:47 +01:00
cache.py Initial commit. 2026-03-30 19:34:46 +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 Show cheapest GWR fare per journey and flag unreachable morning Eurostars 2026-04-04 10:22:47 +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