livgust / covid-vaccine-scrapers

Open-source project using Nodejs and Puppeteer to scrape websites for COVID vaccine availability in Massachusetts. Can be modified to suit other areas and needs.
MIT License
66 stars 33 forks source link

MAImmunization: Check to see if the signUpLink has real availability #189

Closed harcod closed 3 years ago

harcod commented 3 years ago

MAImmunizations.org frequently reports available slots on the "search page" only to show no availability after clicking the signup link.

By checking the contents of the signUpLink itself, we can see if the user can actually book a slot.

<div class="danger-alert">
       Clinic does not have any appointment slots available.
</div>
harcod commented 3 years ago

There is currently no location with real availability so I'm assuming that danger-alert doesn't actually appear on good pages.

harcod commented 3 years ago

I'd keep it simple for a first pass and just look for this danger-alert. If there is a wait-list, then at least the person has something actionable to do.

harcod commented 3 years ago

@harcod The code looks good. Lmk if there's anything you want me to test out on my end (currently there aren't slots with "broken links").

@tkjones117 Usually all of the slots are "danger-alert" links. I did see a location with real available slots a few minutes ago and ran the scraper. It correctly inserted the signUpLink into the json!