mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
updated key
This commit is contained in:
parent
14ae8cb74e
commit
e5c8bd9a2f
4 changed files with 20 additions and 6 deletions
|
@ -34,7 +34,7 @@ open class Mcloud : ExtractorApi() {
|
||||||
private val key = "LCbu3iYC7ln24K7P" // key credits @Modder4869
|
private val key = "LCbu3iYC7ln24K7P" // key credits @Modder4869
|
||||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||||
val id = url.substringAfter("e/").substringAfter("embed/").substringBefore("?")
|
val id = url.substringAfter("e/").substringAfter("embed/").substringBefore("?")
|
||||||
keytwo = getWcoKey()
|
keytwo = getWcoKey() ?: return null
|
||||||
val encryptedid = encrypt(cipher(key, encrypt(id))).replace("/", "_").replace("=","")
|
val encryptedid = encrypt(cipher(key, encrypt(id))).replace("/", "_").replace("=","")
|
||||||
val link = "$mainUrl/info/$encryptedid"
|
val link = "$mainUrl/info/$encryptedid"
|
||||||
val response = app.get(link, headers = headers).text
|
val response = app.get(link, headers = headers).text
|
||||||
|
|
|
@ -115,7 +115,7 @@ open class WcoStream : ExtractorApi() {
|
||||||
)?.destructured) ?: return emptyList()
|
)?.destructured) ?: return emptyList()
|
||||||
// val (skey) = Regex("""skey\s=\s['"](.*?)['"];""").find(html)?.destructured
|
// val (skey) = Regex("""skey\s=\s['"](.*?)['"];""").find(html)?.destructured
|
||||||
// ?: return emptyList()
|
// ?: return emptyList()
|
||||||
keytwo = getWcoKey()
|
keytwo = getWcoKey() ?: return emptyList()
|
||||||
val encryptedID = encrypt(cipher(key, encrypt(Id))).replace("/", "_").replace("=","")
|
val encryptedID = encrypt(cipher(key, encrypt(Id))).replace("/", "_").replace("=","")
|
||||||
val apiLink = "$baseUrl/info/$encryptedID"
|
val apiLink = "$baseUrl/info/$encryptedID"
|
||||||
val referrer = "$baseUrl/e/$Id?domain=wcostream.cc"
|
val referrer = "$baseUrl/e/$Id?domain=wcostream.cc"
|
||||||
|
|
|
@ -1,12 +1,27 @@
|
||||||
package com.lagradost.cloudstream3.extractors.helper
|
package com.lagradost.cloudstream3.extractors.helper
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
|
|
||||||
class WcoHelper {
|
class WcoHelper {
|
||||||
companion object {
|
companion object {
|
||||||
suspend fun getWcoKey(): String {
|
data class ExternalKeys(
|
||||||
val i = app.get("https://raw.githubusercontent.com/LagradOst/CloudStream-3/master/docs/wcokey.txt").text
|
@JsonProperty("wco_key")
|
||||||
return i
|
val wcoKey: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
|
private var keys: ExternalKeys? = null
|
||||||
|
private val wcoKey: String? get() = keys?.wcoKey
|
||||||
|
|
||||||
|
private suspend fun getKeys() {
|
||||||
|
keys = keys
|
||||||
|
?: app.get("https://raw.githubusercontent.com/LagradOst/CloudStream-3/master/docs/keys.json")
|
||||||
|
.parsedSafe()
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun getWcoKey(): String? {
|
||||||
|
getKeys()
|
||||||
|
return wcoKey
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1 +0,0 @@
|
||||||
51wJ0FDq/UVCefLopEcmK3ni4WIQztMjZdSYOsbHr9R2h7PvxBGAuglaN8+kXT6y
|
|
Loading…
Reference in a new issue