Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jackjohn committed Dec 8, 2023
1 parent a496f79 commit 8f28718
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 13 deletions.
40 changes: 37 additions & 3 deletions SoraStream/src/main/kotlin/com/hexated/Extractors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.lagradost.cloudstream3.apmap
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.base64Decode
import com.lagradost.cloudstream3.extractors.Pixeldrain
import com.lagradost.cloudstream3.extractors.Vidplay
import com.lagradost.cloudstream3.extractors.ZplayerV2
import com.lagradost.cloudstream3.utils.*
import java.math.BigInteger
Expand Down Expand Up @@ -309,6 +310,40 @@ open class Uploadever : ExtractorApi() {

}

open class Netembed : ExtractorApi() {
override var name: String = "Netembed"
override var mainUrl: String = "https://play.netembed.xyz"
override val requiresReferer = true

override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val response = app.get(url, referer = referer)
val script = getAndUnpack(response.text)
val m3u8 = Regex("((https:|http:)//.*\\.m3u8)").find(script)?.groupValues?.getOrNull(1)

callback.invoke(
ExtractorLink(
this.name,
this.name,
m3u8 ?: return,
"$mainUrl/",
getQuality(m3u8),
INFER_TYPE
)
)
}

private suspend fun getQuality(url: String) : Int {
val res = app.get(url, referer = "$mainUrl/").text
val regex = "#quality:\\s*(\\S+)".toRegex().find(res)?.groupValues?.get(1)
return getQualityFromName(regex)
}
}

class Streamwish : Filesim() {
override val name = "Streamwish"
override var mainUrl = "https://streamwish.to"
Expand Down Expand Up @@ -368,7 +403,6 @@ class Embedwish : Filesim() {
override var mainUrl = "https://embedwish.com"
}

class Netembed: ZplayerV2() {
override var name: String = "Netembed"
override var mainUrl: String = "https://play.netembed.xyz"
class Vidplay2 : Vidplay() {
override val mainUrl = "https://vidplay.online"
}
2 changes: 1 addition & 1 deletion SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,7 @@ object SoraExtractor : SoraStream() {
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
}

val data = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 128).bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
val data = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 512).bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
val json = tryParseJson<BlackvidResponses>(data)

json?.sources?.map { source ->
Expand Down
18 changes: 9 additions & 9 deletions SoraStream/src/main/kotlin/com/hexated/SoraStream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,15 @@ open class SoraStream : TmdbProvider() {
val res = parseJson<LinkData>(data)

argamap(
{
if (!res.isAnime) invokeBlackvid(
res.id,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
invokeDumpStream(
res.title,
Expand Down Expand Up @@ -672,15 +681,6 @@ open class SoraStream : TmdbProvider() {
callback
)
},
{
if (!res.isAnime) invokeBlackvid(
res.id,
res.season,
res.episode,
subtitleCallback,
callback
)
},
{
if (!res.isAnime) invokeShowflix(
res.title,
Expand Down
1 change: 1 addition & 0 deletions SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ class SoraStreamPlugin: Plugin() {
registerExtractorAPI(Wishfast())
registerExtractorAPI(Uploadever())
registerExtractorAPI(Netembed())
registerExtractorAPI(Vidplay2())
}
}

0 comments on commit 8f28718

Please sign in to comment.