From a95e2a29a0082a440dd97a483812ba427e57b562 Mon Sep 17 00:00:00 2001 From: Nahuel Lofeudo Date: Sun, 23 Apr 2023 07:13:51 +0100 Subject: [PATCH] Use trip's headsign instead of the route's long name for display --- gtfs_client.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gtfs_client.py b/gtfs_client.py index ff95608..dd74999 100644 --- a/gtfs_client.py +++ b/gtfs_client.py @@ -283,8 +283,7 @@ class GTFSClient(): arrival = ArrivalTime(stop_id = bus["stop_id"], route_id = bus["route_short_name"], - # So apparently the GTFS feed uses non-ascii dashes because OF COURSE THEY DO - destination = re.split(r"–|-", bus["route_long_name"])[-1].strip(), + destination = bus["trip_headsign"], due_in_seconds = self.__due_in_seconds(bus["arrival_time"]) + delta ) arrivals.append(arrival)