修正 sad panda 识别

This commit is contained in:
seven332 committed 2014-05-29 22:01:40 +08:00
1 parent ea18b8c090
commit 65e908546b
2 files changed
+5 -3

No files matched your search

@@ -589,7 +589,11 @@ public class EhClient {
break;
case ListParser.NOT_FOUND:
maxPage = 0;
indexPerPage = parser.indexPerPage;
lmdArray = new ArrayList<GalleryInfo>();
break;
case ListParser.PARSER_ERROR:
eMsg = "parser error";
}
} else
eMsg = hp.getEMsg();
@@ -31,7 +31,7 @@ public class ListParser {
public static final int SAD_PANDA = 0x3;
public static final int PARSER_ERROR = -1;
public int indexPerPage;
public int indexPerPage = 25;
public int maxPage;
public ArrayList<GalleryInfo> giList;
@@ -49,8 +49,6 @@ public class ListParser {
int maxIndex = Integer.parseInt(m.group(3).replace(",", ""));
if (endIndex != maxIndex || startIndex == 1)
indexPerPage = endIndex - startIndex + 1;
else
indexPerPage = 25; // default
maxPage = (maxIndex + indexPerPage - 1) / indexPerPage;
} else if (pageContext.contains("No hits found</p></div>")) {
maxPage = 0;