|
|
@ -179,31 +179,37 @@ class WebBook(val bookSource: BookSource) { |
|
|
|
Debug.log(sourceUrl, "⇒正文规则为空,使用章节链接:${bookChapter.url}") |
|
|
|
Debug.log(sourceUrl, "⇒正文规则为空,使用章节链接:${bookChapter.url}") |
|
|
|
return bookChapter.url |
|
|
|
return bookChapter.url |
|
|
|
} |
|
|
|
} |
|
|
|
val body = |
|
|
|
return if (bookChapter.url == book.bookUrl && !book.tocHtml.isNullOrEmpty()) { |
|
|
|
if (bookChapter.url == book.bookUrl && !book.tocHtml.isNullOrEmpty()) { |
|
|
|
BookContent.analyzeContent( |
|
|
|
book.tocHtml |
|
|
|
scope, |
|
|
|
|
|
|
|
book.tocHtml, |
|
|
|
|
|
|
|
book, |
|
|
|
|
|
|
|
bookChapter, |
|
|
|
|
|
|
|
bookSource, |
|
|
|
|
|
|
|
bookChapter.getAbsoluteURL(), |
|
|
|
|
|
|
|
nextChapterUrl |
|
|
|
|
|
|
|
) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
val analyzeUrl = AnalyzeUrl( |
|
|
|
val res = AnalyzeUrl( |
|
|
|
ruleUrl = bookChapter.getAbsoluteURL(), |
|
|
|
ruleUrl = bookChapter.getAbsoluteURL(), |
|
|
|
baseUrl = book.tocUrl, |
|
|
|
baseUrl = book.tocUrl, |
|
|
|
headerMapF = bookSource.getHeaderMap(), |
|
|
|
headerMapF = bookSource.getHeaderMap(), |
|
|
|
book = book, |
|
|
|
book = book, |
|
|
|
chapter = bookChapter |
|
|
|
chapter = bookChapter |
|
|
|
) |
|
|
|
).getResponseAwait( |
|
|
|
analyzeUrl.getResponseAwait( |
|
|
|
|
|
|
|
bookSource.bookSourceUrl, |
|
|
|
bookSource.bookSourceUrl, |
|
|
|
jsStr = bookSource.getContentRule().webJs, |
|
|
|
jsStr = bookSource.getContentRule().webJs, |
|
|
|
sourceRegex = bookSource.getContentRule().sourceRegex |
|
|
|
sourceRegex = bookSource.getContentRule().sourceRegex |
|
|
|
).body |
|
|
|
) |
|
|
|
} |
|
|
|
BookContent.analyzeContent( |
|
|
|
return BookContent.analyzeContent( |
|
|
|
|
|
|
|
scope, |
|
|
|
scope, |
|
|
|
body, |
|
|
|
res.body, |
|
|
|
book, |
|
|
|
book, |
|
|
|
bookChapter, |
|
|
|
bookChapter, |
|
|
|
bookSource, |
|
|
|
bookSource, |
|
|
|
bookChapter.url, |
|
|
|
res.url, |
|
|
|
nextChapterUrl |
|
|
|
nextChapterUrl |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |