Bypass UA block in YM. (#10736)

This commit is contained in:
Alessandro Jean 2022-02-06 18:17:16 -03:00 committed by GitHub
parent 8ed209c87b
commit 32f76a2462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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
}

View File

@ -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),