rta_booking_information icon indicating copy to clipboard operation
rta_booking_information copied to clipboard

Automatically update the centres.json file

Open sbmkvp opened this issue 3 years ago • 3 comments

The centers.json file is update manually. We need the script to update it regularly by looking at the available centres in the RTA website. Could be a similar script to the scrape_availability.py

sbmkvp avatar Feb 11 '22 02:02 sbmkvp

Can you use Selenium's "Select" class to scrape all options from the Select Dropdown?

Select dropdown = new Select(driver.findElement(By.id("rms_batLocationSelect2"))); List<WebElement> dd = dropdown.getOptions();

//append into centres.json

madhav-mk avatar Feb 11 '22 03:02 madhav-mk

Fair suggestion. The tricky part is the location and driving distance. I am currently using google sheets to do this. Need to implement this in Python using their API.

sbmkvp avatar Feb 11 '22 03:02 sbmkvp

You can probably do it with Geocoding and Distance Matrix APIs from Google Maps for automation.

madhav-mk avatar Feb 11 '22 04:02 madhav-mk