Eywek / tgvmax-bot

26 stars 6 forks source link

fix/station-search #8

Closed f-hj closed 2 years ago

f-hj commented 2 years ago

This fixes the search that was broken by the migration of oui sncf to sncf connect. The bot now uses the CSV from trainline and makes a text search on it. The generator produces a 282Kb JSON file.

Yes, the text search is pretty bad (I'm too lazy to make something okay-ish), actually it takes less than 2ms to search a station.

I updated the API_ENDPOINT too because it's not usable on any other system as it is.