No description
Fetches prices via the site-api.eurostar.com GraphQL gateway (NewBookingSearch operation, discovered with Playwright). Adds fetch_prices() to scraper/eurostar.py using requests, caches results, annotates each trip with eurostar_price and total_price, and shows an ES Std column plus total cost (duration + price) in the results table. The Transfer column is hidden on small screens for mobile usability. Closes #4 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| scraper | ||
| templates | ||
| tests | ||
| .gitignore | ||
| app.py | ||
| cache.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 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