- Navigate to https://vax4nyc.nyc.gov/patient/s/vaccination-schedule
- Fill out the "Eligibility" form
- Check " New York City residents ages 30 or older"
- "No" you're not NYC employee
- Fill in DoB
- Fill in Zip
- "yes" Certify live in NYC
- click Next
- Fill in "Health Screening And attestation
- "no" for allergic reaction
- Fill in Full Name
- Check hereby certify...
- Check and Complete reCatcha
- Click Next
- Open the browsers console by right-clicking and selecting inspect
- paste the following into the console tab
async function bookAppointment(zip = 10013) {
const $ = window.$;
const $$ = window.$$;
function wait(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
while(true) {
// Fill in zip
const zipField = $("[name='zipCodeValue']");
zipField.value = "";
zipField.value = zip;
console.log("searching");
// Wait for appt request.
await wait(1000);
const appointmentSlot = $(".appointment_slot .panel-heading");
const next = $$('button').find((button) => button.id.includes("skipToNext"));
if (appointmentSlot) {
// Log appointment info.
console.warn("INFO", $('.page-content').textContent);
console.warn("TIME", $('lightning-formatted-time').innerText);
appointmentSlot.click();
next.click();
await wait(1000);
// If find another appointment button pops up, it's gone. Try again.
const findAnotherAppt = $('[title="Find Another Appointment"]');
if (findAnotherAppt) {
findAnotherAppt.click();
await wait(1000);
} else {
return alert("Appointment found!");
}
}
}
}
bookAppointment();
- Allow script to run until the "Appointment Found!" aleart window pops up
- Click Previous
- Verify the appointment is Viable
- Time / Date
- Location
if NOT APPROPRIATE start the process over
if APPROPRIATE click NEXT
- fill out form
- Do appointment pre-reqs