【发布时间】:2018-09-04 16:51:57
【问题描述】:
我想从下表中提取甲板名称,即“Jund”。我为此目的使用 Jsoup。我已经能够使用表包含的类提取所需的表,但我无法提取牌组名称。
<table style="width:100%;padding:35px;" class="table_deck">
<tbody>
<tr>
<th style="width:66%;" align="left" colspan="2"> Reid Duke playing Jund </th>
<th scope="position"> Position: 18 </th>
</tr>
<tr>
<th style="width:66%;" align="left" colspan="2"> Deck Name: Jund </th>
<th scope="hide"> Sideboard </th>
</tr>
</tbody>
</table>
我正在使用以下代码来获取所需类中存在的所需表。我是 scala 的新手,你的帮助对我很有帮助。
val jsoup = Jsoup.parse(content)
val table = jsoup.select("table[class=table_deck]").first()
【问题讨论】:
标签: java html scala parsing jsoup