Fix MangasTK (#15968)
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 5.4 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 9.7 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 67 KiB |
54
multisrc/overrides/madara/mangastk/src/MangasTK.kt
Normal file
@ -0,0 +1,54 @@
|
||||
package eu.kanade.tachiyomi.extension.es.mangastk
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.source.model.SChapter
|
||||
import eu.kanade.tachiyomi.source.model.SManga
|
||||
import org.jsoup.nodes.Element
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
|
||||
class MangasTK : Madara(
|
||||
"MangasTK",
|
||||
"https://mangastk.net",
|
||||
"es",
|
||||
SimpleDateFormat("dd.MM.yyyy", Locale("es")),
|
||||
) {
|
||||
override fun popularMangaSelector() = "div#series-card:not(:has(a[href*='bilibilicomics.com']))"
|
||||
override val popularMangaUrlSelector = "a.series-link"
|
||||
|
||||
override val mangaDetailsSelectorTag = "div.tags-content a.notUsed" // Source use this for the scanlator
|
||||
override val mangaDetailsSelectorStatus = "div.post-status div.summary-content"
|
||||
|
||||
override fun popularMangaFromElement(element: Element): SManga {
|
||||
val manga = SManga.create()
|
||||
|
||||
with(element) {
|
||||
select(popularMangaUrlSelector).first()?.let {
|
||||
manga.setUrlWithoutDomain(it.attr("abs:href"))
|
||||
manga.title = it.attr("title")
|
||||
}
|
||||
|
||||
select("img").first()?.let {
|
||||
manga.thumbnail_url = imageFromElement(it)
|
||||
}
|
||||
}
|
||||
|
||||
return manga
|
||||
}
|
||||
|
||||
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("p.chapter-manhwa-title").text()
|
||||
chapter.date_upload = parseChapterDate(select("span.chapter-release-date").text())
|
||||
}
|
||||
}
|
||||
|
||||
return chapter
|
||||
}
|
||||
}
|
@ -722,6 +722,7 @@ abstract class Madara(
|
||||
"Completado",
|
||||
"Concluído",
|
||||
"Concluido",
|
||||
"Finalizado",
|
||||
"Terminé",
|
||||
"Hoàn Thành",
|
||||
"مكتملة",
|
||||
@ -732,7 +733,7 @@ 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", "Emision",
|
||||
"Devam ediyor", "In Corso", "In Arrivo", "مستمرة", "مستمر", "En Curso", "En curso", "Emision",
|
||||
"En marcha", "连载中",
|
||||
)
|
||||
|
||||
|
@ -256,7 +256,7 @@ class MadaraGenerator : ThemeSourceGenerator {
|
||||
SingleLang("MangaSiro", "https://mangasiro.com", "en", isNsfw = true),
|
||||
SingleLang("MangaSpark", "https://mangaspark.com", "ar", overrideVersionCode = 2),
|
||||
SingleLang("MangaStic", "https://mangastic.me", "en", overrideVersionCode = 1),
|
||||
SingleLang("MangasTK", "https://mangastk.net", "es", isNsfw = true, overrideVersionCode = 1),
|
||||
SingleLang("MangasTK", "https://mangastk.net", "es", isNsfw = true, overrideVersionCode = 2),
|
||||
SingleLang("Mangasushi", "https://mangasushi.org", "en", overrideVersionCode = 3),
|
||||
SingleLang("MangaTone", "https://mangatone.com", "en"),
|
||||
SingleLang("MangaToRead", "https://mangatoread.com", "en"),
|
||||
|