【发布时间】:2018-03-13 17:32:27
【问题描述】:
我正在使用 JSoup 解析网站的 html。我想解析这部分:
<td class="lastpost">
This is a text 1<br>
<a href="post/13594">Website Page - 1</a>
</td>
我想要这样:
String text = "This is a text 1";
String textNo = "Website Page - 1";
String link = "post/13594";
我怎样才能得到这样的零件?
【问题讨论】:
-
你能发布你迄今为止尝试过的代码吗?
-
其实我做不到:String lastPost = thread.select("td.lastpost").text();