mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
anime/indo: optimize detail page and domain
This commit is contained in:
parent
c6f89db48a
commit
7dabff1da9
22 changed files with 143 additions and 69 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 23
|
||||
version = 24
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package com.hexated
|
||||
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.extractors.Filesim
|
||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
|
||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
import org.jsoup.nodes.Element
|
||||
|
||||
|
@ -113,18 +114,21 @@ class OploverzProvider : MainAPI() {
|
|||
|
||||
val title = document.selectFirst("h1.entry-title")?.text()
|
||||
?.replace("Subtitle Indonesia", "")?.trim() ?: ""
|
||||
val type = document.selectFirst("div.alternati span.type")?.text() ?: ""
|
||||
|
||||
val type = getType(document.selectFirst("div.alternati span.type")?.text() ?: "")
|
||||
val year = document.selectFirst("div.alternati a")?.text()?.filter { it.isDigit() }?.toIntOrNull()
|
||||
val episodes = document.select("div.lstepsiode.listeps ul li").mapNotNull {
|
||||
val header = it.selectFirst("a") ?: return@mapNotNull null
|
||||
val episode = header.text().trim().toIntOrNull()
|
||||
val link = fixUrl(header.attr("href"))
|
||||
Episode(link, header.text(), episode = episode)
|
||||
Episode(link, episode = episode)
|
||||
}.reversed()
|
||||
|
||||
return newAnimeLoadResponse(title, url, getType(type)) {
|
||||
posterUrl = document.selectFirst("div.thumb > img")?.attr("src")
|
||||
this.year = document.selectFirst("div.alternati a")?.text()?.filter { it.isDigit() }?.toIntOrNull()
|
||||
val tracker = APIHolder.getTracker(listOf(title),TrackerType.getTypes(type),year,true)
|
||||
|
||||
return newAnimeLoadResponse(title, url, type) {
|
||||
posterUrl = tracker?.image ?: document.selectFirst("div.thumb > img")?.attr("src")
|
||||
backgroundPosterUrl = tracker?.cover
|
||||
this.year = year
|
||||
addEpisodes(DubStatus.Subbed, episodes)
|
||||
showStatus =
|
||||
getStatus(
|
||||
|
@ -133,6 +137,8 @@ class OploverzProvider : MainAPI() {
|
|||
plot = document.selectFirst("div.entry-content > p")?.text()?.trim()
|
||||
this.tags =
|
||||
document.select("div.genre-info a").map { it.text() }
|
||||
addMalId(tracker?.malId)
|
||||
addAniListId(tracker?.aniId?.toIntOrNull())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue