show route 0

This commit is contained in:
steven 2025-04-10 21:11:54 -04:00
parent 750a4f0505
commit ed177817e3
2 changed files with 4 additions and 4 deletions

2
app.py
View file

@ -20,5 +20,5 @@ routes=",".join(str(r.get("RouteId")) for r in data)
@app.route("/tarc.csv")
@cache.cached(timeout=5)
def tarc():
d=requests.get("https://tarc.rideralerts.com/InfoPoint/rest/Vehicles/GetAllVehiclesForRoutes?routeIDs="+routes).json()
d=requests.get("https://tarc.rideralerts.com/InfoPoint/rest/Vehicles/GetAllVehiclesForRoutes?routeIDs=0,"+routes).json()
return "\n".join(f"{v['Latitude']},{v['Longitude']},{v['RouteId']},{v['Name']},{v['OnBoard']},{v['DirectionLong']},{v['Speed']},{v['LastUpdated'][6:16]}" for v in d)