Simple Web App to track TUB buses in real-time, using their scraped API.
Try now here ๐ or watch the demo ๐ฅ down below.
TUB (Transportes Urbanos de Braga
) is the public Bus company of Braga, Portugal.
At the start of 2024, TUB launched a new App where is available the feature of track buses in real-time, however, just one route once.
The idea here was to join all the routes in one map at once to track all the buses at the same time and on the same map.
Well, with HTTPToolkit, F-Droid, Aurora Store and an Android Emulator I passed all the App traffic over a proxy, found out the API endpoints and now I can just use them. Simple! :)
All this workaround is needed because Android don't allow proxy the traffic from Apps when the PlayStore is available on the system.
The endpoints scraped are:
Endpoint | Description |
---|---|
https://mobibus-gateway.ndrive.com/busLocation/${route number} | Returns the location of all the buses on this route. Well, you also need their key, but that you will nee to find out |
Just watch!
2024-05-18.16-09-20.mp4
Just clone and serve the files. For example:
$ git clone git clone [email protected]:Darguima/TUB-Bus-Tracker.git
$ python3 -m http.server
And now access localhost:8000
.