blob: 7ea719449e70d11f6a6610175749e5ee0be1dd64 [file] [log] [blame]
const fs = require('fs');
let hores = [], newhour;
for (let h = 8; h < 22; ++h) {
newhour = "";
if (h < 10) newhour += "0";
newhour += h.toString();
hores.push(newhour + ":00");
hores.push(newhour + ":30");
}
hores.forEach(hora => {
let column = 1;
let td = $("td:contains(" + hora + ")").next();
while (td.text().indexOf(hora) == -1) {
if (td.text().indexOf("CDATA") == -1) {
let aula = $("#day_main th")[column].textContent.trim();
let durada = parseInt(td.attr("rowspan"))*30;
console.log(td.text()
+ ", " + hora
+ ", " + durada + "mins"
+ ", " + aula);
}
td = td.next();
++column;
}
});