Fix MangasTK (#15968)

This commit is contained in:
seew3l 2023-04-06 07:20:55 -05:00 committed by GitHub
parent 8d52e7636d
commit 8ea319bbb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 57 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View 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
}
}

View File

@ -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", "连载中",
)

View File

@ -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"),