mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
update
This commit is contained in:
parent
e6c491fc16
commit
a90648fa79
4 changed files with 28 additions and 9 deletions
|
@ -2063,7 +2063,6 @@ object SoraExtractor : SoraStream() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
) {
|
) {
|
||||||
val ref = "https://blackvid.space/"
|
|
||||||
val key = "b6055c533c19131a638c3d2299d525d5ec08a814"
|
val key = "b6055c533c19131a638c3d2299d525d5ec08a814"
|
||||||
val url = if (season == null) {
|
val url = if (season == null) {
|
||||||
"$blackvidAPI/v3/movie/sources/$tmdbId?key=$key"
|
"$blackvidAPI/v3/movie/sources/$tmdbId?key=$key"
|
||||||
|
@ -2071,11 +2070,7 @@ object SoraExtractor : SoraStream() {
|
||||||
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
|
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
|
||||||
}
|
}
|
||||||
|
|
||||||
val data = app.get(
|
val data = request(url,).peekBody(1024 * 512).source().buffer.readByteArray()
|
||||||
url,
|
|
||||||
timeout = 120L,
|
|
||||||
referer = ref
|
|
||||||
).okhttpResponse.peekBody(1024 * 512).source().buffer.readByteArray()
|
|
||||||
.decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
|
.decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
|
||||||
val json = tryParseJson<BlackvidResponses>(data)
|
val json = tryParseJson<BlackvidResponses>(data)
|
||||||
|
|
||||||
|
@ -2086,7 +2081,7 @@ object SoraExtractor : SoraStream() {
|
||||||
"Blackvid",
|
"Blackvid",
|
||||||
"Blackvid${source.label}",
|
"Blackvid${source.label}",
|
||||||
s.url ?: return@s,
|
s.url ?: return@s,
|
||||||
ref,
|
"https://blackvid.space/",
|
||||||
if (s.quality.equals("4k")) Qualities.P2160.value else s.quality?.toIntOrNull()
|
if (s.quality.equals("4k")) Qualities.P2160.value else s.quality?.toIntOrNull()
|
||||||
?: Qualities.P1080.value,
|
?: Qualities.P1080.value,
|
||||||
INFER_TYPE
|
INFER_TYPE
|
||||||
|
|
|
@ -443,7 +443,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeKisskh(
|
if (res.isAsian || res.isAnime) invokeKisskh(
|
||||||
res.title,
|
res.title,
|
||||||
res.season,
|
res.season,
|
||||||
res.episode,
|
res.episode,
|
||||||
|
|
|
@ -171,7 +171,7 @@ class SoraStreamLite : SoraStream() {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeKisskh(
|
if (res.isAsian || res.isAnime) invokeKisskh(
|
||||||
res.title,
|
res.title,
|
||||||
res.season,
|
res.season,
|
||||||
res.episode,
|
res.episode,
|
||||||
|
|
|
@ -19,12 +19,16 @@ import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import com.lagradost.nicehttp.NiceResponse
|
import com.lagradost.nicehttp.NiceResponse
|
||||||
import com.lagradost.nicehttp.RequestBodyTypes
|
import com.lagradost.nicehttp.RequestBodyTypes
|
||||||
|
import com.lagradost.nicehttp.Requests.Companion.await
|
||||||
import com.lagradost.nicehttp.requestCreator
|
import com.lagradost.nicehttp.requestCreator
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
|
import okhttp3.Request
|
||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import java.math.BigInteger
|
import java.math.BigInteger
|
||||||
import java.net.*
|
import java.net.*
|
||||||
|
@ -34,6 +38,7 @@ import java.security.spec.PKCS8EncodedKeySpec
|
||||||
import java.security.spec.X509EncodedKeySpec
|
import java.security.spec.X509EncodedKeySpec
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
import javax.crypto.Cipher
|
import javax.crypto.Cipher
|
||||||
import javax.crypto.spec.GCMParameterSpec
|
import javax.crypto.spec.GCMParameterSpec
|
||||||
import javax.crypto.spec.IvParameterSpec
|
import javax.crypto.spec.IvParameterSpec
|
||||||
|
@ -1278,6 +1283,25 @@ private enum class Symbol(val decimalValue: Int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun request(
|
||||||
|
url: String,
|
||||||
|
allowRedirects: Boolean = true,
|
||||||
|
timeout: Long = 60L
|
||||||
|
): Response {
|
||||||
|
val client = OkHttpClient().newBuilder()
|
||||||
|
.connectTimeout(timeout, TimeUnit.SECONDS)
|
||||||
|
.readTimeout(timeout, TimeUnit.SECONDS)
|
||||||
|
.writeTimeout(timeout, TimeUnit.SECONDS)
|
||||||
|
.followRedirects(allowRedirects)
|
||||||
|
.followSslRedirects(allowRedirects)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
val request: Request = Request.Builder()
|
||||||
|
.url(url)
|
||||||
|
.build()
|
||||||
|
return client.newCall(request).await()
|
||||||
|
}
|
||||||
|
|
||||||
object DumpUtils {
|
object DumpUtils {
|
||||||
|
|
||||||
private val deviceId = getDeviceId()
|
private val deviceId = getDeviceId()
|
||||||
|
|
Loading…
Reference in a new issue