|
|
@ -158,12 +158,11 @@ object BookChapterList { |
|
|
|
val urlRule = analyzeRule.splitSourceRule(tocRule.chapterUrl ?: "") |
|
|
|
val urlRule = analyzeRule.splitSourceRule(tocRule.chapterUrl ?: "") |
|
|
|
for (item in elements) { |
|
|
|
for (item in elements) { |
|
|
|
analyzeRule.setContent(item) |
|
|
|
analyzeRule.setContent(item) |
|
|
|
val title = analyzeRule.getString(nameRule) |
|
|
|
val bookChapter = BookChapter(bookUrl = book.bookUrl) |
|
|
|
if (title.isNotEmpty()) { |
|
|
|
bookChapter.title = analyzeRule.getString(nameRule) |
|
|
|
val bookChapter = BookChapter(bookUrl = book.bookUrl) |
|
|
|
bookChapter.url = analyzeRule.getString(urlRule, true) |
|
|
|
bookChapter.title = title |
|
|
|
if (bookChapter.url.isEmpty()) bookChapter.url = baseUrl |
|
|
|
bookChapter.url = analyzeRule.getString(urlRule, true) |
|
|
|
if (bookChapter.title.isNotEmpty()) { |
|
|
|
if (bookChapter.url.isEmpty()) bookChapter.url = baseUrl |
|
|
|
|
|
|
|
chapterList.add(bookChapter) |
|
|
|
chapterList.add(bookChapter) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|