mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
parent
45a7977a53
commit
14ae8cb74e
5 changed files with 20 additions and 2 deletions
1
.github/workflows/prerelease.yml
vendored
1
.github/workflows/prerelease.yml
vendored
|
@ -6,6 +6,7 @@ on:
|
|||
paths-ignore:
|
||||
- '*.md'
|
||||
- '*.json'
|
||||
- '**/wcokey.txt'
|
||||
|
||||
concurrency:
|
||||
group: "pre-release"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
1
docs/wcokey.txt
Normal file
|
@ -0,0 +1 @@
|
|||
51wJ0FDq/UVCefLopEcmK3ni4WIQztMjZdSYOsbHr9R2h7PvxBGAuglaN8+kXT6y
|
Loading…
Reference in a new issue