pull/464/head
gedoor 4 years ago
parent dab5add93a
commit 35ab379d19
  1. 28
      app/src/main/java/io/legado/app/model/webBook/WebBook.kt

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