Hide unavailable archive

This commit is contained in:
小白-白 authored and tarsin committed 2023-01-15 14:34:03 +08:00
1 parent 55b6b2e34d
commit ce274cf65b
1 file changed
+9 -6
@@ -49,12 +49,15 @@ public class ArchiveParser {
var es = d.select("#db>div>div");
for (var e : es) {
try {
var res = e.selectFirst("form>input").attr("value");
var name = e.selectFirst("form>div>input").attr("value");
var size = e.selectFirst("p>strong").text();
var cost = e.selectFirst("div>strong").text();
var item = new Archive(res, name, size, cost, false);
archiveList.add(item);
var btn = e.selectFirst("form>div>input");
if (!btn.hasAttr("disabled")) {
var res = e.selectFirst("form>input").attr("value");
var name = btn.attr("value");
var size = e.selectFirst("p>strong").text();
var cost = e.selectFirst("div>strong").text().replace(",", "");
var item = new Archive(res, name, size, cost, false);
archiveList.add(item);
}
} catch (NullPointerException ex) {
ex.printStackTrace();
}