Skip to content

Instantly share code, notes, and snippets.

@jpomykala
Last active September 27, 2017 20:04
Show Gist options
  • Save jpomykala/5bcca6fafda21ea3162bfaff0cc763f5 to your computer and use it in GitHub Desktop.
Save jpomykala/5bcca6fafda21ea3162bfaff0cc763f5 to your computer and use it in GitHub Desktop.
var list= document.getElementsByClassName("gradeX");
for (var i = 0; i < list.length; i++) {
var innerList = list[i].getElementsByClassName("center")
for (var j = 0; j < innerList.length; j++){
var avaiableSeats = innerList[0].innerText
var rowElements = list[i].getElementsByTagName("td")
var course = rowElements[0].innerText
if(avaiableSeats > 0 && course === "JZL100473C"){
var code = rowElements[1].innerText
var time = rowElements[3].innerText
console.log(code, time)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment