mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
parent
f6051f81bc
commit
ef00741692
7 changed files with 80 additions and 20 deletions
|
@ -1,7 +1,7 @@
|
|||
import org.jetbrains.kotlin.konan.properties.Properties
|
||||
|
||||
// use an integer for version numbers
|
||||
version = 27
|
||||
version = 28
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
|
|
|
@ -111,7 +111,7 @@ object NineTv {
|
|||
"Referer" to (referer ?: ""),
|
||||
))
|
||||
val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1)
|
||||
val key = res.document.getKeys() ?: throw ErrorLoadingException("can't generate key")
|
||||
val key = "tSIsE8FgpRkv3QQQ"
|
||||
val decrypt = AesHelper.cryptoAESHandler(master ?: return, key.toByteArray(), false)
|
||||
?.replace("\\", "")
|
||||
?: throw ErrorLoadingException("failed to decrypt")
|
||||
|
|
|
@ -176,12 +176,12 @@ class KuramanimeProvider : MainAPI() {
|
|||
link,
|
||||
referer = "",
|
||||
quality = quality ?: Qualities.Unknown.value,
|
||||
// headers = mapOf(
|
||||
// "Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5",
|
||||
// "Range" to "bytes=0-",
|
||||
// "Sec-Fetch-Dest" to "video",
|
||||
// "Sec-Fetch-Mode" to "no-cors",
|
||||
// ),
|
||||
headers = mapOf(
|
||||
"Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5",
|
||||
"Range" to "bytes=0-",
|
||||
"Sec-Fetch-Dest" to "video",
|
||||
"Sec-Fetch-Mode" to "no-cors",
|
||||
),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -193,18 +193,20 @@ class KuramanimeProvider : MainAPI() {
|
|||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
|
||||
val req = app.get(data)
|
||||
val res = req.document
|
||||
val token = res.select("meta[name=csrf-token]").attr("content")
|
||||
val st = res.select("input#kuramaRoute").attr("value")
|
||||
headers = mapOf(
|
||||
"Accept" to "application/json, text/javascript, */*; q=0.01",
|
||||
"Authorization" to "Bearer YTNWeVlXMWhibWx0WlRwaVMwNUNTWFk1U1d4NVFsbDBObE5KWW10a1JWVXpkWFIzTTA5c05rcFJPSFJ6T2pFM01EQTFOemN5TnpBd01EQT0%3D",
|
||||
"X-Requested-With" to "XMLHttpRequest",
|
||||
"X-CSRF-TOKEN" to token
|
||||
)
|
||||
cookies = req.cookies
|
||||
res.select("select#changeServer option").apmap { source ->
|
||||
val server = source.attr("value")
|
||||
val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=$st&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server"
|
||||
val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=${getMisc()}&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server"
|
||||
if (server.contains(Regex("(?i)kuramadrive|archive"))) {
|
||||
invokeLocalSource(link, server, data, callback)
|
||||
} else {
|
||||
|
@ -222,4 +224,21 @@ class KuramanimeProvider : MainAPI() {
|
|||
return true
|
||||
}
|
||||
|
||||
private suspend fun getMisc(): String {
|
||||
val misc = app.get(
|
||||
"$mainUrl/misc/post/EVhcpMNbO77acNZcHr2XVjaG8WAdNC1u",
|
||||
headers = headers + mapOf("X-Request-ID" to getRequestId()),
|
||||
cookies = cookies
|
||||
)
|
||||
cookies = misc.cookies
|
||||
return misc.parsed()
|
||||
}
|
||||
|
||||
private fun getRequestId(length: Int = 8): String {
|
||||
val allowedChars = ('a'..'z') + ('0'..'9')
|
||||
return (1..length)
|
||||
.map { allowedChars.random() }
|
||||
.joinToString("")
|
||||
}
|
||||
|
||||
}
|
|
@ -253,7 +253,7 @@ object NineTv {
|
|||
"Referer" to (referer ?: ""),
|
||||
))
|
||||
val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1)
|
||||
val key = res.document.getKeys() ?: throw ErrorLoadingException("can't generate key")
|
||||
val key = "tSIsE8FgpRkv3QQQ"
|
||||
val decrypt = AesHelper.cryptoAESHandler(master ?: return, key.toByteArray(), false)
|
||||
?.replace("\\", "")
|
||||
?: throw ErrorLoadingException("failed to decrypt")
|
||||
|
|
|
@ -1936,6 +1936,26 @@ object SoraExtractor : SoraStream() {
|
|||
|
||||
}
|
||||
|
||||
suspend fun invokeGomovies(
|
||||
title: String? = null,
|
||||
year: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
invokeGpress(
|
||||
title,
|
||||
year,
|
||||
season,
|
||||
episode,
|
||||
callback,
|
||||
"https://gomovies-online.cam",
|
||||
"Gomovies",
|
||||
"_smQamBQsETb",
|
||||
"_sBWcqbTBMaT"
|
||||
)
|
||||
}
|
||||
|
||||
private suspend fun invokeGpress(
|
||||
title: String? = null,
|
||||
year: Int? = null,
|
||||
|
@ -1957,9 +1977,14 @@ object SoraExtractor : SoraStream() {
|
|||
} else {
|
||||
"$title Season $season"
|
||||
}
|
||||
|
||||
val doc = app.get("$api/search/$query").document
|
||||
|
||||
val idCookies =
|
||||
mapOf(
|
||||
"advanced-frontendgomovies7" to "bjd4n0nnv4hlt4fj5cdjgbrne2",
|
||||
"_identitygomovies7" to "52fdc70b008c0b1d881dac0f01cca819edd512de01cc8bbc1224ed4aafb78b52a:2:{i:0;s:18:\"_identitygomovies7\";i:1;s:52:\"[2050366,\"HnVRRAObTASOJEr45YyCM8wiHol0V1ko\",2592000]\";}"
|
||||
)
|
||||
val req = app.get("$api/search/$query")
|
||||
val doc = req.document
|
||||
var cookies = req.cookies + idCookies
|
||||
val media = doc.select("div.$mediaSelector").map {
|
||||
Triple(
|
||||
it.attr("data-filmName"), it.attr("data-year"), it.select("a").attr("href")
|
||||
|
@ -1983,12 +2008,14 @@ object SoraExtractor : SoraStream() {
|
|||
val iframe = if (season == null) {
|
||||
media.third
|
||||
} else {
|
||||
app.get(
|
||||
val res = app.get(
|
||||
fixUrl(
|
||||
media.third,
|
||||
api
|
||||
)
|
||||
).document.selectFirst("div#$episodeSelector a:contains(Episode ${slug.second})")
|
||||
), cookies = cookies
|
||||
)
|
||||
cookies = cookies + res.cookies
|
||||
res.document.selectFirst("div#$episodeSelector a:contains(Episode ${slug.second})")
|
||||
?.attr("href")
|
||||
} ?: return
|
||||
|
||||
|
@ -1998,11 +2025,11 @@ object SoraExtractor : SoraStream() {
|
|||
media.third.substringAfterLast("/") to iframe.substringAfterLast("/")
|
||||
.substringBefore("-")
|
||||
}
|
||||
val res = app.get(fixUrl(iframe, api), verify = false)
|
||||
val res = app.get(fixUrl(iframe ?: return, api), cookies = cookies, verify = false)
|
||||
val serverUrl = res.document.selectFirst("script:containsData(pushState)")?.data()?.let {
|
||||
""",\s*'([^']+)""".toRegex().find(it)?.groupValues?.get(1)
|
||||
} ?: return
|
||||
val cookies = res.cookies
|
||||
cookies = cookies + res.cookies
|
||||
val url = res.document.select("meta[property=og:url]").attr("content")
|
||||
val headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
||||
val qualities = intArrayOf(2160, 1440, 1080, 720, 480, 360)
|
||||
|
@ -2445,7 +2472,7 @@ object SoraExtractor : SoraStream() {
|
|||
ExtractorLink(
|
||||
"SFMovies",
|
||||
"SFMovies",
|
||||
fixUrl(video, base64DecodeAPI("YQ==bm4=dGE=YXQ=L3I=ZXQ=Lm4=d3M=ZG8=aW4=Lnc=cmU=Y28=Yi4=bG8=LmI=bmE=YW4=dHQ=cmE=Ly8=czo=dHA=aHQ=")),
|
||||
fixUrl(video, base64DecodeAPI("cw==aWM=c20=Y28=dC8=bmU=cy4=b3c=bmQ=d2k=ZS4=b3I=LmM=b2I=Ymw=cy4=aWM=c20=Y28=Ly8=czo=dHA=aHQ=")),
|
||||
"",
|
||||
Qualities.P1080.value,
|
||||
INFER_TYPE
|
||||
|
|
|
@ -33,6 +33,7 @@ import com.hexated.SoraExtractor.invokeRidomovies
|
|||
import com.hexated.SoraExtractor.invokeSmashyStream
|
||||
import com.hexated.SoraExtractor.invokeDumpStream
|
||||
import com.hexated.SoraExtractor.invokeEmovies
|
||||
import com.hexated.SoraExtractor.invokeGomovies
|
||||
import com.hexated.SoraExtractor.invokeHdmovies4u
|
||||
import com.hexated.SoraExtractor.invokeMoment
|
||||
import com.hexated.SoraExtractor.invokeMultimovies
|
||||
|
@ -679,6 +680,9 @@ open class SoraStream : TmdbProvider() {
|
|||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeGomovies(res.title, res.year, res.season, res.episode, callback)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeShowflix(
|
||||
res.title,
|
||||
|
|
|
@ -22,6 +22,7 @@ import com.hexated.SoraExtractor.invokeRidomovies
|
|||
import com.hexated.SoraExtractor.invokeSmashyStream
|
||||
import com.hexated.SoraExtractor.invokeDumpStream
|
||||
import com.hexated.SoraExtractor.invokeEmovies
|
||||
import com.hexated.SoraExtractor.invokeGomovies
|
||||
import com.hexated.SoraExtractor.invokeMoment
|
||||
import com.hexated.SoraExtractor.invokeMultimovies
|
||||
import com.hexated.SoraExtractor.invokeNetmovies
|
||||
|
@ -244,6 +245,15 @@ class SoraStreamLite : SoraStream() {
|
|||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeGomovies(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeMoment(res.imdbId, res.season, res.episode, callback)
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue