diff --git a/src/en/kissmanga/build.gradle b/src/en/kissmanga/build.gradle index 152d5c5f1..807d3fa28 100644 --- a/src/en/kissmanga/build.gradle +++ b/src/en/kissmanga/build.gradle @@ -10,6 +10,7 @@ ext { } dependencies { + implementation project(':lib-ratelimit') compileOnly project(':duktape-stub') } diff --git a/src/en/kissmanga/src/eu/kanade/tachiyomi/extension/en/kissmanga/Kissmanga.kt b/src/en/kissmanga/src/eu/kanade/tachiyomi/extension/en/kissmanga/Kissmanga.kt index 3b8382322..d8839c126 100644 --- a/src/en/kissmanga/src/eu/kanade/tachiyomi/extension/en/kissmanga/Kissmanga.kt +++ b/src/en/kissmanga/src/eu/kanade/tachiyomi/extension/en/kissmanga/Kissmanga.kt @@ -1,11 +1,20 @@ package eu.kanade.tachiyomi.extension.en.kissmanga import com.squareup.duktape.Duktape +import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.network.POST -import eu.kanade.tachiyomi.source.model.* +import eu.kanade.tachiyomi.source.model.Filter +import eu.kanade.tachiyomi.source.model.FilterList +import eu.kanade.tachiyomi.source.model.Page +import eu.kanade.tachiyomi.source.model.SChapter +import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.online.ParsedHttpSource -import okhttp3.* +import okhttp3.FormBody +import okhttp3.Headers +import okhttp3.OkHttpClient +import okhttp3.Request +import okhttp3.Response import org.jsoup.Jsoup import org.jsoup.nodes.Document import org.jsoup.nodes.Element @@ -24,7 +33,9 @@ class Kissmanga : ParsedHttpSource() { override val supportsLatest = true - override val client: OkHttpClient = network.cloudflareClient + override val client: OkHttpClient = network.cloudflareClient.newBuilder() + .addNetworkInterceptor(RateLimitInterceptor(5)) + .build() override fun headersBuilder(): Headers.Builder { return Headers.Builder()