|
|
@ -177,6 +177,7 @@ object BookChapterList { |
|
|
|
val vipRule = analyzeRule.splitSourceRule(tocRule.isVip) |
|
|
|
val vipRule = analyzeRule.splitSourceRule(tocRule.isVip) |
|
|
|
val payRule = analyzeRule.splitSourceRule(tocRule.isPay) |
|
|
|
val payRule = analyzeRule.splitSourceRule(tocRule.isPay) |
|
|
|
val upTimeRule = analyzeRule.splitSourceRule(tocRule.updateTime) |
|
|
|
val upTimeRule = analyzeRule.splitSourceRule(tocRule.updateTime) |
|
|
|
|
|
|
|
val isVolumeRule = analyzeRule.splitSourceRule(tocRule.isVolume) |
|
|
|
elements.forEachIndexed { index, item -> |
|
|
|
elements.forEachIndexed { index, item -> |
|
|
|
scope.ensureActive() |
|
|
|
scope.ensureActive() |
|
|
|
analyzeRule.setContent(item) |
|
|
|
analyzeRule.setContent(item) |
|
|
@ -185,10 +186,20 @@ object BookChapterList { |
|
|
|
bookChapter.title = analyzeRule.getString(nameRule) |
|
|
|
bookChapter.title = analyzeRule.getString(nameRule) |
|
|
|
bookChapter.url = analyzeRule.getString(urlRule) |
|
|
|
bookChapter.url = analyzeRule.getString(urlRule) |
|
|
|
bookChapter.tag = analyzeRule.getString(upTimeRule) |
|
|
|
bookChapter.tag = analyzeRule.getString(upTimeRule) |
|
|
|
|
|
|
|
val isVolume = analyzeRule.getString(isVolumeRule) |
|
|
|
|
|
|
|
bookChapter.isVolume = false |
|
|
|
|
|
|
|
if (isVolume.isNotEmpty() && !isVolume.matches(falseRegex)) { |
|
|
|
|
|
|
|
bookChapter.isVolume = true |
|
|
|
|
|
|
|
} |
|
|
|
if (bookChapter.url.isEmpty()) { |
|
|
|
if (bookChapter.url.isEmpty()) { |
|
|
|
|
|
|
|
if (bookChapter.isVolume) { |
|
|
|
|
|
|
|
bookChapter.url = bookChapter.title |
|
|
|
|
|
|
|
Debug.log(bookSource.bookSourceUrl, "目录${index}(Volume)未获取到url,使用章节标题替代") |
|
|
|
|
|
|
|
} else { |
|
|
|
bookChapter.url = baseUrl |
|
|
|
bookChapter.url = baseUrl |
|
|
|
Debug.log(bookSource.bookSourceUrl, "目录${index}未获取到url,使用baseUrl替代") |
|
|
|
Debug.log(bookSource.bookSourceUrl, "目录${index}未获取到url,使用baseUrl替代") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
if (bookChapter.title.isNotEmpty()) { |
|
|
|
if (bookChapter.title.isNotEmpty()) { |
|
|
|
val isVip = analyzeRule.getString(vipRule) |
|
|
|
val isVip = analyzeRule.getString(vipRule) |
|
|
|
val isPay = analyzeRule.getString(payRule) |
|
|
|
val isPay = analyzeRule.getString(payRule) |
|
|
|