Update GS URL and move it to Madara (closes #9980). (#10083)

This commit is contained in:
Alessandro Jean 2021-12-12 18:41:26 -03:00 committed by GitHub
parent 251e8da7c1
commit ae0f49fc7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 39 additions and 68 deletions

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -0,0 +1,32 @@
package eu.kanade.tachiyomi.extension.pt.geassscanlator
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
class GeassScanlator : Madara(
"Geass Scanlator",
"https://geassscan.net",
"pt-BR",
SimpleDateFormat("yyyy-MM-dd", Locale("pt", "BR"))
) {
// Website changed from WpMangaStream to Madara (again).
override val versionId: Int = 2
override val client: OkHttpClient = super.client.newBuilder()
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
.build()
override val useNewChapterEndpoint: Boolean = true
override val altName: String = "Nome alternativo: "
// Tags are full of garbage, so remove them.
override val mangaDetailsSelectorTag: String = ""
override fun popularMangaSelector() = "div.page-item-detail.manga"
}

View File

@ -1,63 +0,0 @@
package eu.kanade.tachiyomi.extension.pt.geassscanlator
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.multisrc.wpmangastream.WPMangaStream
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.OkHttpClient
import okhttp3.Response
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class GeassScanlator : WPMangaStream(
"Geass Scanlator",
"https://geassscan.xyz",
"pt-BR",
SimpleDateFormat("MMMMM dd, yyyy", Locale("pt", "BR"))
) {
override val client: OkHttpClient = super.client.newBuilder()
.addInterceptor(RateLimitInterceptor(1, 2, TimeUnit.SECONDS))
.build()
override val altName: String = "Nome alternativo: "
override fun chapterListParse(response: Response): List<SChapter> {
val document = response.asJsoup()
return document.select(chapterListSelector())
.map { chapterFromElement(it) }
}
// [...document.querySelectorAll('ul.genrez li')]
// .map(x => `Genre("${x.querySelector("label").innerHTML}", "${x.querySelector("input").value}")`)
// .join(',\n')
override fun getGenreList(): List<Genre> = listOf(
Genre("Ação", "acao"),
Genre("Artes Marciais", "artes-marciais"),
Genre("Aventura", "aventura"),
Genre("Comédia", "comedia"),
Genre("Drama", "drama"),
Genre("Ecchi", "ecchi"),
Genre("Escolar", "escolar"),
Genre("Fantasia", "fantasia"),
Genre("Harem", "harem"),
Genre("Histórico", "historico"),
Genre("Horror", "horror"),
Genre("Magia", "magia"),
Genre("Manga", "manga"),
Genre("Manhua", "manhua"),
Genre("Mistério", "misterio"),
Genre("Romance", "romance"),
Genre("Sci-fi", "sci-fi"),
Genre("Seinen", "seinen"),
Genre("Shoujo", "shoujo"),
Genre("Shounen", "shounen"),
Genre("Shounen Ai", "shounen-ai"),
Genre("Slice of Life", "slice-of-life"),
Genre("Sobrenatural", "sobrenatural"),
Genre("Suspense", "suspense"),
Genre("Webtoon", "webtoon")
)
}

View File

@ -360,11 +360,13 @@ abstract class Madara(
.toMutableSet()
// add tag(s) to genre
if (mangaDetailsSelectorTag.isNotEmpty()) {
select(mangaDetailsSelectorTag).forEach { element ->
if (genres.contains(element.text()).not()) {
genres.add(element.text().toLowerCase(Locale.ROOT))
}
}
}
// add manga/manhwa/manhua thinggy to genre
document.select(seriesTypeSelector).firstOrNull()?.ownText()?.let {

View File

@ -91,6 +91,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Furio Scans", "https://furioscans.com", "pt-BR", overrideVersionCode = 4),
SingleLang("GalaxyDegenScans", "https://gdstmp.site", "en", overrideVersionCode = 3),
SingleLang("Gatemanga", "https://gatemanga.com", "ar"),
SingleLang("Geass Scanlator", "https://geassscan.net", "pt-BR", overrideVersionCode = 3),
SingleLang("Gemanga", "https://gemanga.com", "ar"),
SingleLang("Glory Scans", "https://gloryscan.com", "pt-BR", isNsfw = true, overrideVersionCode = 2),
SingleLang("Gogoscans", "https://www.gogoscans.com", "en"),

View File

@ -47,7 +47,6 @@ class WPMangaStreamGenerator : ThemeSourceGenerator {
SingleLang("The Apollo Team", "https://theapollo.team", "en"),
SingleLang("Sekte Doujin", "https://sektedoujin.xyz", "id", isNsfw = true, overrideVersionCode = 2),
SingleLang("Phoenix Fansub", "https://phoenixfansub.com", "es", overrideVersionCode = 1),
SingleLang("Geass Scanlator", "https://geassscan.xyz", "pt-BR", overrideVersionCode = 2),
SingleLang("Imagine Scan", "https://imaginescan.com.br", "pt-BR", isNsfw = true),
SingleLang("Vapo Scan", "https://vaposcans.com", "pt-BR", overrideVersionCode = 2),
SingleLang("Hakai Scan", "http://hakaiscan.xyz", "pt-BR", isNsfw = true),