Simple Web App to track TUB buses in real-time, using their scraped API.
View Demo
Β·
Start Developing
π Table of Contents
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 |
2024-05-18.16-09-20.mp4
To get a local copy up and running follow these simple example steps.
Start by installing the following tools:
- Git - Version Control System
Now clone the repository to your local machine. You can do this using Git:
$ git clone git@github.com:darguima/TUB-Bus-Tracker.git
# or
$ git clone https://github.com/darguima/TUB-Bus-Tracker.gitYou can use any HTTP server to serve the files. For example, using Python's built-in HTTP server:
$ python3 -m http.server -d srcAnd now access localhost:8000.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request