简体   繁体   English

如何在Jsoup中提取那些元素

[英]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. 但是,我无法提取标题,并且尝试提取标签“ Abstract”,但没有用。

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

图片

Try this: 尝试这个:

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM