Fix Manhwa-Latino (#17469)

* Fix

* Support Latest
This commit is contained in:
Rolando Lecca 2023-08-11 12:59:41 -05:00 committed by GitHub
parent 1ef336b1ef
commit 8e11fd74dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 5 deletions

View File

@ -1,6 +1,8 @@
package eu.kanade.tachiyomi.extension.es.manhwalatino package eu.kanade.tachiyomi.extension.es.manhwalatino
import eu.kanade.tachiyomi.multisrc.madara.Madara 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.text.SimpleDateFormat
import java.util.Locale import java.util.Locale
@ -10,12 +12,29 @@ class ManhwaLatino : Madara(
"es", "es",
SimpleDateFormat("dd/MM/yyyy", Locale("es")), SimpleDateFormat("dd/MM/yyyy", Locale("es")),
) { ) {
override val supportsLatest = false
override val useNewChapterEndpoint = true override val useNewChapterEndpoint = true
override val chapterUrlSelector = "a:eq(1)" override val chapterUrlSelector = "div.mini-letters > a"
override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Estado del comic) > div.summary-content" override val mangaDetailsSelectorStatus = "div.post-content_item:contains(Estado del comic) > div.summary-content"
override val mangaDetailsSelectorDescription = "div.post-content_item:contains(Resumen) > h3 > div.summary-container"
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.wholeText().substringAfter("\n")
}
chapter.date_upload = select("img:not(.thumb)").firstOrNull()?.attr("alt")?.let { parseRelativeDate(it) }
?: select("span a").firstOrNull()?.attr("title")?.let { parseRelativeDate(it) }
?: parseChapterDate(select(chapterDateSelector()).firstOrNull()?.text())
}
return chapter
}
} }

View File

@ -282,7 +282,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("ManhuaUS", "https://manhuaus.com", "en", overrideVersionCode = 5), SingleLang("ManhuaUS", "https://manhuaus.com", "en", overrideVersionCode = 5),
SingleLang("ManhuaZone", "https://manhuazone.com", "en"), SingleLang("ManhuaZone", "https://manhuazone.com", "en"),
SingleLang("Manhwa Raw", "https://manhwaraw.com", "ko", isNsfw = true, overrideVersionCode = 1), SingleLang("Manhwa Raw", "https://manhwaraw.com", "ko", isNsfw = true, overrideVersionCode = 1),
SingleLang("Manhwa-Latino", "https://manhwa-latino.com", "es", isNsfw = true, className = "ManhwaLatino", overrideVersionCode = 3), SingleLang("Manhwa-Latino", "https://manhwa-latino.com", "es", isNsfw = true, className = "ManhwaLatino", overrideVersionCode = 4),
SingleLang("Manhwa-raw", "https://manhwa-raw.com", "all", isNsfw = true, className = "ManhwaDashRaw"), SingleLang("Manhwa-raw", "https://manhwa-raw.com", "all", isNsfw = true, className = "ManhwaDashRaw"),
SingleLang("Manhwa18.app", "https://manhwa18.app", "en", isNsfw = true, className = "Manhwa18app"), SingleLang("Manhwa18.app", "https://manhwa18.app", "en", isNsfw = true, className = "Manhwa18app"),
SingleLang("Manhwa18.org", "https://manhwa18.org", "en", isNsfw = true, className = "Manhwa18Org", overrideVersionCode = 2), SingleLang("Manhwa18.org", "https://manhwa18.org", "en", isNsfw = true, className = "Manhwa18Org", overrideVersionCode = 2),