mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Update MundoDonghuaProvider.kt
This commit is contained in:
parent
6f15c8aa14
commit
3575073ee2
1 changed files with 6 additions and 12 deletions
|
@ -92,7 +92,7 @@ class MundoDonghuaProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse {
|
override suspend fun load(url: String): LoadResponse {
|
||||||
val doc = app.get(url, timeout = 120).document
|
val doc = app.get(url, timeout = 120).document.selectFirst("div.row")
|
||||||
val docSpecial = app.get("https://www.mundodonghua.com", timeout = 120).document
|
val docSpecial = app.get("https://www.mundodonghua.com", timeout = 120).document
|
||||||
val poster = doc.selectFirst("head meta[property=og:image]")?.attr("content") ?: ""
|
val poster = doc.selectFirst("head meta[property=og:image]")?.attr("content") ?: ""
|
||||||
val title = doc.selectFirst(".ls-title-serie")?.text() ?: ""
|
val title = doc.selectFirst(".ls-title-serie")?.text() ?: ""
|
||||||
|
@ -103,17 +103,11 @@ class MundoDonghuaProvider : MainAPI() {
|
||||||
"Finalizada" -> ShowStatus.Completed
|
"Finalizada" -> ShowStatus.Completed
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
var counter = 0
|
val specialEpisodes = docSpecial.select(".col-xs-4").mapNotNull {
|
||||||
val specialEpisodes = docSpecial.select("div.row .col-xs-4").mapNotNull {
|
val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: ""
|
||||||
counter++
|
val link = it.selectFirst("a")?.attr("href") ?: ""
|
||||||
if (counter < 7) {
|
if (name.contains(title, true)) {
|
||||||
val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: ""
|
Episode(fixUrl(link), name)
|
||||||
val link = it.selectFirst("a")?.attr("href") ?: ""
|
|
||||||
if (name.contains(title, true)) {
|
|
||||||
Episode(fixUrl(link), name)
|
|
||||||
} else {
|
|
||||||
null
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue