HentaiDex | Added HentaiDex (#4534)

* Add HentaiDex

* Thumbnail

* Use mangathemesia

* Use mangathemesia

* Use mangathemesia

* Apply suggestion

Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>

* Fix chapters location

---------

Co-authored-by: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com>
This commit is contained in:
KenjieDec 2024-08-11 14:53:50 +07:00 committed by Draff
parent 9211ccee37
commit a1c813a40d
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
7 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,10 @@
ext {
extName = 'HentaiDex'
extClass = '.HentaiDex'
themePkg = 'mangathemesia'
baseUrl = 'https://dexhentai.com'
overrideVersionCode = 0
isNsfw = true
}
apply from: "$rootDir/common.gradle"

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,25 @@
package eu.kanade.tachiyomi.extension.en.hentaidex
import eu.kanade.tachiyomi.multisrc.mangathemesia.MangaThemesia
import eu.kanade.tachiyomi.source.model.SChapter
import okhttp3.Response
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
class HentaiDex : MangaThemesia(
"HentaiDex",
"https://dexhentai.com",
"en",
dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale.US),
) {
override fun chapterListParse(response: Response): List<SChapter> = super.chapterListParse(response).sortedByDescending { it.chapter_number }
override fun chapterFromElement(element: Element) = SChapter.create().apply {
val urlElements = element.select("a")
setUrlWithoutDomain(urlElements.attr("href"))
name = element.select(".chapternum").text().ifBlank { urlElements.first()!!.text() }
chapter_number = element.attr("data-num").toFloat()
date_upload = element.selectFirst(".chapterdate")?.text().parseChapterDate()
}
}