From 5b7cfb5ca8abe65d736da08a64d17685f1a52db9 Mon Sep 17 00:00:00 2001 From: AwkwardPeak7 <48650614+AwkwardPeak7@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:01:03 +0500 Subject: [PATCH] fix adultwebtoon & hentaiwebtoon (#5679) --- src/en/adultwebtoon/build.gradle | 2 +- .../extension/en/adultwebtoon/AdultWebtoon.kt | 13 ++----------- src/en/hentaiwebtoon/build.gradle | 2 +- .../extension/en/hentaiwebtoon/HentaiWebtoon.kt | 13 ++----------- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/en/adultwebtoon/build.gradle b/src/en/adultwebtoon/build.gradle index eabdc0ae4..3fa7ea1b8 100644 --- a/src/en/adultwebtoon/build.gradle +++ b/src/en/adultwebtoon/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.AdultWebtoon' themePkg = 'madara' baseUrl = 'https://adultwebtoon.com' - overrideVersionCode = 3 + overrideVersionCode = 4 isNsfw = true } diff --git a/src/en/adultwebtoon/src/eu/kanade/tachiyomi/extension/en/adultwebtoon/AdultWebtoon.kt b/src/en/adultwebtoon/src/eu/kanade/tachiyomi/extension/en/adultwebtoon/AdultWebtoon.kt index 5a61e610c..fb797317f 100644 --- a/src/en/adultwebtoon/src/eu/kanade/tachiyomi/extension/en/adultwebtoon/AdultWebtoon.kt +++ b/src/en/adultwebtoon/src/eu/kanade/tachiyomi/extension/en/adultwebtoon/AdultWebtoon.kt @@ -2,10 +2,8 @@ package eu.kanade.tachiyomi.extension.en.adultwebtoon 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") { override val mangaSubString = "adult-webtoon" @@ -15,15 +13,8 @@ class AdultWebtoon : Madara("Adult Webtoon", "https://adultwebtoon.com", "en") { 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 searchMangaSelector() = popularMangaSelector() + override fun searchMangaNextPageSelector() = popularMangaNextPageSelector() override fun oldXhrChaptersRequest(mangaId: String): Request { val form = FormBody.Builder() diff --git a/src/en/hentaiwebtoon/build.gradle b/src/en/hentaiwebtoon/build.gradle index 1ad06e45c..3e6b417c7 100644 --- a/src/en/hentaiwebtoon/build.gradle +++ b/src/en/hentaiwebtoon/build.gradle @@ -3,7 +3,7 @@ ext { extClass = '.HentaiWebtoon' themePkg = 'madara' baseUrl = 'https://hentaiwebtoon.com' - overrideVersionCode = 2 + overrideVersionCode = 3 isNsfw = true } diff --git a/src/en/hentaiwebtoon/src/eu/kanade/tachiyomi/extension/en/hentaiwebtoon/HentaiWebtoon.kt b/src/en/hentaiwebtoon/src/eu/kanade/tachiyomi/extension/en/hentaiwebtoon/HentaiWebtoon.kt index 53185adba..2700fcd67 100644 --- a/src/en/hentaiwebtoon/src/eu/kanade/tachiyomi/extension/en/hentaiwebtoon/HentaiWebtoon.kt +++ b/src/en/hentaiwebtoon/src/eu/kanade/tachiyomi/extension/en/hentaiwebtoon/HentaiWebtoon.kt @@ -2,11 +2,9 @@ package eu.kanade.tachiyomi.extension.en.hentaiwebtoon 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.Document -import org.jsoup.nodes.Element class HentaiWebtoon : Madara("HentaiWebtoon", "https://hentaiwebtoon.com", "en") { @@ -18,15 +16,8 @@ class HentaiWebtoon : Madara("HentaiWebtoon", "https://hentaiwebtoon.com", "en") 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 searchMangaSelector() = popularMangaSelector() + override fun searchMangaNextPageSelector() = popularMangaNextPageSelector() override fun oldXhrChaptersRequest(mangaId: String): Request { val form = FormBody.Builder()