mirror of
https://github.com/201206030/novel-plus.git
synced 2025-05-17 07:18:29 +00:00
fix(novel-crawl): 修复部分源无法停止的问题
This commit is contained in:
parent
4f474b91a8
commit
55d5deea74
@ -256,7 +256,9 @@ public class CrawlServiceImpl implements CrawlService {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
String catIdRule = ruleBean.getCatIdRule().get("catId" + catId);
|
String catIdRule = ruleBean.getCatIdRule().get("catId" + catId);
|
||||||
if (StringUtils.isNotBlank(catIdRule)) {
|
if (StringUtils.isBlank(catIdRule) || Thread.currentThread().isInterrupted()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
String catBookListUrl = "";
|
String catBookListUrl = "";
|
||||||
if (StringUtils.isNotBlank(ruleBean.getBookListUrl())) {
|
if (StringUtils.isNotBlank(ruleBean.getBookListUrl())) {
|
||||||
// 兼容老规则
|
// 兼容老规则
|
||||||
@ -302,9 +304,6 @@ public class CrawlServiceImpl implements CrawlService {
|
|||||||
totalPage = Integer.parseInt(totalPageMatcher.group(1));
|
totalPage = Integer.parseInt(totalPageMatcher.group(1));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user