Fix via station handling
This commit is contained in:
parent
76a4fc8625
commit
479bc58489
|
@ -70,8 +70,8 @@ class Connection:
|
|||
out += " " * indent + " <from>\n"
|
||||
out += self.depst().xml(indent + 2, **stationkwargs) + "\n"
|
||||
out += " " * indent + " </from>\n"
|
||||
|
||||
if via and self.via:
|
||||
|
||||
if via and self.via != 0:
|
||||
out += " " * indent + " <via>\n"
|
||||
|
||||
for vst in self.via:
|
||||
|
|
|
@ -126,11 +126,14 @@ def connRequest(frm, to, count = 3, time = datetime.datetime.now(), mode = False
|
|||
# ticketurl = det.find("td", { "class": "fares" }).find("a").get("href")
|
||||
|
||||
svc = Service(name, depst, depts, arrst, arrts, currdep = curdep, curarr = curarr)
|
||||
con = Connection(details)
|
||||
conn = Connection(details)
|
||||
|
||||
con.addService(svc)
|
||||
for vst in via:
|
||||
conn.addVia(vst)
|
||||
|
||||
yield con
|
||||
conn.addService(svc)
|
||||
|
||||
yield conn
|
||||
|
||||
def worker(frm, to, count = 3, time = datetime.datetime.now(pytz.timezone("Europe/Vienna")), mode = False, details = False, json = False, via = None):
|
||||
conns = list(connRequest(getStation(frm), getStation(to), count, time, mode, details, [getStation(vst) for vst in via]))
|
||||
|
|
Loading…
Reference in New Issue