From 327de4b7e1ec9616c99746d42af0725694e11688 Mon Sep 17 00:00:00 2001 From: chrissy Date: Sat, 3 Jan 2026 18:55:01 +0100 Subject: [PATCH] making it somehow worse --- travelInfo.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/travelInfo.py b/travelInfo.py index dc7e548..f2dca93 100755 --- a/travelInfo.py +++ b/travelInfo.py @@ -13,7 +13,11 @@ timezone = pytz.timezone('Europe/Berlin') statusData = None #initialize variables... tripData = None -tlApiToken="[YOUR API TOKEN] +# Your Travelynx-Api-token goes here +tlApiToken="[YOUR API TOKEN]" + +# Known SSIDs for some regional train Wifis... +ssid_regio=["Wifi@DB","RRX Hotspot","Abellio Free WiFi","Arriva","DVB-Hotspot","ENNO_WiFi","FlixTrain Wi-Fi","MAVSTART-WiFi","ODEG Free WiFi","OEBB","RegioJet - zluty","Regiojet - zluty","Wifi@start","alex WiFi","trilex WiFi"] # Request the raw data from ICE-Portal and raise an exception, when it is not avialable. def get_api_db(): @@ -106,6 +110,9 @@ def get_next_tl(): arrivalTime = datetime.fromtimestamp(uActualTime, tz=timezone).strftime('%H:%M') tripinfo = nextStationName+" "+arrivalTime+" ("+arrivalDelay+")" break + else: + nextStationName=tripDataTl['toStation']['name'] + tripinfo=nextStationName except: nextStationName=tripDataTl['toStation']['name'] tripinfo=nextStationName @@ -145,7 +152,7 @@ def main(): get_api_tl() print(get_trainInfo_tl()+" | NEXT: "+get_next_tl()) - if get_ssid() == "WIFI@DB" or "RRX Hotspot": + if get_ssid() in ssid_regio: get_api_tl() print(get_trainInfo_tl()+" | NEXT: "+get_next_tl())