mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fix Jeniusplay
This commit is contained in:
parent
261e5ccaf8
commit
414d672109
4 changed files with 8 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 13
|
version = 14
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -7,8 +7,6 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
||||||
import com.lagradost.cloudstream3.mvvm.safeApiCall
|
import com.lagradost.cloudstream3.mvvm.safeApiCall
|
||||||
import com.lagradost.cloudstream3.utils.*
|
import com.lagradost.cloudstream3.utils.*
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import com.lagradost.nicehttp.Requests
|
|
||||||
import com.lagradost.nicehttp.Session
|
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
|
@ -26,6 +24,8 @@ class IdlixProvider : MainAPI() {
|
||||||
TvType.AsianDrama
|
TvType.AsianDrama
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private val key = "\\x5a\\x6d\\x5a\\x6c\\x4e\\x7a\\x55\\x79\\x4d\\x54\\x56\\x6a\\x5a\\x47\\x52\\x69\\x5a\\x44\\x55\\x30\\x5a\\x6d\\x59\\x35\\x4f\\x57\\x45\\x33\\x4d\\x44\\x4a\\x69\\x4e\\x32\\x4a\\x6c\\x4f\\x54\\x42\\x6c\\x4e\\x7a\\x49\\x3d"
|
||||||
|
|
||||||
override val mainPage = mainPageOf(
|
override val mainPage = mainPageOf(
|
||||||
"$mainUrl/" to "Featured",
|
"$mainUrl/" to "Featured",
|
||||||
"$mainUrl/trending/page/?get=movies" to "Trending Movies",
|
"$mainUrl/trending/page/?get=movies" to "Trending Movies",
|
||||||
|
@ -206,7 +206,7 @@ class IdlixProvider : MainAPI() {
|
||||||
), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), referer = data
|
), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), referer = data
|
||||||
).let { tryParseJson<ResponseHash>(it.text) } ?: return@safeApiCall
|
).let { tryParseJson<ResponseHash>(it.text) } ?: return@safeApiCall
|
||||||
|
|
||||||
var decrypted = AesHelper.cryptoAESHandler(source.embed_url,source.key.toByteArray(), false)?.fixBloat() ?: return@safeApiCall
|
var decrypted = AesHelper.cryptoAESHandler(source.embed_url,key.toByteArray(), false)?.fixBloat() ?: return@safeApiCall
|
||||||
|
|
||||||
if (decrypted.startsWith("https://uservideo.xyz")) {
|
if (decrypted.startsWith("https://uservideo.xyz")) {
|
||||||
decrypted = app.get(decrypted).document.select("iframe").attr("src")
|
decrypted = app.get(decrypted).document.select("iframe").attr("src")
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
|
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 162
|
version = 163
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -415,7 +415,7 @@ object SoraExtractor : SoraStream() {
|
||||||
} else {
|
} else {
|
||||||
"$idlixAPI/episode/$fixTitle-season-$season-episode-$episode"
|
"$idlixAPI/episode/$fixTitle-season-$season-episode-$episode"
|
||||||
}
|
}
|
||||||
invokeWpmovies(url, subtitleCallback, callback, encrypt = true)
|
invokeWpmovies(url, subtitleCallback, callback, encrypt = true, key = "\\x5a\\x6d\\x5a\\x6c\\x4e\\x7a\\x55\\x79\\x4d\\x54\\x56\\x6a\\x5a\\x47\\x52\\x69\\x5a\\x44\\x55\\x30\\x5a\\x6d\\x59\\x35\\x4f\\x57\\x45\\x33\\x4d\\x44\\x4a\\x69\\x4e\\x32\\x4a\\x6c\\x4f\\x54\\x42\\x6c\\x4e\\x7a\\x49\\x3d")
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeMultimovies(
|
suspend fun invokeMultimovies(
|
||||||
|
@ -457,6 +457,7 @@ object SoraExtractor : SoraStream() {
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
fixIframe: Boolean = false,
|
fixIframe: Boolean = false,
|
||||||
encrypt: Boolean = false,
|
encrypt: Boolean = false,
|
||||||
|
key: String? = null,
|
||||||
) {
|
) {
|
||||||
fun String.fixBloat() : String {
|
fun String.fixBloat() : String {
|
||||||
return this.replace("\"", "").replace("\\", "")
|
return this.replace("\"", "").replace("\\", "")
|
||||||
|
@ -479,7 +480,7 @@ object SoraExtractor : SoraStream() {
|
||||||
)
|
)
|
||||||
val source = tryParseJson<ResponseHash>(json.text)?.let {
|
val source = tryParseJson<ResponseHash>(json.text)?.let {
|
||||||
when {
|
when {
|
||||||
encrypt -> cryptoAESHandler(it.embed_url,it.key.toByteArray(), false)?.fixBloat()
|
encrypt -> cryptoAESHandler(it.embed_url,(key ?: return@apmap).toByteArray(), false)?.fixBloat()
|
||||||
fixIframe -> Jsoup.parse(it.embed_url).select("IFRAME").attr("SRC")
|
fixIframe -> Jsoup.parse(it.embed_url).select("IFRAME").attr("SRC")
|
||||||
else -> it.embed_url
|
else -> it.embed_url
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue