Last active
June 5, 2023 10:02
-
-
Save enVolt/9e4d845c8858268dad62349f5b89ca36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find_slot = function () { | |
acc = document.getElementById("appointment_accordion") | |
acc.childElements().forEach(el => { | |
slots_parent = el.childElements()[1].childElements()[0].childElements()[0] | |
slots_parent.childElements().forEach(day_slot => { | |
date = day_slot.getElementsByClassName("appt-table-d")[0].innerHTML.replace("<br>", ",") | |
slots = day_slot.getElementsByTagName("a"); | |
for (i = 0; i < slots.length; i++) { | |
slot = slots[i]; | |
index = slot.getAttribute("class").indexOf("full") | |
if (index == -1) { | |
console.log("found on "+ date + ", for time - " + slot.innerHTML); | |
} else { | |
// console.log("not-found on "+ date + ", for time - " + slot.innerHTML) | |
} | |
} | |
}) | |
}) | |
} | |
find_slot() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment