Mangahasu: Fix page parsing (#8319)

* Fix page parsing and update url

* Updated version
This commit is contained in:
Arraiment 2021-07-30 18:24:23 +08:00 committed by GitHub
parent 95c8d93798
commit 9030729538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ ext {
extName = 'Mangahasu' extName = 'Mangahasu'
pkgNameSuffix = 'en.mangahasu' pkgNameSuffix = 'en.mangahasu'
extClass = '.Mangahasu' extClass = '.Mangahasu'
extVersionCode = 12 extVersionCode = 13
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -27,7 +27,7 @@ class Mangahasu : ParsedHttpSource() {
override val name = "Mangahasu" override val name = "Mangahasu"
override val baseUrl = "http://mangahasu.se" override val baseUrl = "https://mangahasu.se"
override val lang = "en" override val lang = "en"
@ -165,7 +165,8 @@ class Mangahasu : ParsedHttpSource() {
.substringBefore("\"") .substringBefore("\"")
// Base64 = [] or empty file // Base64 = [] or empty file
if (lstDUrls != "W10=") { // Ensures lstDUrls exists, otherwise errors will occur
if (lstDUrls.isNotEmpty() && lstDUrls != "W10=") {
val jsonRaw = String(Base64.decode(lstDUrls, Base64.DEFAULT)) val jsonRaw = String(Base64.decode(lstDUrls, Base64.DEFAULT))
val jsonArr = json.parseToJsonElement(jsonRaw).jsonArray val jsonArr = json.parseToJsonElement(jsonRaw).jsonArray