From e9d0420f814b4fe62c599c580e65ff5a982b7c5f Mon Sep 17 00:00:00 2001 From: Secozzi <49240133+Secozzi@users.noreply.github.com> Date: Sun, 31 Dec 2023 15:17:25 +0000 Subject: [PATCH] Shinigami: remove X-Requested-With header (#19505) Remove header --- .../overrides/madara/shinigami/src/Shinigami.kt | 13 ------------- .../tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/multisrc/overrides/madara/shinigami/src/Shinigami.kt b/multisrc/overrides/madara/shinigami/src/Shinigami.kt index 7a666eb2f..70d05d4f7 100644 --- a/multisrc/overrides/madara/shinigami/src/Shinigami.kt +++ b/multisrc/overrides/madara/shinigami/src/Shinigami.kt @@ -7,7 +7,6 @@ import okhttp3.Headers import okhttp3.OkHttpClient import org.jsoup.nodes.Element import java.util.concurrent.TimeUnit -import kotlin.random.Random class Shinigami : Madara("Shinigami", "https://shinigami.moe", "id") { // moved from Reaper Scans (id) to Shinigami (id) @@ -26,18 +25,6 @@ class Shinigami : Madara("Shinigami", "https://shinigami.moe", "id") { .add("Sec-Fetch-Mode", "navigate") .add("Sec-Fetch-Site", "same-origin") .add("Upgrade-Insecure-Requests", "1") - .add("X-Requested-With", randomString) - - private fun generateRandomString(length: Int): String { - val charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ.abcdefghijklmnopqrstuvwxyz.0123456789" - return (1..length) - .map { charset.random() } - .joinToString("") - } - - private val randomLength = Random.Default.nextInt(13, 21) - - private val randomString = generateRandomString(randomLength) override val mangaSubString = "semua-series" 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 77de1b465..6ad5abc1b 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 @@ -436,7 +436,7 @@ class MadaraGenerator : ThemeSourceGenerator { SingleLang("Shayami", "https://shayami.com", "es"), SingleLang("Shiba Manga", "https://shibamanga.com", "en"), SingleLang("Shield Manga", "https://shieldmanga.io", "en", overrideVersionCode = 3), - SingleLang("Shinigami", "https://shinigami.moe", "id", isNsfw = false, overrideVersionCode = 8), + SingleLang("Shinigami", "https://shinigami.moe", "id", isNsfw = false, overrideVersionCode = 9), SingleLang("Shooting Star Scans", "https://shootingstarscans.com", "en"), SingleLang("ShoujoHearts", "https://shoujohearts.com", "en", overrideVersionCode = 2), SingleLang("Sinensis Scan", "https://sinensisscan.net", "pt-BR", pkgName = "sinensis", overrideVersionCode = 6),