AdultWebtoons: fix chapter list & search (#4580)
This commit is contained in:
parent
a15350649f
commit
f7a92a1573
|
@ -3,7 +3,7 @@ ext {
|
||||||
extClass = '.AdultWebtoon'
|
extClass = '.AdultWebtoon'
|
||||||
themePkg = 'madara'
|
themePkg = 'madara'
|
||||||
baseUrl = 'https://adultwebtoon.com'
|
baseUrl = 'https://adultwebtoon.com'
|
||||||
overrideVersionCode = 2
|
overrideVersionCode = 3
|
||||||
isNsfw = true
|
isNsfw = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,36 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.adultwebtoon
|
package eu.kanade.tachiyomi.extension.en.adultwebtoon
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||||
|
import eu.kanade.tachiyomi.network.POST
|
||||||
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
|
import okhttp3.FormBody
|
||||||
|
import okhttp3.Request
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
class AdultWebtoon : Madara("Adult Webtoon", "https://adultwebtoon.com", "en") {
|
class AdultWebtoon : Madara("Adult Webtoon", "https://adultwebtoon.com", "en") {
|
||||||
override val mangaSubString = "adult-webtoon"
|
override val mangaSubString = "adult-webtoon"
|
||||||
|
override val useNewChapterEndpoint = false
|
||||||
|
override val sendViewCount = false
|
||||||
|
override val fetchGenres = false
|
||||||
|
override val useLoadMoreRequest = LoadMoreStrategy.Never
|
||||||
|
|
||||||
|
override fun popularMangaNextPageSelector() = "a.next"
|
||||||
|
override fun searchMangaSelector() = "li.movie-item > a"
|
||||||
|
override fun searchMangaNextPageSelector() = "a.next"
|
||||||
|
|
||||||
|
override fun searchMangaFromElement(element: Element): SManga {
|
||||||
|
return SManga.create().apply {
|
||||||
|
setUrlWithoutDomain(element.absUrl("href"))
|
||||||
|
title = element.attr("title")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun oldXhrChaptersRequest(mangaId: String): Request {
|
||||||
|
val form = FormBody.Builder()
|
||||||
|
.add("action", "ajax_chap")
|
||||||
|
.add("post_id", mangaId)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
return POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, form)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue