Jeremy Hunts
Jeremy Hunts

Reputation: 363

How to extract those elements in Jsoup

I want to extract the "Abstract" and the "Title" as shown in the photo below. However I can't extract the title and I tried to extract the tag "Abstract" but it didn't work.

String html = "http://example.com/";
Document doc = Jsoup.parse(html);
Element link = doc.select("Abstract").first();

Image

Upvotes: 0

Views: 83

Answers (1)

Stephan
Stephan

Reputation: 43013

Try this:

Element title = doc.select("FONT[size=+1]").first();

Element abstractParagraph = doc.select("CENTER:has(b:containsOwn(Abstract)) + p").first();

Upvotes: 1

Related Questions