私はこのようなテーブルを持っています:
<table class=firstclass>
<tr>
<td><a href....></a></td>
</tr>
<tr>
<td><a href....></a></td>
</tr>
<tr>
<td><a href....></a></td>
</tr>
このページには他のテーブルがあるので、次のようなものを使用する必要があると思います。
doc.select("td.firstclass > a[href]");
しかし、それは機能しません。
私はこれで解決しました:
Element table = doc.select("table.firstclass").first(); //gets a table with the class "first class"
Elements links = table.select("a[href]");
for (Element link : links) {
String textlink= link.text();
String urllink= link.attr("abs:href");
));
}
// ...