Update domain Hentaivn and fix not show images (#17187)

* Update build.gradle

* Change base Url and fix not show images
This commit is contained in:
are-are-are 2023-07-21 09:06:27 +07:00 committed by GitHub
parent 93cc190c6c
commit a5f7456df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'HentaiVN'
pkgNameSuffix = 'vi.hentaivn'
extClass = '.HentaiVN'
extVersionCode = 26
extVersionCode = 27
isNsfw = true
}

View File

@ -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<Page> {
return document.select("#image > img").mapIndexed { i, e ->
return document.select("img").mapIndexed { i, e ->
Page(i, imageUrl = e.attr("abs:src"))
}
}