GUI / covid-vaccine-spotter

https://www.vaccinespotter.org
MIT License
506 stars 136 forks source link

Add scanning of ClearSpring Pharmacy appointments #14

Open GUI opened 3 years ago

GUI commented 3 years ago

https://clearspringrx.com/schedule-cherry-creek.php https://clearspringrx.com/schedule-littleton.php

MoralCode commented 3 years ago

seems like they also have https://clearspringrx.com/schedule-littleton.php

Both seem to be a POST request to https://app.acuityscheduling.com/schedule.php?action=showCalendar&fulldate=1&owner=21738145&template=weekly

From preliminary testing the only thing that matters to the request is the body, which is: type=19746777&calendar=4974052&skip=true&options%5Bqty%5D=1&options%5BnumDays%5D=3&ignoreAppointment=&appointmentType=&calendarID=4974052

The only things that vary here are the calendar and calendarID which both take the same values

Location calendarID
Littleton 4974052
Cherry Creek 4971473

if successful, it should come back with a body similar to this for "no availabilities"

<div class="calendar-prev-next" id="calendar-prev-next">
    <a name="calendar-top"></a>

    <a href="javascript:self.showCalendar('2021-03-23', %7B%22nextprev%22%3A%7B%222021-03-23%22%3A%222021-02-24%22%7D%7D)"
        class="calendar-next"><span>More Times</span> <i class="fa fa-chevron-right"></i></a>
</div>
<div class="clearfix calendar"></div>
<span id="no-times-available-message" data-original-text="No times are available">No times are available in the next month (from February 24, 2021 to March 23, 2021)</span>
GUI commented 3 years ago

Thanks for the investigation! The good news is that They seem to be using Acuity Scheduling for this page, which is actually the same underlying provider for Pharmaca appointments. I'll need to investigate further to see if there are any differences, but I'm hoping this means we could either abstract or reuse most of the existing Pharmaca code to support this pharmacy as well.