问题
This is a weird problem which I don't understand why it would occur. But, doing the following:
Elements Fullcoursespaces = fullCourses.select("span[class=note-red]"); //Get the course times
Removes duplicates. So it returns two unique elements, but since the rest of the elements are duplicates of these unique elements, they are removed. When instead, it should fill up the elements list with the duplicates regardless. Is there a reason why this is happening?
Edit: As a side note, doing document.querySelectorAll("span[class=note-red]"); on the webpage gives me all the elements regardless if they are duplicates or not.
来源:https://stackoverflow.com/questions/32040601/jsoup-elements-removes-duplicates-automatically