Fix mangas not loading at Tsuki. (#4770)

Fix mangas not loading at Tsuki
This commit is contained in:
Alessandro Jean 2020-11-02 19:52:14 -03:00 committed by GitHub
parent 889c24ba7c
commit 2d3f3c1a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'Tsuki Mangás'
pkgNameSuffix = 'pt.tsukimangas'
extClass = '.TsukiMangas'
extVersionCode = 2
extVersionCode = 3
libVersion = '1.2'
}

View File

@ -178,7 +178,7 @@ class TsukiMangas : HttpSource() {
}
override fun mangaDetailsParse(response: Response): SManga {
val result = response.asJson().array[0].obj
val result = response.asJson().obj["manga"].array[0].obj
return SManga.create().apply {
title = result["TITULO"].string
@ -335,7 +335,8 @@ class TsukiMangas : HttpSource() {
private fun Response.asJson(): JsonElement = JSON_PARSER.parse(body()!!.string())
companion object {
private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36"
private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " +
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36"
private val JSON_PARSER by lazy { JsonParser() }