From 076cc105de5c777c7491054678dd84334a489b3d Mon Sep 17 00:00:00 2001 From: Luqman Date: Tue, 26 Sep 2023 01:54:54 +0700 Subject: [PATCH] Pojok Manga: fix browse, clean tag (#18136) -fix browse -remove spam tag -add rate limit --- .../overrides/madara/pojokmanga/src/PojokManga.kt | 11 +++++++++++ .../tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/multisrc/overrides/madara/pojokmanga/src/PojokManga.kt b/multisrc/overrides/madara/pojokmanga/src/PojokManga.kt index 87d440a0c..6cde6c452 100644 --- a/multisrc/overrides/madara/pojokmanga/src/PojokManga.kt +++ b/multisrc/overrides/madara/pojokmanga/src/PojokManga.kt @@ -2,17 +2,26 @@ package eu.kanade.tachiyomi.extension.id.pojokmanga import eu.kanade.tachiyomi.multisrc.madara.Madara import eu.kanade.tachiyomi.network.GET +import eu.kanade.tachiyomi.network.interceptor.rateLimit import eu.kanade.tachiyomi.source.model.Filter import eu.kanade.tachiyomi.source.model.FilterList import okhttp3.HttpUrl.Companion.toHttpUrlOrNull +import okhttp3.OkHttpClient import okhttp3.Request import java.text.SimpleDateFormat import java.util.Locale +import java.util.concurrent.TimeUnit class PojokManga : Madara("Pojok Manga", "https://pojokmanga.net", "id", SimpleDateFormat("MMM dd, yyyy", Locale.US)) { + override val client: OkHttpClient = super.client.newBuilder() + .rateLimit(20, 4, TimeUnit.SECONDS) + .build() + override val useNewChapterEndpoint = true + override val mangaSubString = "komik" + override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { var url = "$baseUrl/${searchPage(page)}".toHttpUrlOrNull()!!.newBuilder() url.addQueryParameter("s", query) @@ -72,6 +81,8 @@ class PojokManga : Madara("Pojok Manga", "https://pojokmanga.net", "id", SimpleD override fun searchMangaSelector() = "div.c-tabs-item__content, div.page-item-detail" + override val mangaDetailsSelectorTag = "#toNotBeUsed" + protected class ProjectFilter : UriPartFilter( "Filter Project", arrayOf( diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt index b44b895f7..261720fef 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt @@ -393,7 +393,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Pirulito Rosa", "https://pirulitorosa.site", "pt-BR", isNsfw = true), SingleLang("Platinum Crown", "https://platinumscans.com", "en", overrideVersionCode = 1), SingleLang("PMScans", "https://rackusreads.com", "en"), - SingleLang("Pojok Manga", "https://pojokmanga.net", "id", overrideVersionCode = 4), + SingleLang("Pojok Manga", "https://pojokmanga.net", "id", overrideVersionCode = 5), SingleLang("PoManga", "https://pomanga.com", "en"), SingleLang("Pony Manga", "https://ponymanga.com", "en", isNsfw = true), SingleLang("PornComix", "https://www.porncomixonline.net", "en", isNsfw = true, overrideVersionCode = 1),