BART API that scrapes data from bart.gov, created because the BART Legacy API is unstable.
BART's legacy API is the RESTful API provided by BART. Sadly, it doesn't work well. The errors provided by the server are non-descriptive (all errors say "invalid API key", even when that is not the case), and the API will unexplainably stop working. The natural solution for me was to scrape information from BART's website. This project aims to be a stand-in replacement for the API, however, it shouldn't be used in product as at any time, BART could pull the plug and block my IP, or Cloudflare could randomly start blocking me.
If you have any feedback, concerns, or suggestions, please contact me using [email protected]. Additionally, you should submit pull requests if you see something that should be changed or repaired!
Clone the repo and copy config.json.example
to config.json
. Edit the config.json
file to your liking, changing the user_agent to something meaningful.
Install the requirements by running python3 -r requirements.txt
.
Run the server: python3 main.py