From bdc2a516d62e37fd7471ff2f496e5f4c602ee2c9 Mon Sep 17 00:00:00 2001 From: tfa Date: Wed, 4 Jan 2023 14:33:28 +0100 Subject: [PATCH] Meilleur affichage et plus rapide --- tcl.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tcl.py b/tcl.py index 66fce57..817c34c 100644 --- a/tcl.py +++ b/tcl.py @@ -160,7 +160,7 @@ class Tcl(Plugin): Ids.append(value["id"]) - url = 'https://download.data.grandlyon.com/ws/rdata/tcl_sytral.tclpassagearret/all.json?maxfeatures=2000&start=1' + url = 'https://download.data.grandlyon.com/ws/rdata/tcl_sytral.tclpassagearret/all.json?maxfeatures=30000&start=1' respText = "### Prochains départs " + nomArret + " :\n" self.log.info(respText) lines = [] @@ -196,8 +196,11 @@ class Tcl(Plugin): elif value["coursetheorique"].split('-')[0] == "302A" : transport = "B" else: - transport = value["coursetheorique"].split('-')[0][:-1] - + l = value["coursetheorique"].split('-')[0] + if l[-1:].isdigit(): + transport = l + else: + transport = value["coursetheorique"].split('-')[0][:-1] found = False for line in lines: if line.get_name() == transport: