updated key

This commit is contained in:
LagradOst 2022-05-28 17:03:49 +02:00
parent 14ae8cb74e
commit e5c8bd9a2f
4 changed files with 20 additions and 6 deletions

View File

@ -34,7 +34,7 @@ open class Mcloud : ExtractorApi() {
private val key = "LCbu3iYC7ln24K7P" // key credits @Modder4869
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val id = url.substringAfter("e/").substringAfter("embed/").substringBefore("?")
keytwo = getWcoKey()
keytwo = getWcoKey() ?: return null
val encryptedid = encrypt(cipher(key, encrypt(id))).replace("/", "_").replace("=","")
val link = "$mainUrl/info/$encryptedid"
val response = app.get(link, headers = headers).text

View File

@ -115,7 +115,7 @@ open class WcoStream : ExtractorApi() {
)?.destructured) ?: return emptyList()
// val (skey) = Regex("""skey\s=\s['"](.*?)['"];""").find(html)?.destructured
// ?: return emptyList()
keytwo = getWcoKey()
keytwo = getWcoKey() ?: return emptyList()
val encryptedID = encrypt(cipher(key, encrypt(Id))).replace("/", "_").replace("=","")
val apiLink = "$baseUrl/info/$encryptedID"
val referrer = "$baseUrl/e/$Id?domain=wcostream.cc"

View File

@ -1,12 +1,27 @@
package com.lagradost.cloudstream3.extractors.helper
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.app
class WcoHelper {
companion object {
suspend fun getWcoKey(): String {
val i = app.get("https://raw.githubusercontent.com/LagradOst/CloudStream-3/master/docs/wcokey.txt").text
return i
data class ExternalKeys(
@JsonProperty("wco_key")
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
}
}
}

View File

@ -1 +0,0 @@
51wJ0FDq/UVCefLopEcmK3ni4WIQztMjZdSYOsbHr9R2h7PvxBGAuglaN8+kXT6y