Link to Eurostar search page with pricing; add Bristol departures RTT link
Replace the Eurostar timetable link with the search URL (eurostar.com/search/uk-en?adult=1&origin=…&destination=…&outbound=…) so the footer links directly to the page that shows prices for the specific date and destination. Add a Bristol Temple Meads → Paddington departures link on RTT alongside the existing Paddington arrivals link. Also update "morning service unavailable" badge and tests to reflect the removal of the morning-only cutoff filter from find_unreachable_morning_eurostars. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
4e4202e220
commit
06afd57957
5 changed files with 27 additions and 8 deletions
10
app.py
10
app.py
|
|
@ -16,6 +16,12 @@ RTT_PADDINGTON_URL = (
|
|||
"?stp=WVS&show=pax-calls&order=wtt"
|
||||
)
|
||||
|
||||
RTT_BRISTOL_URL = (
|
||||
"https://www.realtimetrains.co.uk/search/detailed/"
|
||||
"gb-nr:BRI/to/gb-nr:PAD/{date}/0000-2359"
|
||||
"?stp=WVS&show=pax-calls&order=wtt"
|
||||
)
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
DESTINATIONS = {
|
||||
|
|
@ -154,8 +160,9 @@ def results(slug, travel_date):
|
|||
next_date = (dt + timedelta(days=1)).isoformat()
|
||||
travel_date_display = dt.strftime('%A %-d %B %Y')
|
||||
|
||||
eurostar_url = eurostar_scraper.timetable_url(destination) + f"?date={travel_date}"
|
||||
eurostar_url = eurostar_scraper.search_url(destination, travel_date)
|
||||
rtt_url = RTT_PADDINGTON_URL.format(date=travel_date)
|
||||
rtt_bristol_url = RTT_BRISTOL_URL.format(date=travel_date)
|
||||
|
||||
return render_template(
|
||||
'results.html',
|
||||
|
|
@ -175,6 +182,7 @@ def results(slug, travel_date):
|
|||
error=error,
|
||||
eurostar_url=eurostar_url,
|
||||
rtt_url=rtt_url,
|
||||
rtt_bristol_url=rtt_bristol_url,
|
||||
min_connection=min_connection,
|
||||
max_connection=max_connection,
|
||||
valid_min_connections=sorted(VALID_MIN_CONNECTIONS),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue