Fix some Brazilian Madara sources. (#12120)

This commit is contained in:
Alessandro Jean 2022-06-07 20:50:04 -03:00 committed by GitHub
parent 2174c37710
commit 4f83ca4c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 69 additions and 24 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

View File

@ -0,0 +1,23 @@
package eu.kanade.tachiyomi.extension.pt.tudoquadrinhos
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.OkHttpClient
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class TudoQuadrinhos : Madara(
"Tudo Quadrinhos",
"https://tudoquadrinhos.com.br",
"pt-BR",
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR"))
) {
override val client: OkHttpClient = super.client.newBuilder()
.rateLimit(1, 2, TimeUnit.SECONDS)
.build()
// The tags are just SEO keywords.
override val mangaDetailsSelectorTag: String = ""
}

View File

@ -0,0 +1,41 @@
package eu.kanade.tachiyomi.extension.pt.yanpfansub
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.Response
import java.io.IOException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class YANPFansub : Madara(
"YANP Fansub",
"https://melhorcasal.com",
"pt-BR",
SimpleDateFormat("MMMM dd, yyyy", Locale("pt", "BR"))
) {
// Scanlator changed the theme from WpMangaReader to Madara.
override val versionId: Int = 2
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.rateLimit(1, 2, TimeUnit.SECONDS)
.addInterceptor(::checkPasswordProtectedIntercept)
.build()
private fun checkPasswordProtectedIntercept(chain: Interceptor.Chain): Response {
val response = chain.proceed(chain.request())
if (response.request.url.queryParameter("password-protected") != null) {
response.close()
throw IOException("Autentique-se através da WebView e tente novamente.")
}
return response
}
// Page has custom link to scan website.
override val popularMangaUrlSelector = "div.post-title a:not([target])"
}

View File

@ -79,6 +79,8 @@ class YugenMangasBr : YugenMangas(
?.text()
checkedUa = true
}
uaResponse.close()
}
if (userAgent != null) {

View File

@ -1,22 +0,0 @@
package eu.kanade.tachiyomi.extension.pt.yanpfansub
import eu.kanade.tachiyomi.multisrc.wpmangareader.WPMangaReader
import eu.kanade.tachiyomi.network.interceptor.rateLimit
import okhttp3.OkHttpClient
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class YANPFansub : WPMangaReader(
"YANP Fansub",
"https://melhorcasal.com",
"pt-BR",
dateFormat = SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR"))
) {
override val client: OkHttpClient = network.cloudflareClient.newBuilder()
.rateLimit(1, 2, TimeUnit.SECONDS)
.build()
override val altName = "Nome alternativo: "
}

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 = 2),
MultiLang("Reaper Scans", "https://reaperscans.com", listOf("en", "pt-BR", "fr", "id", "tr"), className = "ReaperScansFactory", pkgName = "reaperscans", overrideVersionCode = 5),
MultiLang("Seven King Scanlation", "https://sksubs.net", listOf("es", "en"), isNsfw = true),
MultiLang("YugenMangas", "https://yugenmangas.com", listOf("es", "pt-BR"), overrideVersionCode = 2),
MultiLang("YugenMangas", "https://yugenmangas.com", listOf("es", "pt-BR"), overrideVersionCode = 3),
SingleLang("1st Kiss Manga.love", "https://1stkissmanga.love", "en", className = "FirstKissMangaLove", overrideVersionCode = 1),
SingleLang("1st Kiss Manhua", "https://1stkissmanhua.com", "en", className = "FirstKissManhua", overrideVersionCode = 3),
SingleLang("1st Kiss", "https://1stkissmanga.io", "en", className = "FirstKissManga", pkgName = "firstkissmanga", overrideVersionCode = 7),
@ -431,6 +431,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("TreeManga", "https://treemanga.com", "en", overrideVersionCode = 1),
SingleLang("TritiniaScans", "https://tritinia.com", "en", overrideVersionCode = 1),
SingleLang("TuManga.net", "https://tumanga.net", "es", className = "TuMangaNet"),
SingleLang("Tudo Quadrinhos", "https://tudoquadrinhos.com.br", "pt-BR"),
SingleLang("Tumangaonline.site", "https://tumangaonline.site", "es", isNsfw = true, className = "TumangaonlineSite", pkgName = "tumangaonlinesite"),
SingleLang("Twilight Scans", "https://twilightscans.com", "en", overrideVersionCode = 1),
SingleLang("Türkçe Manga", "https://turkcemanga.com", "tr", className = "TurkceManga", overrideVersionCode = 2),
@ -461,6 +462,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("WuxiaWorld", "https://wuxiaworld.site", "en", overrideVersionCode = 1),
SingleLang("XManga", "https://xmanga.io", "en", isNsfw = true),
SingleLang("XuN Scans", "https://xunscans.xyz", "en", overrideVersionCode = 3),
SingleLang("YANP Fansub", "https://melhorcasal.com", "pt-BR", isNsfw = true),
SingleLang("Yaoi Hentai", "https://yaoihentai.me", "en", isNsfw = true),
SingleLang("Yaoi Toshokan", "https://yaoitoshokan.net", "pt-BR", isNsfw = true, overrideVersionCode = 4),
SingleLang("Yaoi.mobi", "https://yaoi.mobi", "en", isNsfw = true, className = "YaoiManga", pkgName = "yaoimanga", overrideVersionCode = 4),

View File

@ -52,7 +52,6 @@ class WPMangaReaderGenerator : ThemeSourceGenerator {
SingleLang("Tsundoku Traduções", "https://tsundoku.com.br", "pt-BR", className = "TsundokuTraducoes", overrideVersionCode = 9),
SingleLang("TurkToon", "https://turktoon.com", "tr"),
SingleLang("World Romance Translation", "https://wrt.my.id", "id", overrideVersionCode = 7),
SingleLang("YANP Fansub", "https://melhorcasal.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
SingleLang("ARESManga", "https://aresmanga.com", "ar", pkgName = "iimanga", overrideVersionCode = 2),
)