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 328d6cab4..efdb0397e 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 @@ -534,7 +534,7 @@ class AnalyzeRule(private var book: BaseBook? = null) { */ fun ajax(urlStr: String): String? { return try { - val analyzeUrl = AnalyzeUrl(urlStr, null, null, null, null, null) + val analyzeUrl = AnalyzeUrl(urlStr, null, null, null, baseUrl, book) val call = analyzeUrl.getResponse() val response = call.execute() response.body() diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt index bc45a46f9..c857134c2 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt @@ -7,7 +7,7 @@ import io.legado.app.constant.AppConst.SCRIPT_ENGINE import io.legado.app.constant.Pattern.EXP_PATTERN import io.legado.app.data.api.IHttpGetApi import io.legado.app.data.api.IHttpPostApi -import io.legado.app.data.entities.Book +import io.legado.app.data.entities.BaseBook import io.legado.app.help.http.HttpHelper import io.legado.app.utils.* import kotlinx.coroutines.Deferred @@ -35,7 +35,7 @@ class AnalyzeUrl( page: Int? = null, headerMapF: Map? = null, baseUrl: String? = null, - book: Book? = null + book: BaseBook? = null ) { companion object { private val pagePattern = Pattern.compile("<(.*?)>") @@ -80,7 +80,7 @@ class AnalyzeUrl( /** * 替换关键字,页数,JS */ - private fun replaceKeyPageJs(key: String?, page: Int?, book: Book?) { + private fun replaceKeyPageJs(key: String?, page: Int?, book: BaseBook?) { //page page?.let { val matcher = pagePattern.matcher(ruleUrl)