fix yanmaga not show chapter list (#11039)

fix yanmaga1.4.2 not show chapter list
This commit is contained in:
Chentao Ye 2025-10-13 21:06:18 +08:00 committed by Draff
parent 5997e5507e
commit 9f9cf36a20
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = "Weekly Young Magazine"
extClass = ".YanmagaFactory"
extVersionCode = 2
extVersionCode = 3
isNsfw = true
}

View File

@ -79,10 +79,10 @@ abstract class Yanmaga(
val chapterUrl = response.request.url.toString()
val firstChapterList = document
.select("ul.mod-episode-list:first-of-type > li.mod-episode-item")
.select("ul.mod-episode-list:first-of-type > li.mod-episode-item:has(.mod-episode-title)")
.map { chapterFromElement(it) }
val lastChapterList = document
.select("ul.mod-episode-list:last-of-type > li.mod-episode-item")
.select("ul.mod-episode-list:last-of-type > li.mod-episode-item:has(.mod-episode-title)")
.map { chapterFromElement(it) }
val totalChapterCount = document
.selectFirst("#contents")
@ -132,7 +132,7 @@ abstract class Yanmaga(
.filter { it.url.isNotEmpty() }
}
override fun chapterListSelector() = "ul.mod-episode-list > li.mod-episode-item"
override fun chapterListSelector() = "ul.mod-episode-list > li.mod-episode-item:has(.mod-episode-title)"
override fun chapterFromElement(element: Element) = SChapter.create().apply {
// The first chapter sometimes is a fake one. However, this still count towards the total