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
 | 
			
		||||
    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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue