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 a06f32d74..d479172a3 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 @@ -119,7 +119,7 @@ object BookInfo { Debug.log(bookSource.bookSourceUrl, "┌获取封面链接") try { analyzeRule.getString(infoRule.coverUrl).let { - if (it.isNotEmpty()) book.coverUrl = NetworkUtils.getAbsoluteURL(redirectUrl, it) + if (it.isNotEmpty()) book.coverUrl = NetworkUtils.getAbsoluteURL(baseUrl, it) } Debug.log(bookSource.bookSourceUrl, "└${book.coverUrl}") } catch (e: Exception) { @@ -128,8 +128,8 @@ object BookInfo { scope.ensureActive() Debug.log(bookSource.bookSourceUrl, "┌获取目录链接") book.tocUrl = analyzeRule.getString(infoRule.tocUrl, true) - if (book.tocUrl.isEmpty()) book.tocUrl = baseUrl - if (book.tocUrl == baseUrl) { + if (book.tocUrl.isEmpty()) book.tocUrl = redirectUrl + if (book.tocUrl == redirectUrl) { book.tocHtml = body } Debug.log(bookSource.bookSourceUrl, "└${book.tocUrl}")