Last active
September 27, 2017 20:04
-
-
Save jpomykala/5bcca6fafda21ea3162bfaff0cc763f5 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
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