pull/1352/head
gedoor 3 years ago
parent e3e7756e39
commit 7cade2b051
  1. 3
      app/src/main/java/io/legado/app/help/JsExtensions.kt
  2. 1
      app/src/main/java/io/legado/app/model/webBook/BookChapterList.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)

@ -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)) {

Loading…
Cancel
Save