Manga Crab: Add ratelimit (#16311)

Add ratelimit
This commit is contained in:
seew3l 2023-05-06 09:17:13 -05:00 committed by GitHub
parent 4f32f6e8ed
commit 7303f8eae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -3,13 +3,16 @@ package eu.kanade.tachiyomi.extension.es.mangacrab
import android.util.Base64
import eu.kanade.tachiyomi.lib.cryptoaes.CryptoAES
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.model.Page
import kotlinx.serialization.json.jsonArray
import kotlinx.serialization.json.jsonObject
import kotlinx.serialization.json.jsonPrimitive
import okhttp3.OkHttpClient
import org.jsoup.nodes.Document
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class MangaCrab : Madara(
"Manga Crab",
@ -17,6 +20,13 @@ class MangaCrab : Madara(
"es",
SimpleDateFormat("dd/MM/yyyy", Locale("es")),
) {
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.addInterceptor(uaIntercept)
.connectTimeout(10, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.rateLimit(1, 2)
.build()
override fun chapterListSelector() = "div.listing-chapters_wrap > ul > li"
override val mangaDetailsSelectorDescription = "div.c-page__content div.contenedor"

View File

@ -185,7 +185,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Manga Bilgini", "https://mangabilgini.com", "tr"),
SingleLang("Manga Bin", "https://mangabin.com", "en", overrideVersionCode = 1),
SingleLang("Manga Chill", "https://toonchill.com", "en", overrideVersionCode = 7),
SingleLang("Manga Crab", "https://mangacrab.com", "es", overrideVersionCode = 3),
SingleLang("Manga Crab", "https://mangacrab.com", "es", overrideVersionCode = 4),
SingleLang("Manga District", "https://mangadistrict.com", "en", isNsfw = true, overrideVersionCode = 1),
SingleLang("Manga Diyari", "https://manga-diyari.com", "tr", overrideVersionCode = 2),
SingleLang("Manga Fenix", "https://manga-fenix.com", "es", overrideVersionCode = 2),