* Key fix @Modder4869

* link change
This commit is contained in:
Stormunblessed 2022-05-28 14:56:07 +00:00 committed by GitHub
parent 45a7977a53
commit 14ae8cb74e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 2 deletions

View file

@ -6,6 +6,7 @@ on:
paths-ignore:
- '*.md'
- '*.json'
- '**/wcokey.txt'
concurrency:
group: "pre-release"

View file

@ -6,6 +6,8 @@ import com.lagradost.cloudstream3.apmap
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.extractors.WcoStream.Companion.cipher
import com.lagradost.cloudstream3.extractors.WcoStream.Companion.encrypt
import com.lagradost.cloudstream3.extractors.WcoStream.Companion.keytwo
import com.lagradost.cloudstream3.extractors.helper.WcoHelper.Companion.getWcoKey
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
@ -32,6 +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()
val encryptedid = encrypt(cipher(key, encrypt(id))).replace("/", "_").replace("=","")
val link = "$mainUrl/info/$encryptedid"
val response = app.get(link, headers = headers).text

View file

@ -3,6 +3,7 @@ package com.lagradost.cloudstream3.extractors
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.apmap
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.extractors.helper.WcoHelper.Companion.getWcoKey
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper.Companion.generateM3u8
@ -55,7 +56,7 @@ open class WcoStream : ExtractorApi() {
override val requiresReferer = false
companion object {
private val keytwo = "0wMrYU+ixjJ4QdzgfN2HlyIVAt3sBOZnCT9Lm7uFDovkb/EaKpRWhqXS5168ePcG"
var keytwo = ""
fun encrypt(input: String): String {
if (input.any { it.code >= 256 }) throw Exception("illegal characters!")
var output = ""
@ -114,7 +115,7 @@ open class WcoStream : ExtractorApi() {
)?.destructured) ?: return emptyList()
// val (skey) = Regex("""skey\s=\s['"](.*?)['"];""").find(html)?.destructured
// ?: return emptyList()
keytwo = getWcoKey()
val encryptedID = encrypt(cipher(key, encrypt(Id))).replace("/", "_").replace("=","")
val apiLink = "$baseUrl/info/$encryptedID"
val referrer = "$baseUrl/e/$Id?domain=wcostream.cc"

View file

@ -0,0 +1,12 @@
package com.lagradost.cloudstream3.extractors.helper
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
}
}
}

1
docs/wcokey.txt Normal file
View file

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