From 23f8d95b1dfe197425b158b48fa39ff8564dd931 Mon Sep 17 00:00:00 2001 From: Mike <51273546+SnakeDoc83@users.noreply.github.com> Date: Fri, 19 Jan 2024 05:10:49 -0500 Subject: [PATCH] Update pageListParse for DBZ Multiverse (#371) Update pageListParse --- src/all/dragonballmultiverse/build.gradle | 2 +- .../all/dragonballmultiverse/DbMultiverse.kt | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/all/dragonballmultiverse/build.gradle b/src/all/dragonballmultiverse/build.gradle index dc6e302cb..08d7cab05 100644 --- a/src/all/dragonballmultiverse/build.gradle +++ b/src/all/dragonballmultiverse/build.gradle @@ -2,7 +2,7 @@ ext { extName = 'Dragon Ball Multiverse' pkgNameSuffix = 'all.dragonballmultiverse' extClass = '.DbMFactory' - extVersionCode = 5 + extVersionCode = 6 } apply from: "$rootDir/common.gradle" diff --git a/src/all/dragonballmultiverse/src/eu/kanade/tachiyomi/extension/all/dragonballmultiverse/DbMultiverse.kt b/src/all/dragonballmultiverse/src/eu/kanade/tachiyomi/extension/all/dragonballmultiverse/DbMultiverse.kt index c9fbb06e0..14f8d8d7b 100644 --- a/src/all/dragonballmultiverse/src/eu/kanade/tachiyomi/extension/all/dragonballmultiverse/DbMultiverse.kt +++ b/src/all/dragonballmultiverse/src/eu/kanade/tachiyomi/extension/all/dragonballmultiverse/DbMultiverse.kt @@ -39,9 +39,19 @@ abstract class DbMultiverse(override val lang: String, private val internalLang: } override fun pageListParse(document: Document): List { - return document.select("div#h_read img").mapIndexed { index, element -> - Page(index, "", element.attr("abs:src")) - } + return document.select("#balloonsimg") + .let { e -> + listOf( + if (e.hasAttr("src")) { + Page(1, "", e.attr("abs:src")) + } else { + e.attr("style") + .substringAfter("(") + .substringBefore(")") + .let { Page(1, "", baseUrl + it) } + }, + ) + } } override fun fetchPopularManga(page: Int): Observable {