Reputation: 1377
Is it possible in Jsoup to select multiple elements just with one query, to be more clear here is the image of the websites' structure:
so I want only the content inside these two elements, is it possible to do it with one query :/
Upvotes: 1
Views: 2352
Reputation: 6151
You can use this -
Elements els = doc.select(".ingress,.body-text");
Now els.text()
contains the whole content of those two elements.
Upvotes: 2