From 7cade2b0518ae11eb4dc5874e28e598a415c3302 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 28 Sep 2021 09:12:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/JsExtensions.kt | 3 +++ .../main/java/io/legado/app/model/webBook/BookChapterList.kt | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/io/legado/app/help/JsExtensions.kt b/app/src/main/java/io/legado/app/help/JsExtensions.kt index bfc2cf0b5..1eb3651bf 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -45,6 +45,7 @@ interface JsExtensions { val analyzeUrl = AnalyzeUrl(urlStr, source = getSource()) analyzeUrl.getStrResponse().body }.onFailure { + log("ajax(${urlStr}) error\n${it.stackTraceToString()}") it.printOnDebug() }.getOrElse { it.msg @@ -80,6 +81,7 @@ interface JsExtensions { kotlin.runCatching { analyzeUrl.getStrResponse() }.onFailure { + log("connect(${urlStr}) error\n${it.stackTraceToString()}") it.printOnDebug() }.getOrElse { StrResponse(analyzeUrl.url, it.localizedMessage) @@ -94,6 +96,7 @@ interface JsExtensions { kotlin.runCatching { analyzeUrl.getStrResponse() }.onFailure { + log("ajax($urlStr,$header) error\n${it.stackTraceToString()}") it.printOnDebug() }.getOrElse { StrResponse(analyzeUrl.url, it.localizedMessage) diff --git a/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt b/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt index 2ed38e4b9..9c4235e1b 100644 --- a/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt +++ b/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt @@ -191,6 +191,7 @@ object BookChapterList { isPay = analyzeRule.getString(payRule) if (bookChapter.url.isEmpty()) { bookChapter.url = baseUrl + Debug.log(bookSource.bookSourceUrl, "未获取到url,使用baseUrl替代") } if (bookChapter.title.isNotEmpty()) { if (isVip.isNotEmpty() && !isVip.matches(falseRegex)) {