Open hashworks opened 3 years ago
So basically, const d = await departures("Leipzig, Hermann-Liebmann-Str./+Eisenbahnstr.", Date.now())
is the way to do things now. Looks like "stations" should only return the "proper" names.
The package originally included a workaround for that by making departure requests for every station by their name to obtain the ids. This workaround was still in the code, but failing silently. I fixed it now, even though it's ugly, of course, since it requires additional requests. We should probably remove the IDs and switch to names completely.
It seems, they complete removed the API, at least the https://www.l.de/verkehrsbetriebe/fahrplan/ doesn't use the form data call anymore, I only see some reiseauskunft.insa.de and some hafas-client library code calls.
Looks like the LVB API no longer provides station IDs in the AJAX response:
/fahrplan/abfahrten
now uses the whole name instead:The
lvb.departures
test is wrong at that point: Providing the ID results in the departures of a different station.