mirror of
https://github.com/gedoor/legado.git
synced 2024-08-30 09:23:26 +08:00
优化
This commit is contained in:
parent
d5dcafd572
commit
48550be1bb
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user