From 9fbdb796861edec968dfc398f05debe28e025276 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 2 Aug 2019 11:02:23 +0800 Subject: [PATCH] up --- .../main/java/io/legado/app/model/analyzeRule/AnalyzeRule.kt | 2 +- app/src/main/java/io/legado/app/model/webbook/BookInfo.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, "执行详情页初始化规则")