mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Fixed special episodes in MundoDonghua Provider
This commit is contained in:
parent
ea74dd6ddd
commit
386e41a100
1 changed files with 3 additions and 4 deletions
|
@ -92,7 +92,6 @@ class MundoDonghuaProvider : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun load(url: String): LoadResponse {
|
||||
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() ?: ""
|
||||
|
@ -104,16 +103,16 @@ class MundoDonghuaProvider : MainAPI() {
|
|||
else -> null
|
||||
}
|
||||
var counter = 0
|
||||
val specialEpisodes = doc2.select("div.row .col-xs-4").map {
|
||||
val specialEpisodes = app.get(mainUrl, timeout = 120).document.select("div.row .col-xs-4").map {
|
||||
counter = counter + 1
|
||||
if (counter < 7){
|
||||
if (it.selectFirst("h5")?.text()?.contains(title) ?: false) {
|
||||
if (it.selectFirst("h5")?.text()?.toLowerCase()?.contains(title.toLowerCase()) ?: false) {
|
||||
val name = it.selectFirst("h5")?.text()?.replace("Episodio","-") ?: "fallo"
|
||||
val link = it.selectFirst("a")?.attr("href") ?: "fallo"
|
||||
Episode(fixUrl(link), name)
|
||||
}
|
||||
}
|
||||
}.filterNotNull()
|
||||
}
|
||||
val episodes = doc.select("ul.donghua-list a").map {
|
||||
val name = it.selectFirst(".fs-16")?.text()
|
||||
val link = it.attr("href")
|
||||
|
|
Loading…
Reference in a new issue