Migrate GS from MMRCMS to Madara (#8678)
* Migrate GS from MMRCMS to Madara. * Change URL to use https.
This commit is contained in:
parent
0e72abab89
commit
ccef61b02e
|
@ -0,0 +1,34 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.gekkouscan
|
||||
|
||||
import eu.kanade.tachiyomi.annotations.Nsfw
|
||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import okhttp3.OkHttpClient
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
@Nsfw
|
||||
class GekkouScans : Madara(
|
||||
"Gekkou Scans",
|
||||
"https://gekkouscans.com.br",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("dd/MM/yyyy", Locale("pt", "BR"))
|
||||
) {
|
||||
|
||||
// Theme changed from MMRCMS to Madara.
|
||||
override val versionId: Int = 2
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.connectTimeout(1, TimeUnit.MINUTES)
|
||||
.readTimeout(1, TimeUnit.MINUTES)
|
||||
.writeTimeout(1, TimeUnit.MINUTES)
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override val altName: String = "Nome alternativo: "
|
||||
|
||||
override val useNewChapterEndpoint: Boolean = true
|
||||
|
||||
override fun popularMangaSelector() = "div.page-item-detail.manga"
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package eu.kanade.tachiyomi.extension.pt.gekkouscan
|
||||
|
||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||
import eu.kanade.tachiyomi.multisrc.mmrcms.MMRCMS
|
||||
import eu.kanade.tachiyomi.network.GET
|
||||
import eu.kanade.tachiyomi.source.model.Page
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class GekkouScans : MMRCMS("Gekkou Scans", "https://leitor.gekkouscans.com.br", "pt-BR") {
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
|
||||
.build()
|
||||
|
||||
override fun chapterListSelector() = "ul.domaintld > li.li"
|
||||
|
||||
override fun imageRequest(page: Page): Request {
|
||||
val newHeaders = headersBuilder()
|
||||
.add("Accept", ACCEPT_IMAGE)
|
||||
.add("Referer", page.url)
|
||||
.build()
|
||||
|
||||
return GET(page.imageUrl!!, newHeaders)
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val ACCEPT_IMAGE = "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8"
|
||||
}
|
||||
}
|
|
@ -90,6 +90,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
|||
SingleLang("Fênix Scanlator", "https://fenixscanlator.xyz", "pt-BR", pkgName = "fenixscanlator", className = "FenixScanlator", overrideVersionCode = 2),
|
||||
SingleLang("GalaxyDegenScans", "https://gdegenscans.xyz/", "en", overrideVersionCode = 1),
|
||||
SingleLang("Gatemanga", "https://gatemanga.com", "ar"),
|
||||
SingleLang("Gekkou Scans", "https://gekkouscans.com.br", "pt-BR", isNsfw = true, pkgName = "gekkouscan"),
|
||||
SingleLang("Geass Hentai", "https://geasshentai.xyz", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
||||
SingleLang("Gemanga", "https://gemanga.com", "ar"),
|
||||
SingleLang("Glory Scans", "https://gloryscan.com", "pt-BR", isNsfw = true, overrideVersionCode = 2),
|
||||
|
|
|
@ -64,7 +64,6 @@ class MMRCMSSources {
|
|||
SourceData.Single("Jpmangas", "https://jpmangas.co", "fr"),
|
||||
SourceData.Single("Op-VF", "https://www.op-vf.com", "fr", className = "OpVF"),
|
||||
SourceData.Single("FR Scan", "https://frscan.cc", "fr"),
|
||||
SourceData.Single("Gekkou Scans", "https://leitor.gekkouscans.com.br", "pt-BR", isNsfw = true, pkgName = "gekkouscan", overrideVersionCode = 2),
|
||||
SourceData.Single("Ama Scans", "https://amascan.com", "pt-BR", isNsfw = true, overrideVersionCode = 1),
|
||||
// NOTE: THIS SOURCE CONTAINS A CUSTOM LANGUAGE SYSTEM (which will be ignored)!
|
||||
SourceData.Single("HentaiShark", "https://www.hentaishark.com", "all", isNsfw = true),
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package eu.kanade.tachiyomi.multisrc.mmrcms
|
||||
|
||||
// GENERATED FILE, DO NOT MODIFY!
|
||||
// Generated Sun, 2 May 2021 16:43:17 GMT
|
||||
// Generated Fri, 20 Aug 2021 16:34:01 GMT
|
||||
|
||||
class SourceData() {
|
||||
companion object {
|
||||
|
@ -39,7 +39,6 @@ class SourceData() {
|
|||
"https://www.op-vf.com" -> """{"name":"Op-VF","base_url":"https://www.op-vf.com","supports_latest":true,"item_url":"https://www.op-vf.com/manga/","categories":[],"tags":"null"}"""
|
||||
"https://frscan.cc" -> """{"name":"FR Scan","base_url":"https://frscan.cc","supports_latest":true,"item_url":"https://frscan.cc/manga/","categories":[{"id":"1","name":"Action"},{"id":"2","name":"Adventure"},{"id":"3","name":"Comedy"},{"id":"4","name":"Doujinshi"},{"id":"5","name":"Drama"},{"id":"6","name":"Ecchi"},{"id":"7","name":"Fantasy"},{"id":"8","name":"Gender Bender"},{"id":"9","name":"Harem"},{"id":"10","name":"Historical"},{"id":"11","name":"Horror"},{"id":"12","name":"Josei"},{"id":"13","name":"Martial Arts"},{"id":"14","name":"Mature"},{"id":"15","name":"Mecha"},{"id":"16","name":"Mystery"},{"id":"17","name":"One Shot"},{"id":"18","name":"Psychological"},{"id":"19","name":"Romance"},{"id":"20","name":"Vie Scolaire"},{"id":"21","name":"Sci-fi"},{"id":"22","name":"Seinen"},{"id":"23","name":"Shoujo"},{"id":"24","name":"Shoujo Ai"},{"id":"25","name":"Shounen"},{"id":"26","name":"Shounen Ai"},{"id":"27","name":"Tranche de vie"},{"id":"28","name":"Sports"},{"id":"29","name":"Supernatural"},{"id":"30","name":"Tragedie"},{"id":"31","name":"Yaoi"},{"id":"32","name":"Yuri"},{"id":"33","name":"Autre"},{"id":"34","name":"BD Occidentale"},{"id":"35","name":"Webtoon"}],"tags":"null"}"""
|
||||
"https://www.hentaishark.com" -> """{"name":"HentaiShark","base_url":"https://www.hentaishark.com","supports_latest":true,"item_url":"https://www.hentaishark.com/manga/","categories":[{"id":"1","name":"Doujinshi"},{"id":"2","name":"Manga"},{"id":"3","name":"Western"},{"id":"4","name":"non-h"},{"id":"5","name":"imageset"},{"id":"6","name":"artistcg"},{"id":"7","name":"misc"}],"tags":"null"}"""
|
||||
"https://leitor.gekkouscans.com.br" -> """{"name":"Gekkou Scans","base_url":"https://leitor.gekkouscans.com.br","supports_latest":false,"item_url":"https://leitor.gekkouscans.com.br/manga/","categories":[{"id":"1","name":"Ação"},{"id":"2","name":"Aventura"},{"id":"3","name":"Comédia"},{"id":"4","name":"Doujinshi"},{"id":"5","name":"Drama"},{"id":"6","name":"Ecchi"},{"id":"7","name":"Fantasia"},{"id":"8","name":"Harém"},{"id":"9","name":"Histórico"},{"id":"10","name":"Horror"},{"id":"11","name":"Josei"},{"id":"12","name":"Martial Arts"},{"id":"13","name":"Adulto"},{"id":"14","name":"Mecha"},{"id":"15","name":"Mistério"},{"id":"16","name":"One Shot"},{"id":"17","name":"Psicológico"},{"id":"18","name":"Romance"},{"id":"19","name":"Escolar"},{"id":"20","name":"Sci-fi"},{"id":"21","name":"Seinen"},{"id":"22","name":"Shoujo"},{"id":"23","name":"Shoujo Ai"},{"id":"24","name":"Shounen"},{"id":"25","name":"Shounen Ai"},{"id":"26","name":"Vida Cotidiana"},{"id":"27","name":"Esportes"},{"id":"28","name":"Sobrenatural"},{"id":"29","name":"Tragédia"},{"id":"30","name":"Yaoi"},{"id":"31","name":"Yuri"},{"id":"32","name":"Webtoon"},{"id":"33","name":"Superpoderes"}],"tags":"null"}"""
|
||||
"https://amascan.com" -> """{"name":"Ama Scans","base_url":"https://amascan.com","supports_latest":true,"item_url":"https://amascan.com/manga/","categories":[{"id":"1","name":"Ação"},{"id":"2","name":"Aventura"},{"id":"3","name":"Comédia"},{"id":"4","name":"Doujinshi"},{"id":"5","name":"Drama"},{"id":"6","name":"Ecchi"},{"id":"7","name":"Fantasia"},{"id":"8","name":"Gender Bender"},{"id":"9","name":"Harém"},{"id":"10","name":"Histórico"},{"id":"11","name":"Horror"},{"id":"12","name":"Josei"},{"id":"13","name":"Artes Marciais"},{"id":"14","name":"Adulto"},{"id":"15","name":"Mecha"},{"id":"16","name":"Mistério"},{"id":"17","name":"One Shot"},{"id":"18","name":"Psicológico"},{"id":"19","name":"Romance"},{"id":"20","name":"Vida Escolar"},{"id":"21","name":"Ficcção Científica"},{"id":"22","name":"Seinen"},{"id":"23","name":"Shoujo"},{"id":"24","name":"Shounen"},{"id":"25","name":"Slice of Life"},{"id":"26","name":"Esportes"},{"id":"27","name":"Sobrenatural"},{"id":"28","name":"Tragédia"},{"id":"29","name":"Hentai"},{"id":"30","name":"Terror"},{"id":"31","name":"LGBTQQICAPF2K+"},{"id":"32","name":"Ação"},{"id":"33","name":"Aventura"},{"id":"34","name":"Comédia"},{"id":"35","name":"Doujinshi"},{"id":"36","name":"Drama"},{"id":"37","name":"Ecchi"},{"id":"38","name":"Fantasia"},{"id":"39","name":"Gender Bender"},{"id":"40","name":"Harém"},{"id":"41","name":"Histórico"},{"id":"42","name":"Horror"},{"id":"43","name":"Josei"},{"id":"44","name":"Artes Marciais"},{"id":"45","name":"Adulto"},{"id":"46","name":"Mecha"},{"id":"47","name":"Mistério"},{"id":"48","name":"One Shot"},{"id":"49","name":"Psicológico"},{"id":"50","name":"Romance"},{"id":"51","name":"Vida Escolar"},{"id":"52","name":"Ficcção Científica"},{"id":"53","name":"Seinen"},{"id":"54","name":"Shoujo"},{"id":"55","name":"Shounen"},{"id":"56","name":"Slice of Life"},{"id":"57","name":"Esportes"},{"id":"58","name":"Sobrenatural"},{"id":"59","name":"Tragédia"},{"id":"60","name":"Hentai"},{"id":"61","name":"Terror"},{"id":"62","name":"LGBTQQICAPF2K+"}],"tags":"null"}"""
|
||||
else -> ""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue