File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
app/src/main/java/me/ghui/v2er/network/bean Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2121public class NodeTopicInfo extends BaseInfo {
2222
2323 @ Pick ("span.topic-count strong" )
24- private int total ;
24+ public String totalStr ;
2525 @ Pick (value = "a[href*=favorite/] " , attr = Attrs .HREF )
2626 private String favoriteLink ;
2727 @ Pick ("div.box div.cell:has(table)" )
@@ -32,7 +32,11 @@ public void setItems(List<Item> items) {
3232 }
3333
3434 public int getTotal () {
35- return total ;
35+ try {
36+ return Integer .parseInt (totalStr .replaceAll ("[^0-9]" , "" ));
37+ } catch (Exception e ) {
38+ return 0 ;
39+ }
3640 }
3741
3842 public List <Item > getItems () {
@@ -66,7 +70,7 @@ public String getOnce() {
6670 public String toString () {
6771 return "NodeTopicInfo{" +
6872 "favoriteLink=" + favoriteLink +
69- ",total=" + total +
73+ ",total=" + totalStr +
7074 ", items=" + items +
7175 '}' ;
7276 }
You can’t perform that action at this time.
0 commit comments