Viewing a single comment thread. View all comments

Eyusd OP t1_j9fpcv5 wrote

A bit of context :

This was done using Python. The algorithm works by asking Google Maps what is the fastest route using public transports from any point to Notre-Dame, on 02/20/2023 at 4PM.

Changes from a subway line to another are allowed, as well as walking or taking the bus.

EDIT : Also, Notre-Dame as been chosen because it is roughtly at the center of Paris, and the starting point of all distance measurements in France

10

smauryholmes t1_j9fy8sc wrote

Mind sharing your code? I’ve been using a paid service to do this at my job and would rather do it for free haha.

I assume you need Maps API access?

5

Eyusd OP t1_j9g3sus wrote

I didn't want to spend money on that, so I just used Selenium to simulate what a real user may do.

This whole code is just a big bodge. I just control the web browser with the script, and instruct it to type into the search input coordinates, and scrap the page to retrieve the times.

If you'd like a better way to do this with an API, reach to me in DMs, I'd be happy to help

3