searching errors...

This commit is contained in:
Clyzer 2022-12-12 14:09:55 -03:00
parent b475cf25a2
commit 518a02b8f0

View file

@ -92,8 +92,8 @@ class MundoDonghuaProvider : MainAPI() {
}
override suspend fun load(url: String): LoadResponse {
val doc = app.get(url, timeout = 120).document
val doc2 = app.get(mainUrl, timeout = 120).document
val doc = app.get(url, timeout = 120).document
val poster = doc.selectFirst("head meta[property=og:image]")?.attr("content") ?: ""
val title = doc.selectFirst(".ls-title-serie")?.text() ?: ""
val description = doc.selectFirst("p.text-justify.fc-dark")?.text() ?: ""
@ -103,9 +103,9 @@ class MundoDonghuaProvider : MainAPI() {
"Finalizada" -> ShowStatus.Completed
else -> null
}
val specialEpisodes = doc2.selectFirst("sm-row bg-white pt-10 pr-20 pb-15 pl-20")!!.selectFirst("row")!!.select("item col-lg-2 col-md-2 col-xs-4")!!.map {
val specialEpisodes = doc2.selectFirst("sm-row bg-white pt-10 pr-20 pb-15 pl-20")!!.selectFirst("row")!!.select("item col-lg-2 col-md-2 col-xs-4").map {
if (it.selectFirst("sf fc-dark f-bold")?.text()?.contains(title) ?: false) {
val name = it.selectFirst("sf fc-dark f-bold")?.text()?.replace("Episodio","-")
val name = it.selectFirst("sf fc-dark f-bold")?.text()?.replace("Episodio","-") ?: "fallo"
val link = it.attr("href")
Episode(fixUrl(link), name)
}
@ -120,7 +120,7 @@ class MundoDonghuaProvider : MainAPI() {
val tvType = if (typeinfo.contains(Regex("Tipo.*Pel.cula"))) TvType.AnimeMovie else TvType.Anime
return newAnimeLoadResponse(title, url, tvType) {
posterUrl = poster
addEpisodes(DubStatus.Subbed, episodesFinal.filterIsInstance<Episode>())
addEpisodes(DubStatus.Subbed, episodesFinal.filterNotNull().filterIsInstance<Episode>())
showStatus = status
plot = description
tags = genres