MarkusH / bvg-grabber

Querying the upcoming public transport departures in Berlin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new info feature messing up departure matching

bh opened this issue · comments

from bvggrabber.api.scheduleddeparture import ScheduledDepartureQueryApi, Vehicle

query = ScheduledDepartureQueryApi("S Schulzendorf (Berlin)", Vehicle.BUS | Vehicle.S, limit=100)
res = query.call()
print(res.to_json)

Results in:

soup = BeautifulSoup(response.text)
Traceback (most recent call last):
File "t.py", line 6, in
res = query.call()
File "/home/bh/devel/epaper/.venv/lib/python3.8/site-packages/bvggrabber/api/scheduleddeparture.py", line 74, in call
end=tds[2].text.strip(),
IndexError: list index out of range

API request URL:

https://mobil.bvg.de:443/Fahrinfo/bin/stboard.bin/dox?input=S+Schulzendorf+%28Berlin%29&time=20%3A18&date=19.01.2020&productsFilter=0001000&maxJourneys=10&start=yes

Fixed in #19 and released in v0.2.0