优化
This commit is contained in:
@@ -120,7 +120,7 @@ object BookContent {
|
|||||||
analyzeContent(
|
analyzeContent(
|
||||||
book, urlStr, res.url, res.body!!, contentRule,
|
book, urlStr, res.url, res.body!!, contentRule,
|
||||||
bookChapter, bookSource, mNextChapterUrl,
|
bookChapter, bookSource, mNextChapterUrl,
|
||||||
getNextChapterUrl = false,
|
getNextPageUrl = false,
|
||||||
printLog = false
|
printLog = false
|
||||||
).first
|
).first
|
||||||
}
|
}
|
||||||
@@ -160,7 +160,7 @@ object BookContent {
|
|||||||
chapter: BookChapter,
|
chapter: BookChapter,
|
||||||
bookSource: BookSource,
|
bookSource: BookSource,
|
||||||
nextChapterUrl: String?,
|
nextChapterUrl: String?,
|
||||||
getNextChapterUrl: Boolean = true,
|
getNextPageUrl: Boolean = true,
|
||||||
printLog: Boolean = true
|
printLog: Boolean = true
|
||||||
): Pair<String, List<String>> {
|
): Pair<String, List<String>> {
|
||||||
val analyzeRule = AnalyzeRule(book, bookSource)
|
val analyzeRule = AnalyzeRule(book, bookSource)
|
||||||
@@ -173,7 +173,7 @@ object BookContent {
|
|||||||
var content = analyzeRule.getString(contentRule.content, unescape = false)
|
var content = analyzeRule.getString(contentRule.content, unescape = false)
|
||||||
content = HtmlFormatter.formatKeepImg(content, rUrl)
|
content = HtmlFormatter.formatKeepImg(content, rUrl)
|
||||||
//获取下一页链接
|
//获取下一页链接
|
||||||
if (getNextChapterUrl) {
|
if (getNextPageUrl) {
|
||||||
val nextUrlRule = contentRule.nextContentUrl
|
val nextUrlRule = contentRule.nextContentUrl
|
||||||
if (!nextUrlRule.isNullOrEmpty()) {
|
if (!nextUrlRule.isNullOrEmpty()) {
|
||||||
Debug.log(bookSource.bookSourceUrl, "┌获取正文下一页链接", printLog)
|
Debug.log(bookSource.bookSourceUrl, "┌获取正文下一页链接", printLog)
|
||||||
|
|||||||
Reference in New Issue
Block a user