diff --git a/src/es/kumanga/build.gradle b/src/es/kumanga/build.gradle index 3d56d6375..c8b49fc8a 100755 --- a/src/es/kumanga/build.gradle +++ b/src/es/kumanga/build.gradle @@ -5,7 +5,7 @@ ext { extName = 'Kumanga' pkgNameSuffix = 'es.kumanga' extClass = '.Kumanga' - extVersionCode = 4 + extVersionCode = 5 libVersion = '1.2' } diff --git a/src/es/kumanga/src/eu/kanade/tachiyomi/extension/es/kumanga/Kumanga.kt b/src/es/kumanga/src/eu/kanade/tachiyomi/extension/es/kumanga/Kumanga.kt index 002a7063b..5b2240a78 100755 --- a/src/es/kumanga/src/eu/kanade/tachiyomi/extension/es/kumanga/Kumanga.kt +++ b/src/es/kumanga/src/eu/kanade/tachiyomi/extension/es/kumanga/Kumanga.kt @@ -61,10 +61,13 @@ class Kumanga : HttpSource() { .build() private var kumangaToken = "" + private val tokenRegex = Regex(""""([^"\s]{100,})"""") private fun getKumangaToken() { kumangaToken = client.newCall(GET("$baseUrl/mangalist?&page=1", headers)).execute().asJsoup() - .select("div.input-group [type=hidden]").firstOrNull()?.outerHtml()?.substringBeforeLast("\"")?.substringAfterLast("\"") + .select("div.input-group [type=hidden]") + .firstOrNull() + ?.let { tokenRegex.find(it.outerHtml())?.groupValues?.get(1) } ?: throw IOException("No fue posible obtener la lista de mangas") }