mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Aniworld: fix episodes
This commit is contained in:
parent
da7e9159ef
commit
eae807a4f3
2 changed files with 14 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -93,11 +93,19 @@ class Aniworld : MainAPI() {
|
|||
val actor =
|
||||
document.select("li:contains(Schauspieler:) ul li a").map { it.select("span").text() }
|
||||
|
||||
val episodes = document.select("div#stream > ul:nth-child(4) li").mapNotNull { eps ->
|
||||
Episode(
|
||||
fixUrl(eps.selectFirst("a")?.attr("href") ?: return@mapNotNull null),
|
||||
episode = eps.selectFirst("a")?.text()?.toIntOrNull()
|
||||
)
|
||||
val episodes = mutableListOf<Episode>()
|
||||
document.select("div#stream > ul:first-child li").apmap { ele ->
|
||||
val page = ele.selectFirst("a")
|
||||
val epsDocument = app.get(fixUrl(page?.attr("href") ?: return@apmap)).document
|
||||
epsDocument.select("div#stream > ul:nth-child(4) li").mapNotNull { eps ->
|
||||
episodes.add(
|
||||
Episode(
|
||||
fixUrl(eps.selectFirst("a")?.attr("href") ?: return@mapNotNull null),
|
||||
episode = eps.selectFirst("a")?.text()?.toIntOrNull(),
|
||||
season = page.text().toIntOrNull()
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return newAnimeLoadResponse(
|
||||
|
|
Loading…
Reference in a new issue