Skip to content

Instantly share code, notes, and snippets.

@gjtorikian
Last active April 2, 2021 13:15
Embed
What would you like to do?

Check out the YouTube link for additional help: https://youtu.be/MoZtlB06yys

  1. Go to https://vax4nyc.nyc.gov/patient/s/vaccination-schedule
  2. Fill out all your personal details
  3. Copy this script above
  4. In your browser, open up Developer Tools
  5. Paste this script into the console
  6. Sit back and wait for an appointment you like to appear. This usually takes about ten minutes.

If the page stops refreshing (because it found an appointment), but you don't like the time or location, just type:

await run(appointmentTime, $)

Hit Enter and try again.

var currentDate = new Date().toLocaleDateString()
var dateInput = $('input')
dateInput.value = currentDate
var zipInput = $("input[name='zipCodeValue']")
const zip = '11238'; // change this to your zip!
zipInput.value = zip;
var appointmentTime = $('lightning-formatted-time')
async function sleep(ms) {
return new Promise((resolve)=>setTimeout(resolve, ms))
}
async function run(appointmentTime, $) {
while (appointmentTime === null) {
dateInput.value = currentDate;
// triggers a change
zipInput.value = '';
zipInput.value = zip;
console.log("snooze")
await sleep(2500)
appointmentTime =$('lightning-formatted-time')
}
}
await run(appointmentTime, $)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment