diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt index 4c3545135..fead18fe8 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt @@ -195,7 +195,7 @@ class AnalyzeRule(private var book: BaseBook? = null) { Mode.Js -> result = evalJS(rule.rule, it) Mode.Json -> result = getAnalyzeByJSonPath(it).getString(rule.rule) Mode.XPath -> result = getAnalyzeByXPath(it).getString(rule.rule) - Mode.Default -> result = if (isUrl && !TextUtils.isEmpty(baseUrl)) { + Mode.Default -> result = if (isUrl) { getAnalyzeByJSoup(it).getString0(rule.rule) } else { getAnalyzeByJSoup(it).getString(rule.rule) diff --git a/app/src/main/java/io/legado/app/model/webbook/BookInfo.kt b/app/src/main/java/io/legado/app/model/webbook/BookInfo.kt index 988a1fa59..f678e5ed2 100644 --- a/app/src/main/java/io/legado/app/model/webbook/BookInfo.kt +++ b/app/src/main/java/io/legado/app/model/webbook/BookInfo.kt @@ -26,7 +26,7 @@ object BookInfo { SourceDebug.printLog(bookSource.bookSourceUrl, 1, "获取成功:$baseUrl") val infoRule = bookSource.getBookInfoRule() val analyzeRule = AnalyzeRule(book) - analyzeRule.setContent(body) + analyzeRule.setContent(body, baseUrl) infoRule.init?.let { if (it.isNotEmpty()) { SourceDebug.printLog(bookSource.bookSourceUrl, 1, "执行详情页初始化规则")