diff --git a/src/vi/hentaivn/build.gradle b/src/vi/hentaivn/build.gradle index 3e9d01343..875c40000 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 = 26 + extVersionCode = 27 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 866a6f873..405808f89 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 @@ -27,7 +27,7 @@ import java.util.Locale class HentaiVN : ParsedHttpSource() { - override val baseUrl = "https://hentaivn.autos" + override val baseUrl = "https://hentaivn.tv" override val lang = "vi" override val name = "HentaiVN" override val supportsLatest = true @@ -48,7 +48,7 @@ class HentaiVN : ParsedHttpSource() { else -> chain.proceed(originalRequest) } } - .rateLimit(3) + .rateLimit(1) .build() override fun headersBuilder(): Headers.Builder = super.headersBuilder() @@ -130,12 +130,18 @@ class HentaiVN : ParsedHttpSource() { status == null -> SManga.UNKNOWN status.contains("Đang tiến hành") -> SManga.ONGOING status.contains("Đã hoàn thành") -> SManga.COMPLETED + status.contains("Tạm ngưng") -> SManga.ON_HIATUS else -> SManga.UNKNOWN } // 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("#image > img").mapIndexed { i, e -> + return document.select("img").mapIndexed { i, e -> Page(i, imageUrl = e.attr("abs:src")) } }