Fix MangasProject token error. (#2109)

Fix MangasProject token error
This commit is contained in:
Alessandro Jean 2020-01-21 18:47:14 -03:00 committed by arkon
parent 6008e8cb6b
commit 86b263b82b
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: mangásPROJECT' appName = 'Tachiyomi: mangásPROJECT'
pkgNameSuffix = 'pt.mangasproject' pkgNameSuffix = 'pt.mangasproject'
extClass = '.MangasProjectFactory' extClass = '.MangasProjectFactory'
extVersionCode = 5 extVersionCode = 6
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -26,7 +26,7 @@ abstract class MangasProject(override val name: String,
override val supportsLatest = true override val supportsLatest = true
private val correctClient = if (name == "MangaLivre") network.cloudflareClient else network.client private val correctClient = network.cloudflareClient
// Sometimes the site is slow. // Sometimes the site is slow.
override val client = correctClient.newBuilder() override val client = correctClient.newBuilder()
@ -273,7 +273,7 @@ abstract class MangasProject(override val name: String,
return result return result
val document = result.asJsoup() val document = result.asJsoup()
val readerSrc = document.select("script[src*=\"reader.min.js\"]") val readerSrc = document.select("script[src*=\"reader.\"]")
?.attr("src") ?: "" ?.attr("src") ?: ""
val token = TOKEN_REGEX.find(readerSrc)?.groupValues?.get(1) ?: "" val token = TOKEN_REGEX.find(readerSrc)?.groupValues?.get(1) ?: ""