mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Otakudesu, Rebahin, Kuramanime
This commit is contained in:
parent
57ebef9198
commit
25e2deb249
7 changed files with 16 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 5
|
version = 6
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -91,7 +91,7 @@ class KuramanimeProvider : MainAPI() {
|
||||||
val link = "$mainUrl/anime?search=$query&order_by=latest"
|
val link = "$mainUrl/anime?search=$query&order_by=latest"
|
||||||
val document = app.get(link).document
|
val document = app.get(link).document
|
||||||
|
|
||||||
return document.select("div#animeList div.col-lg-4.col-md-6.col-sm-6").mapNotNull {
|
return document.select("div#animeList div.product__item").mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,12 +123,17 @@ class KuramanimeProvider : MainAPI() {
|
||||||
)
|
)
|
||||||
).parsedSafe<DataAni>()?.data?.media?.id
|
).parsedSafe<DataAni>()?.data?.media?.id
|
||||||
|
|
||||||
val episodes =
|
val episodes = mutableListOf<Episode>()
|
||||||
Jsoup.parse(document.select("#episodeLists").attr("data-content")).select("a").map {
|
|
||||||
|
for (i in 1..5) {
|
||||||
|
val doc = app.get("$url?page=$i").document
|
||||||
|
val eps = Jsoup.parse(doc.select("#episodeLists").attr("data-content")).select("a").mapNotNull {
|
||||||
val name = it.text().trim()
|
val name = it.text().trim()
|
||||||
val link = it.attr("href")
|
val link = it.attr("href")
|
||||||
Episode(link, name)
|
Episode(link, name)
|
||||||
}
|
}.filter { it.name?.contains(Regex("(?i)(Terlama)|(Terbaru)")) == false }
|
||||||
|
if(eps.isEmpty()) break else episodes.addAll(eps)
|
||||||
|
}
|
||||||
|
|
||||||
val recommendations = document.select("div#randomList > a").mapNotNull {
|
val recommendations = document.select("div#randomList > a").mapNotNull {
|
||||||
val epHref = it.attr("href")
|
val epHref = it.attr("href")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 5
|
version = 6
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -181,7 +181,7 @@ class OtakudesuProvider : MainAPI() {
|
||||||
data
|
data
|
||||||
// , interceptor = interceptor
|
// , interceptor = interceptor
|
||||||
).document
|
).document
|
||||||
val scriptData = document.select("script").last()?.data()
|
val scriptData = document.select("script:containsData(action:)").lastOrNull()?.data()
|
||||||
val token = scriptData?.substringAfter("{action:\"")?.substringBefore("\"}").toString()
|
val token = scriptData?.substringAfter("{action:\"")?.substringBefore("\"}").toString()
|
||||||
|
|
||||||
val nonce = app.post("$mainUrl/wp-admin/admin-ajax.php", data = mapOf("action" to token))
|
val nonce = app.post("$mainUrl/wp-admin/admin-ajax.php", data = mapOf("action" to token))
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 4
|
version = 5
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import org.jsoup.nodes.Element
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
open class RebahinProvider : MainAPI() {
|
open class RebahinProvider : MainAPI() {
|
||||||
override var mainUrl = "http://104.237.198.197"
|
override var mainUrl = "http://104.237.198.198"
|
||||||
override var name = "Rebahin"
|
override var name = "Rebahin"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
override var lang = "id"
|
override var lang = "id"
|
||||||
|
|
|
@ -1565,17 +1565,13 @@ object SoraExtractor : SoraStream() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val fixTitle = title?.replace(":", "")
|
val fixTitle = title?.fixTitle()?.replace("-", " ")
|
||||||
val doc = app.get("$moviezAddAPI/?s=$fixTitle").document
|
val doc = app.get("$moviezAddAPI/?s=$fixTitle").document
|
||||||
|
|
||||||
// TODO find better way
|
|
||||||
val matchMedia = doc.select("article.mh-loop-item").map {
|
val matchMedia = doc.select("article.mh-loop-item").map {
|
||||||
it.select("a").attr("href") to it.select("a").text()
|
it.select("a").attr("href") to it.select("a").text()
|
||||||
}.find {
|
}.find {
|
||||||
(it.second.contains("$fixTitle", true) || it.second.contains(
|
it.second.contains(Regex("(?i)($fixTitle)|($title)")) && it.first.contains("$year")
|
||||||
"$title",
|
|
||||||
true
|
|
||||||
)) && it.first.contains("$year")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val detailLink =
|
val detailLink =
|
||||||
|
|
Loading…
Reference in a new issue