Update pageListParse for DBZ Multiverse (#371)

Update pageListParse
This commit is contained in:
Mike 2024-01-19 05:10:49 -05:00 committed by GitHub
parent b233e0e4a8
commit 99d6b6b90c
2 changed files with 14 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'Dragon Ball Multiverse' extName = 'Dragon Ball Multiverse'
extClass = '.DbMFactory' extClass = '.DbMFactory'
extVersionCode = 5 extVersionCode = 6
} }
apply from: "$rootDir/common.gradle" apply from: "$rootDir/common.gradle"

View File

@ -39,8 +39,18 @@ abstract class DbMultiverse(override val lang: String, private val internalLang:
} }
override fun pageListParse(document: Document): List<Page> { override fun pageListParse(document: Document): List<Page> {
return document.select("div#h_read img").mapIndexed { index, element -> return document.select("#balloonsimg")
Page(index, "", element.attr("abs:src")) .let { e ->
listOf(
if (e.hasAttr("src")) {
Page(1, "", e.attr("abs:src"))
} else {
e.attr("style")
.substringAfter("(")
.substringBefore(")")
.let { Page(1, "", baseUrl + it) }
},
)
} }
} }