Flame Scans: Harsher Rate Limit + Add Tachiyomi Identifier to User Agent (#7714)

This commit is contained in:
h-hyuuga 2021-06-17 20:59:05 -04:00 committed by GitHub
parent 84f2e19495
commit 78bdfe5385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -2,11 +2,15 @@ package eu.kanade.tachiyomi.extension.en.flamescans
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader
import okhttp3.Headers
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
class FlameScans : WPMangaReader("Flame Scans", "https://flamescans.org", "en", "/series") { class FlameScans : WPMangaReader("Flame Scans", "https://flamescans.org", "en", "/series") {
private val rateLimitInterceptor = RateLimitInterceptor(2) private val rateLimitInterceptor = RateLimitInterceptor(1)
private val userAgent = "Tachiyomi Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"
override fun headersBuilder(): Headers.Builder = Headers.Builder()
.add("User-Agent", userAgent)
override val client: OkHttpClient = network.cloudflareClient.newBuilder() override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.connectTimeout(10, TimeUnit.SECONDS) .connectTimeout(10, TimeUnit.SECONDS)
@ -14,3 +18,4 @@ class FlameScans : WPMangaReader("Flame Scans", "https://flamescans.org", "en",
.addNetworkInterceptor(rateLimitInterceptor) .addNetworkInterceptor(rateLimitInterceptor)
.build() .build()
} }

View File

@ -22,7 +22,7 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
SingleLang("Mangasusu", "https://mangasusu.co.in", "id", isNsfw = true), SingleLang("Mangasusu", "https://mangasusu.co.in", "id", isNsfw = true),
SingleLang("TurkToon", "https://turktoon.com", "tr"), SingleLang("TurkToon", "https://turktoon.com", "tr"),
SingleLang("Gecenin Lordu", "https://geceninlordu.com/", "tr", overrideVersionCode = 1), SingleLang("Gecenin Lordu", "https://geceninlordu.com/", "tr", overrideVersionCode = 1),
SingleLang("Flame Scans", "https://flamescans.org", "en", overrideVersionCode = 3), SingleLang("Flame Scans", "https://flamescans.org", "en", overrideVersionCode = 4),
SingleLang("A Pair of 2+", "https://pairof2.com", "en", className = "APairOf2"), SingleLang("A Pair of 2+", "https://pairof2.com", "en", className = "APairOf2"),
SingleLang("PMScans", "https://reader.pmscans.com", "en"), SingleLang("PMScans", "https://reader.pmscans.com", "en"),
SingleLang("Skull Scans", "https://www.skullscans.com", "en"), SingleLang("Skull Scans", "https://www.skullscans.com", "en"),