Prueba nueva

This commit is contained in:
Clyzer 2023-01-19 11:11:36 -03:00
parent 73ad0faa55
commit db777ad7b6

View file

@ -23,15 +23,6 @@ class MundoDonghuaProvider : MainAPI() {
TvType.Anime,
)
val docSpecial = app.get(mainUrl, timeout = 120).document
val specialEpisodes = docSpecial.select("div.sm-row.bg-white.pt-10.pr-20.pb-15.pl-20 div.item.col-lg-2.col-md-2.col-xs-4").mapNotNull {
val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: ""
val link = it.selectFirst("a")?.attr("href") ?: ""
if (name.contains(title, true)) {
Episode(fixUrl(link), name)
} else {
null
}
}.reversed()
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
val urls = listOf(
@ -102,7 +93,6 @@ class MundoDonghuaProvider : MainAPI() {
override suspend fun load(url: String): LoadResponse {
val doc = app.get(url, timeout = 120).document
val docSpecial = app.get(mainUrl, 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() ?: ""
@ -112,6 +102,15 @@ class MundoDonghuaProvider : MainAPI() {
"Finalizada" -> ShowStatus.Completed
else -> null
}
val specialEpisodes = docSpecial.select("div.sm-row.bg-white.pt-10.pr-20.pb-15.pl-20 div.item.col-lg-2.col-md-2.col-xs-4").mapNotNull {
val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: ""
val link = it.selectFirst("a")?.attr("href") ?: ""
if (name.contains(title, true)) {
Episode(fixUrl(link), name)
} else {
null
}
}.reversed()
val episodes = doc.select("ul.donghua-list a").map {
val name = it.selectFirst(".fs-16")?.text()
val link = it.attr("href")