Created vtbe and EPlay Extractor (#1014)

This commit is contained in:
phisher98 2024-04-10 20:54:15 +05:30 committed by GitHub
parent ff0dea3fbb
commit 145ceea50f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 73 additions and 1 deletions

View file

@ -0,0 +1,28 @@
package com.lagradost.cloudstream3.extractors
import android.util.Log
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
open class EPlayExtractor : ExtractorApi() {
override var name = "EPlay"
override var mainUrl = "https://eplayvid.net"
override val requiresReferer = true
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val response = app.get(url).document
val trueUrl = response.select("source").attr("src")
return listOf(
ExtractorLink(
this.name,
this.name,
trueUrl,
mainUrl,
getQualityFromName(""), // this needs to be auto
false
)
)
}
}

View file

@ -0,0 +1,40 @@
package com.lagradost.cloudstream3.extractors
import android.util.Log
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.JsUnpacker
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.getQualityFromName
import java.net.URI
open class Vtbe : ExtractorApi() {
override var name = "Vtbe"
override var mainUrl = "https://vtbe.to"
override val requiresReferer = true
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val response = app.get(url,referer=mainUrl).document
val extractedpack =response.selectFirst("script:containsData(function(p,a,c,k,e,d))")?.data().toString()
JsUnpacker(extractedpack).unpack()?.let { unPacked ->
Regex("sources:\\[\\{file:\"(.*?)\"").find(unPacked)?.groupValues?.get(1)?.let { link ->
return listOf(
ExtractorLink(
this.name,
this.name,
link,
referer ?: "",
Qualities.Unknown.value,
URI(link).path.endsWith(".m3u8")
)
)
}
}
return null
}
}

View file

@ -217,6 +217,8 @@ import com.lagradost.cloudstream3.extractors.Zorofile
import com.lagradost.cloudstream3.extractors.Zplayer
import com.lagradost.cloudstream3.extractors.ZplayerV2
import com.lagradost.cloudstream3.extractors.Ztreamhub
import com.lagradost.cloudstream3.extractors.EPlayExtractor
import com.lagradost.cloudstream3.extractors.Vtbe
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
import kotlinx.coroutines.delay
@ -864,7 +866,9 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
Megacloud(),
VidhideExtractor(),
StreamWishExtractor(),
EmturbovidExtractor()
EmturbovidExtractor(),
Vtbe(),
EPlayExtractor()
)