MangaBuddy: increasing rate limit to avoid ban (#12105)

- increasing rate limit from 5/sec -> 1/sec
This commit is contained in:
Riztard Lanthorn 2022-06-07 17:12:31 +07:00 committed by GitHub
parent 20f2a5e67a
commit 45d6042c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 32 deletions

View File

@ -4,7 +4,6 @@ import eu.kanade.tachiyomi.multisrc.madtheme.MadTheme
import eu.kanade.tachiyomi.network.interceptor.rateLimitHost
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.OkHttpClient
import java.util.concurrent.TimeUnit
class MangaBuddy : MadTheme(
"MangaBuddy",
@ -12,35 +11,10 @@ class MangaBuddy : MadTheme(
"en"
) {
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.rateLimitHost(
"https://s1.mbcdnv1.xyz".toHttpUrl(),
5,
1,
TimeUnit.SECONDS
)
.rateLimitHost(
"https://s1.mbcdnv2.xyz".toHttpUrl(),
1,
2,
TimeUnit.SECONDS
)
.rateLimitHost(
"https://s1.mbcdnv3.xyz".toHttpUrl(),
1,
2,
TimeUnit.SECONDS
)
.rateLimitHost(
"https://s1.mbcdnv4.xyz".toHttpUrl(),
1,
2,
TimeUnit.SECONDS
)
.rateLimitHost(
"https://s1.mbcdnv5.xyz".toHttpUrl(),
1,
2,
TimeUnit.SECONDS
)
.rateLimitHost("https://s1.mbcdnv1.xyz".toHttpUrl(), 1, 1)
.rateLimitHost("https://s1.mbcdnv2.xyz".toHttpUrl(), 1, 2)
.rateLimitHost("https://s1.mbcdnv3.xyz".toHttpUrl(), 1, 2)
.rateLimitHost("https://s1.mbcdnv4.xyz".toHttpUrl(), 1, 2)
.rateLimitHost("https://s1.mbcdnv5.xyz".toHttpUrl(), 1, 2)
.build()
}

View File

@ -14,7 +14,7 @@ class MadThemeGenerator : ThemeSourceGenerator {
override val sources = listOf(
SingleLang("BeeHentai", "https://beehentai.com", "en", isNsfw = true),
SingleLang("BoxManhwa", "https://boxmanhwa.com", "en", isNsfw = true),
SingleLang("MangaBuddy", "https://mangabuddy.com", "en", isNsfw = true, overrideVersionCode = 1),
SingleLang("MangaBuddy", "https://mangabuddy.com", "en", isNsfw = true, overrideVersionCode = 2),
SingleLang("MangaCute", "https://mangacute.com", "en", isNsfw = true),
SingleLang("MangaFab", "https://mangafab.com", "en", isNsfw = true),
SingleLang("MangaForest", "https://mangaforest.com", "en", isNsfw = true),