Ke10 Ke10 - 3 months ago 6x
Java Question

Java jsoup how to see if a class is in the html

The class is

is it possible too see if this is in the html of the site? I've sifted through some of the documentation but couldn't find anything.


You can select elements by ID and check the length of the array you receive

if(doc.getElementsByClass("error_ctn").size() == 0){
    //element with that class is not in HTML