Fix ScamberTraslator and VerManhwas (#15878)

* Fix ScamberTraslator

* Linting

* Fix VerManhwas

* Linting

* More Linting
This commit is contained in:
seew3l 2023-04-01 10:57:34 -05:00 committed by GitHub
parent 6d6a51d2a5
commit cff5fd15db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 7 deletions

View File

@ -1,6 +1,8 @@
package eu.kanade.tachiyomi.extension.es.scambertraslator
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.source.model.SChapter
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
@ -8,7 +10,29 @@ class ScamberTraslator : Madara(
"ScamberTraslator",
"https://scambertraslator.com",
"es",
dateFormat = SimpleDateFormat("yyy-MM-dd", Locale.ROOT),
dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")),
) {
override val useNewChapterEndpoint = false
override val useNewChapterEndpoint = true
override fun chapterListSelector() = "li.wp-manga-chapter:has(a[href*=$baseUrl])" // The source has hidden links to external sites by default
override val mangaDetailsSelectorGenre = "div.genres-container-slime-slime a"
override val mangaDetailsSelectorThumbnail = "div.thumb-half-slime img"
override val mangaDetailsSelectorStatus = "div.status-slime"
override fun chapterFromElement(element: Element): SChapter {
val chapter = SChapter.create()
with(element) {
select(chapterUrlSelector).first()?.let { urlElement ->
chapter.url = urlElement.attr("abs:href").let {
it.substringBefore("?style=paged") + if (!it.endsWith(chapterUrlSuffix)) chapterUrlSuffix else ""
}
chapter.name = urlElement.select("span.chapternum").text()
chapter.date_upload = parseChapterDate(select("span.chapterdate").text())
}
}
return chapter
}
}

View File

@ -1,14 +1,21 @@
package eu.kanade.tachiyomi.extension.es.vermanhwas
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.network.GET
import okhttp3.Request
import java.text.SimpleDateFormat
import java.util.Locale
class VerManhwas : Madara(
"Ver Manhwas",
"https://vermanhwa.com",
"https://vermanhwa.es",
"es",
dateFormat = SimpleDateFormat("MMM d, yyy", Locale("es")),
dateFormat = SimpleDateFormat("MMMM d, yyyy", Locale("es")),
) {
override val useNewChapterEndpoint = true
override val useLoadMoreSearch = false
override fun genresRequest(): Request {
return GET("$baseUrl/?s=&post_type=wp-manga", headers)
}
}

View File

@ -719,6 +719,7 @@ abstract class Madara(
protected val completedStatusList: Array<String> = arrayOf(
"Completed",
"Completo",
"Completado",
"Concluído",
"Concluido",
"Terminé",
@ -730,15 +731,19 @@ abstract class Madara(
protected val ongoingStatusList: Array<String> = arrayOf(
"OnGoing", "Продолжается", "Updating", "Em Lançamento", "Em lançamento", "Em andamento",
"Em Andamento", "En cours", "Ativo", "Lançando", "Đang Tiến Hành", "Devam Ediyor",
"Devam ediyor", "In Corso", "In Arrivo", "مستمرة", "مستمر", "En Curso",
"Devam ediyor", "In Corso", "In Arrivo", "مستمرة", "مستمر", "En Curso", "Emision",
"En marcha",
)
protected val hiatusStatusList: Array<String> = arrayOf(
"On Hold",
"Pausado",
"En espera",
)
protected val canceledStatusList: Array<String> = arrayOf(
"Canceled",
"Cancelado",
)
override fun mangaDetailsParse(document: Document): SManga {

View File

@ -366,7 +366,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Sagrado Império da Britannia", "https://imperiodabritannia.com", "pt-BR", className = "ImperioDaBritannia"),
SingleLang("SamuraiScan", "https://samuraiscan.com", "es", overrideVersionCode = 1),
SingleLang("Sawamics", "https://sawamics.com", "en"),
SingleLang("ScamberTraslator", "https://scambertraslator.com", "es"),
SingleLang("ScamberTraslator", "https://scambertraslator.com", "es", overrideVersionCode = 1),
SingleLang("Scans Raw", "https://scansraw.com", "en", overrideVersionCode = 1),
SingleLang("Sdl scans", "https://sdlscans.com", "es", className = "SdlScans"),
SingleLang("Sensaina Yuri", "https://sensainayuri.dropescan.com", "pt-BR", isNsfw = true, overrideVersionCode = 2),
@ -415,7 +415,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Tudo Quadrinhos", "https://tudoquadrinhos.com.br", "pt-BR"),
SingleLang("Tumangaonline.site", "https://tumangaonline.site", "es", isNsfw = true, className = "TumangaonlineSite", pkgName = "tumangaonlinesite"),
SingleLang("Türkçe Manga", "https://turkcemanga.com", "tr", className = "TurkceManga", overrideVersionCode = 2),
SingleLang("Ver Manhwas", "https://vermanhwa.com", "es", isNsfw = true),
SingleLang("Ver Manhwas", "https://vermanhwa.es", "es", isNsfw = true, overrideVersionCode = 1),
SingleLang("VinManga", "https://vinload.com", "en", isNsfw = true),
SingleLang("Visbellum", "https://visbellum.com", "pt-BR", overrideVersionCode = 2),
SingleLang("Wakamics", "https://wakamics.net", "en"),