Fix chapters not loading in MMK. (#8159)

This commit is contained in:
Alessandro Jean 2021-07-17 13:12:28 -03:00 committed by GitHub
parent fb1afd71b7
commit 532396e197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 4 deletions

View File

@ -6,8 +6,9 @@ ext {
extName = 'Mundo Mangá-Kun' extName = 'Mundo Mangá-Kun'
pkgNameSuffix = 'pt.mundomangakun' pkgNameSuffix = 'pt.mundomangakun'
extClass = '.MundoMangaKun' extClass = '.MundoMangaKun'
extVersionCode = 3 extVersionCode = 4
libVersion = '1.2' libVersion = '1.2'
containsNsfw = true
} }
dependencies { dependencies {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -1,5 +1,6 @@
package eu.kanade.tachiyomi.extension.pt.mundomangakun package eu.kanade.tachiyomi.extension.pt.mundomangakun
import eu.kanade.tachiyomi.annotations.Nsfw
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.Filter
@ -22,6 +23,7 @@ import org.jsoup.nodes.Element
import uy.kohesive.injekt.injectLazy import uy.kohesive.injekt.injectLazy
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
@Nsfw
class MundoMangaKun : ParsedHttpSource() { class MundoMangaKun : ParsedHttpSource() {
override val name = "Mundo Mangá-Kun" override val name = "Mundo Mangá-Kun"
@ -138,8 +140,8 @@ class MundoMangaKun : ParsedHttpSource() {
override fun pageListParse(document: Document): List<Page> { override fun pageListParse(document: Document): List<Page> {
return document.select("script:containsData(var paginas)").first().data() return document.select("script:containsData(var paginas)").first().data()
.substringAfter("var paginas = ") .substringAfter("var paginas = ")
.substringBefore(";var") .substringBefore("];")
.let { json.parseToJsonElement(it) } .let { json.parseToJsonElement("$it]") }
.jsonArray .jsonArray
.mapIndexed { i, page -> Page(i, document.location(), page.jsonPrimitive.content) } .mapIndexed { i, page -> Page(i, document.location(), page.jsonPrimitive.content) }
} }