Niceoppai: fix duplicate manga (#17192)

Update popularManga parser
This commit is contained in:
Vetle Ledaal 2023-07-21 04:07:20 +02:00 committed by GitHub
parent 8fd8a31db3
commit 4803df9e32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 9 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Niceoppai'
pkgNameSuffix = 'th.niceoppai'
extClass = '.Niceoppai'
extVersionCode = 27
extVersionCode = 28
isNsfw = true
}

View File

@ -43,16 +43,12 @@ class Niceoppai : ParsedHttpSource() {
return GET("$baseUrl/manga_list/all/any/most-popular-monthly/$page", headers)
}
override fun popularMangaSelector() = "div.nde"
override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create()
manga.title = element.select("div.det a").text()
override fun popularMangaFromElement(element: Element): SManga = SManga.create().apply {
title = element.selectFirst("div.det a")!!.text()
element.select("div.cvr").let {
manga.setUrlWithoutDomain(it.select("div.img_wrp a").attr("href"))
manga.thumbnail_url = it.select("img").attr("abs:src")
manga.initialized = false
setUrlWithoutDomain(it.select("a").attr("href"))
thumbnail_url = it.select("img").attr("abs:src")
}
return manga
}
override fun popularMangaNextPageSelector() = "ul.pgg li a"