Ikiru: fix search & chapter list (#11060)

This commit is contained in:
Luqman 2025-10-15 19:46:39 +07:00 committed by Draff
parent f85c52aa38
commit 979ae7f53f
Signed by: Draff
GPG Key ID: E8A89F3211677653
2 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
ext {
extName = 'Ikiru'
extClass = '.Ikiru'
extVersionCode = 42
extVersionCode = 43
isNsfw = true
}

View File

@ -66,7 +66,7 @@ class Ikiru : ParsedHttpSource() {
if (searchNonce.isNullOrEmpty()) {
val document = client.newCall(
GET("$baseUrl/ajax-call?type=search_form&action=get_nonce", headers),
GET("$baseUrl/wp-admin/admin-ajax.php?type=search_form&action=get_nonce", headers),
).execute().asJsoup()
searchNonce = document.selectFirst("input[name=search_nonce]")!!.attr("value")
}
@ -78,7 +78,7 @@ class Ikiru : ParsedHttpSource() {
.addFormDataPart("nonce", searchNonce!!)
.build()
return POST("$baseUrl/ajax-call?action=advanced_search", body = requestBody)
return POST("$baseUrl/wp-admin/admin-ajax.php?action=advanced_search", body = requestBody)
}
override fun searchMangaSelector() = "div.overflow-hidden:has(a.font-medium)"
@ -127,7 +127,7 @@ class Ikiru : ParsedHttpSource() {
?: client.newCall(mangaDetailsRequest(manga)).execute().asJsoup().getMangaId()
?: throw Exception("Could not find manga ID")
val chapterListUrl = "$baseUrl/ajax-call".toHttpUrl().newBuilder()
val chapterListUrl = "$baseUrl/wp-admin/admin-ajax.php".toHttpUrl().newBuilder()
.addQueryParameter("manga_id", mangaId)
.addQueryParameter("page", "${Random.nextInt(99, 9999)}") // keep above 3 for loading hidden chapter
.addQueryParameter("action", "chapter_list")