Update MangareadRepository.kt

This commit is contained in:
XeroOl
2021-09-01 02:59:22 -05:00
committed by Koitharu
parent 6596dca291
commit 5d5ec719b7

View File

@@ -99,8 +99,8 @@ class MangareadRepository(
val root2 = doc.body().selectFirst("div.content-area")
?.selectFirst("div.c-page")
?: throw ParseException("Root2 not found")
val mangaId = doc.getElementsByAttribute("data-postid").firstOrNull()
?.attr("data-postid")?.toLongOrNull()
val mangaId = doc.getElementsByAttribute("data-post").firstOrNull()
?.attr("data-post")?.toLongOrNull()
?: throw ParseException("Cannot obtain manga id")
val doc2 = loaderContext.httpPost(
"https://${getDomain()}/wp-admin/admin-ajax.php",
@@ -169,4 +169,4 @@ class MangareadRepository(
it.substring(0, pos) to it.substring(pos + 1)
}.toMutableMap()
}
}
}