mirror of
https://github.com/201206030/novel.git
synced 2025-04-27 07:30:50 +00:00
更新bug修复
This commit is contained in:
parent
637b01e50b
commit
d4230f32b0
@ -35,7 +35,7 @@ public class BiquCrawlSource extends BaseHtmlCrawlSource {
|
||||
Map<Integer,Date> newCat2Date = new HashMap<>();
|
||||
for(int i=1;i<=7;i++) {
|
||||
Date lastUpdateTime = cat2Date.get(i);
|
||||
Date updateTime = lastUpdateTime;
|
||||
Date updateTime = null;
|
||||
int page = 1;
|
||||
do{
|
||||
String catBookListUrl = getListPageUrl().replace("{0}", i+"").replace("{1}", page + "");
|
||||
@ -62,7 +62,7 @@ public class BiquCrawlSource extends BaseHtmlCrawlSource {
|
||||
|
||||
boolean isBookNameMatch = bookNameMatch.find();
|
||||
|
||||
while (isFind && scoreFind && isBookNameMatch && authorMatch.find() && updateTime.getTime()>lastUpdateTime.getTime()) {
|
||||
while (isFind && scoreFind && isBookNameMatch && authorMatch.find() && (updateTime==null || updateTime.getTime()>lastUpdateTime.getTime())) {
|
||||
|
||||
try {
|
||||
Float score = Float.parseFloat(scoreMatch.group(1));
|
||||
@ -116,7 +116,7 @@ public class BiquCrawlSource extends BaseHtmlCrawlSource {
|
||||
|
||||
}
|
||||
}
|
||||
}while (updateTime.getTime()>lastUpdateTime.getTime());
|
||||
}while (updateTime == null || updateTime.getTime()>lastUpdateTime.getTime());
|
||||
}
|
||||
bookService.updateBookUpdateTimeLog(newCat2Date);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user