hentaifantasy: Thumbnail support (#4919)

* thumnail support

* change version
This commit is contained in:
mr-brune 2024-09-05 12:01:10 +02:00 committed by Draff
parent 7dd03b565b
commit 71e7c34dd7
No known key found for this signature in database
GPG Key ID: E8A89F3211677653
2 changed files with 7 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'HentaiFantasy' extName = 'HentaiFantasy'
extClass = '.HentaiFantasy' extClass = '.HentaiFantasy'
extVersionCode = 4 extVersionCode = 5
isNsfw = true isNsfw = true
} }

View File

@ -40,15 +40,18 @@ class HentaiFantasy : ParsedHttpSource() {
} }
} }
override fun popularMangaSelector() = "div.list > div.group > div.title > a" override fun popularMangaSelector() = "div.group"
override fun popularMangaRequest(page: Int) = override fun popularMangaRequest(page: Int) =
GET("$baseUrl/most_downloaded/$page/", headers) GET("$baseUrl/most_downloaded/$page/", headers)
override fun popularMangaFromElement(element: Element): SManga { override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create() val manga = SManga.create()
manga.setUrlWithoutDomain(element.attr("href"))
manga.title = element.text().trim() manga.setUrlWithoutDomain(element.selectFirst("div.title a")!!.attr("href"))
manga.title = element.selectFirst("div.title a")!!.attr("title")
manga.thumbnail_url = element.selectFirst("img.preview")?.attr("src")
return manga return manga
} }