InariManga: Update selectors (#16059)

* Update selectors

* Rebuild
This commit is contained in:
seew3l 2023-04-15 09:05:39 -05:00 committed by GitHub
parent 0c01943ef2
commit 025224d903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 4 deletions

View File

@ -1,6 +1,8 @@
package eu.kanade.tachiyomi.extension.es.inarimanga
import eu.kanade.tachiyomi.multisrc.madara.Madara
import eu.kanade.tachiyomi.source.model.SManga
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
@ -10,8 +12,36 @@ class InariManga : Madara(
"es",
dateFormat = SimpleDateFormat("MMMM dd, yyyy", Locale("es")),
) {
override val mangaDetailsSelectorDescription = "div.manga-summary"
override val mangaDetailsSelectorThumbnail = "div.summary_image img.notUsed" // Dimensions of img are not suitable for Tachiyomi
override fun popularMangaSelector() = "div.page-listing-item div.post"
override val popularMangaUrlSelector = "div.p-2 > h6 > a"
override fun searchMangaSelector() = "div.page-listing-item div.post"
private val searchMangaUrlSelector = "div.p-2 > h6 > a"
override val mangaDetailsSelectorDescription = "div.card-body:has(h5:contains(Sinopsis))"
override val mangaDetailsSelectorThumbnail = "div.col-sticky-top > img"
override val mangaDetailsSelectorStatus = "div.card-body tr:has(th:contains(Estatus)) > td"
override val mangaDetailsSelectorGenre = "div.my-auto > div.inline-block > a"
override val useLoadMoreSearch = false
override val useNewChapterEndpoint = true
override fun chapterListSelector() = "tr.wp-manga-chapter"
override fun chapterDateSelector() = "time.chapter-release-date"
override fun searchMangaFromElement(element: Element): SManga {
val manga = SManga.create()
with(element) {
select(searchMangaUrlSelector).first()?.let {
manga.setUrlWithoutDomain(it.attr("abs:href"))
manga.title = it.ownText()
}
select("img").first()?.let {
manga.thumbnail_url = imageFromElement(it)
}
}
return manga
}
}

View File

@ -734,7 +734,7 @@ abstract class Madara(
"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", "En curso", "Emision",
"En marcha", "Publicandose", "连载中",
"En marcha", "Publicandose", "En emision", "连载中",
)
protected val hiatusStatusList: Array<String> = arrayOf(

View File

@ -148,7 +148,7 @@ class MadaraGenerator : ThemeSourceGenerator {
SingleLang("Illusion Scan", "https://illusionscan.com", "pt-BR", isNsfw = true),
SingleLang("Immortal Updates", "https://immortalupdates.com", "en", overrideVersionCode = 6),
SingleLang("Império Scans", "https://imperioscans.com.br", "pt-BR", className = "ImperioScans", overrideVersionCode = 1),
SingleLang("InariManga", "https://inarimanga.com", "es"),
SingleLang("InariManga", "https://inarimanga.com", "es", overrideVersionCode = 1),
SingleLang("Inazu Manga", "https://inazumanga.com", "id", isNsfw = true),
SingleLang("InfraFandub", "https://infrafandub.xyz", "es"),
SingleLang("Inmortal Scan", "https://manga.mundodrama.site", "es"),