Fixed special episodes in MundoDonghua Provider

This commit is contained in:
Clyzer 2022-12-12 14:57:45 -03:00
parent d73c9f3302
commit 9ae2bfd3b5

View file

@ -103,11 +103,15 @@ class MundoDonghuaProvider : MainAPI() {
"Finalizada" -> ShowStatus.Completed "Finalizada" -> ShowStatus.Completed
else -> null else -> null
} }
val specialEpisodes = doc2.selectFirst(".sm-row.bg-white.pt-10.pr-20.pb-15.pl-20")?.selectFirst("div.row")?.select("item col-lg-2 col-md-2 col-xs-4")?.map { var counter = 0
if (it.selectFirst(".sf.fc-dark.f-bold")?.text()?.contains(title) ?: false) { val specialEpisodes = doc2.select("div.row .col-xs-4").map {
val name = it.selectFirst("sf fc-dark f-bold")?.text()?.replace("Episodio","-") ?: "fallo" counter = counter + 1
val link = it.selectFirst("a")?.attr("href") ?: "fallo" if (counter < 7){
Episode(fixUrl(link), name) if (it.selectFirst("h5")?.text()?.contains(title) ?: false) {
val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: "fallo"
val link = it.selectFirst("a")?.attr("href") ?: "fallo"
Episode(fixUrl(link), name)
}
} }
}?.filterNotNull() ?: emptyList() }?.filterNotNull() ?: emptyList()
val episodes = doc.select("ul.donghua-list a").map { val episodes = doc.select("ul.donghua-list a").map {