Sindu_ Sindu_ - 11 months ago 88
HTML Question

Getting text inside a div class in jsoup

I am trying to extract all the text inside the div class "row result". There are many with the same div class name, but different id's. I want to extract all of the text which has the div class as row result. Here is the website link :

<div class=" row result" id="p_8f8039e2c2636a2a" data-jk="8f8039e2c2636a2a" itemscope="" itemtype="" data-tn-component="organicJob">

But nothing gets displayed when I run the following code. Please help.

doc = Jsoup.connect("").timeout(5000).get();
Elements e =".row result");
System.out.println("Details: "+ e.text());


I think you must write your code like this:

Elements e =".row.result");