mirror of
https://gitee.com/novel_dev_team/novel-plus
synced 2026-07-20 17:54:59 +08:00
fix(novel-crawl): 修复部分源无法停止的问题
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user