Mangagun: Fix thumbnail url selector (#10058)

fix thumbnail url selector
This commit is contained in:
dngonz 2025-08-09 10:54:47 +02:00 committed by Draff
parent 8d13fbaedc
commit 7a3053be7c
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 12 additions and 1 deletions

View File

@ -3,7 +3,7 @@ ext {
extClass = '.MangaGun'
themePkg = 'fmreader'
baseUrl = 'https://mangagun.net'
overrideVersionCode = 3
overrideVersionCode = 4
isNsfw = true
}

View File

@ -31,6 +31,17 @@ class MangaGun : FMReader("MangaGun", "https://$DOMAIN", "ja") {
override fun popularMangaRequest(page: Int): Request = mangaRequest("views", page)
override fun popularMangaFromElement(element: Element): SManga {
return SManga.create().apply {
element.select(headerSelector).let {
setUrlWithoutDomain(it.attr("abs:href"))
title = it.text()
}
thumbnail_url = element.select("img, .thumb-wrapper .img-in-ratio").attr("style")
.substringAfter("background-image:url(").substringBefore(")")
}
}
override fun latestUpdatesRequest(page: Int): Request = mangaRequest("last_update", page)
override fun getImgAttr(element: Element?): String? {