MarkusH / bvg-grabber

Querying the upcoming public transport departures in Berlin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API Endpoint

extroversiv opened this issue · comments

Hi there,
I think in actualdeparture.py the api endpoint for realtime needs to be changed to
ACTUAL_API_ENDPOINT = 'https://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox?ld=0.1&boardType=depRT'
With the provided url 'https://mobil.bvg.de/Fahrinfo/bin/stboard.bin/dox?ld=0.1' it returns the planned (scheduled) and not the actual times.
Or am I using it wrong?
Michael

looks correct to me. Seems that they've change id

the endpoint should now work correctly again, thanks for the hint.

(sorry for hijacking this Issue)

I would like to point out that there is another BVG API that has been very stable in the past years: The HAFAS API used by the mobile app. It provides all the data that their app shows, and is reasonably well reverse-engineered by now.

There are several open source HAFAS API clients:

  • the venerable public-transport-enabler – written in Java, supports many endpoints, but not so many fields & features
  • hafas-client (disclaimer: written by me) – JavaScript with support for other languages via JSON-RPC, supports just HAFAS mobile APIs but many fields & features
  • kpublictransport – written in C++, wide scope like public-transport-enabler, actively developed
  • pyhafas – written in Python, closely modelled after hafas-client, doesn't support many fields & features yet
  • TripKit – basically a Swift clone of public-transport-enabler

AFAIR all of these support the BVG endpoint out-of-the-box.