From 276e46402145ec404a2b960b71b486c81da5208d Mon Sep 17 00:00:00 2001 From: are-are-are <62763969+dejavui@users.noreply.github.com> Date: Sat, 29 Jul 2023 09:31:47 +0700 Subject: [PATCH] Hentaivn Fix bug "error 404 views chapter" (#17284) * Update build.gradle * Fix 404 HVN --- src/vi/hentaivn/build.gradle | 2 +- .../kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/vi/hentaivn/build.gradle b/src/vi/hentaivn/build.gradle index 875c40000..d0c6f5454 100644 --- a/src/vi/hentaivn/build.gradle +++ b/src/vi/hentaivn/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'HentaiVN' pkgNameSuffix = 'vi.hentaivn' extClass = '.HentaiVN' - extVersionCode = 27 + extVersionCode = 28 isNsfw = true } diff --git a/src/vi/hentaivn/src/eu/kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt b/src/vi/hentaivn/src/eu/kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt index 405808f89..398707240 100644 --- a/src/vi/hentaivn/src/eu/kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt +++ b/src/vi/hentaivn/src/eu/kanade/tachiyomi/extension/vi/hentaivn/HentaiVN.kt @@ -135,13 +135,8 @@ class HentaiVN : ParsedHttpSource() { } // Pages - override fun pageListRequest(chapter: SChapter): Request { - val mangaId = chapter.url.substringAfterLast("/").substringBefore('-') - val mangaEP = chapter.url.substringAfter("-").substringBefore("-") - return GET("$baseUrl/list-loadchapter.php?id_episode=$mangaEP&idchapshowz=$mangaId", headers) - } override fun pageListParse(document: Document): List { - return document.select("img").mapIndexed { i, e -> + return document.select("#image > img").mapIndexed { i, e -> Page(i, imageUrl = e.attr("abs:src")) } } @@ -172,7 +167,7 @@ class HentaiVN : ParsedHttpSource() { manga.setUrlWithoutDomain(it.attr("href")) manga.title = it.text().trim() } - manga.thumbnail_url = element.select("div.search-img img, .box-cover a img").attr("abs:src") + manga.thumbnail_url = element.select("div.search-img img").attr("abs:src") return manga }