diff options
Diffstat (limited to 'bvg-grabber.py')
-rwxr-xr-x | bvg-grabber.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bvg-grabber.py b/bvg-grabber.py index fcaf318..b5aa710 100755 --- a/bvg-grabber.py +++ b/bvg-grabber.py @@ -46,12 +46,12 @@ if __name__ == '__main__': if args.limit: limit = args.limit - if bus: - aquery = ActualDepartureQueryApi(args.station) query = ScheduledDepartureQueryApi(args.station, vehicles, limit=limit) res = query.call() - res2 = aquery.call() - res.merge(res2) + if bus: + aquery = ActualDepartureQueryApi(args.station) + res2 = aquery.call() + res.merge(res2) else: query = ActualDepartureQueryApi(args.station) res = query.call() @@ -62,3 +62,4 @@ if __name__ == '__main__': file = open(args.file, 'w') print(res.to_json, file=file) file.close() + |