From 32f76a2462b738e76fe494ed060507ee4c582bfb Mon Sep 17 00:00:00 2001 From: Alessandro Jean Date: Sun, 6 Feb 2022 18:17:16 -0300 Subject: [PATCH] Bypass UA block in YM. (#10736) --- .../overrides/madara/yugenmangas/src/YugenMangasFactory.kt | 6 +++++- .../eu/kanade/tachiyomi/multisrc/madara/MadaraGenerator.kt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/multisrc/overrides/madara/yugenmangas/src/YugenMangasFactory.kt b/multisrc/overrides/madara/yugenmangas/src/YugenMangasFactory.kt index d6f49a2d8..9bbd4ed40 100644 --- a/multisrc/overrides/madara/yugenmangas/src/YugenMangasFactory.kt +++ b/multisrc/overrides/madara/yugenmangas/src/YugenMangasFactory.kt @@ -4,6 +4,7 @@ import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor import eu.kanade.tachiyomi.multisrc.madara.Madara import eu.kanade.tachiyomi.source.SourceFactory import eu.kanade.tachiyomi.source.model.SChapter +import okhttp3.Headers import okhttp3.OkHttpClient import org.jsoup.nodes.Element import java.text.SimpleDateFormat @@ -49,7 +50,10 @@ class YugenMangasBr : YugenMangas( .addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS)) .build() - override val altName: String = "Nome alternativo: " + override fun headersBuilder(): Headers.Builder = Headers.Builder() + .add("Referer", baseUrl) + + override val altName: String = "Nomes alternativos: " override val useNewChapterEndpoint: Boolean = true } 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 aaa53ea90..01bed27d3 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 @@ -18,7 +18,7 @@ class MadaraGenerator : ThemeSourceGenerator { MultiLang("Manhwa18.cc", "https://manhwa18.cc", listOf("en", "ko", "all"), isNsfw = true, className = "Manhwa18CcFactory", pkgName = "manhwa18cc", overrideVersionCode = 1), MultiLang("Reaper Scans", "https://reaperscans.com", listOf("en", "pt-BR"), className = "ReaperScansFactory", pkgName = "reaperscans", overrideVersionCode = 3), MultiLang("Seven King Scanlation", "https://sksubs.net", listOf("es", "en"), isNsfw = true), - MultiLang("YugenMangas", "https://yugenmangas.com", listOf("es", "pt-BR")), + MultiLang("YugenMangas", "https://yugenmangas.com", listOf("es", "pt-BR"), overrideVersionCode = 1), SingleLang("1st Kiss Manga.love", "https://1stkissmanga.love", "en", className = "FirstKissMangaLove"), SingleLang("1st Kiss Manhua", "https://1stkissmanhua.com", "en", className = "FirstKissManhua", overrideVersionCode = 2), SingleLang("1st Kiss", "https://1stkissmanga.io", "en", className = "FirstKissManga", pkgName = "firstkissmanga", overrideVersionCode = 6),