forked from recloudstream/cloudstream
Unbruhed sflix.to and disabled 2embed
This commit is contained in:
parent
54a0913a8e
commit
d233c83601
5 changed files with 34 additions and 29 deletions
|
@ -354,6 +354,7 @@ class ZoroProvider : MainAPI() {
|
||||||
subtitleCallback,
|
subtitleCallback,
|
||||||
// Blacklist VidCloud for now
|
// Blacklist VidCloud for now
|
||||||
{ videoLink -> if (!videoLink.url.contains("betterstream")) callback(videoLink) },
|
{ videoLink -> if (!videoLink.url.contains("betterstream")) callback(videoLink) },
|
||||||
|
true,
|
||||||
extractorData
|
extractorData
|
||||||
) { sourceName ->
|
) { sourceName ->
|
||||||
sourceName + " - ${it.first}"
|
sourceName + " - ${it.first}"
|
||||||
|
|
|
@ -342,7 +342,7 @@ open class SflixProvider : MainAPI() {
|
||||||
val extractorData =
|
val extractorData =
|
||||||
"https://ws11.rabbitstream.net/socket.io/?EIO=4&transport=polling"
|
"https://ws11.rabbitstream.net/socket.io/?EIO=4&transport=polling"
|
||||||
|
|
||||||
extractRabbitStream(iframeLink, subtitleCallback, callback, extractorData) { it }
|
extractRabbitStream(iframeLink, subtitleCallback, callback, false) { it }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -607,7 +607,8 @@ open class SflixProvider : MainAPI() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
listOf(ExtractorLink(
|
listOf(
|
||||||
|
ExtractorLink(
|
||||||
caller.name,
|
caller.name,
|
||||||
caller.name,
|
caller.name,
|
||||||
file,
|
file,
|
||||||
|
@ -615,7 +616,8 @@ open class SflixProvider : MainAPI() {
|
||||||
getQualityFromName(this.label),
|
getQualityFromName(this.label),
|
||||||
false,
|
false,
|
||||||
extractorData = extractorData
|
extractorData = extractorData
|
||||||
))
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -633,9 +635,10 @@ open class SflixProvider : MainAPI() {
|
||||||
url: String,
|
url: String,
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
|
useSidAuthentication: Boolean,
|
||||||
/** Used for extractorLink name, input: Source name */
|
/** Used for extractorLink name, input: Source name */
|
||||||
extractorData: String,
|
extractorData: String? = null,
|
||||||
nameTransformer: (String) -> String
|
nameTransformer: (String) -> String,
|
||||||
) = suspendSafeApiCall {
|
) = suspendSafeApiCall {
|
||||||
// https://rapid-cloud.ru/embed-6/dcPOVRE57YOT?z= -> https://rapid-cloud.ru/embed-6
|
// https://rapid-cloud.ru/embed-6/dcPOVRE57YOT?z= -> https://rapid-cloud.ru/embed-6
|
||||||
val mainIframeUrl =
|
val mainIframeUrl =
|
||||||
|
@ -651,7 +654,7 @@ open class SflixProvider : MainAPI() {
|
||||||
Regex("""recaptchaNumber = '(.*?)'""").find(iframe.text)?.groupValues?.get(1)
|
Regex("""recaptchaNumber = '(.*?)'""").find(iframe.text)?.groupValues?.get(1)
|
||||||
|
|
||||||
var sid: String? = null
|
var sid: String? = null
|
||||||
|
if (useSidAuthentication && extractorData != null) {
|
||||||
negotiateNewSid(extractorData)?.also {
|
negotiateNewSid(extractorData)?.also {
|
||||||
app.post(
|
app.post(
|
||||||
"$extractorData&t=${generateTimeStamp()}&sid=${it.sid}",
|
"$extractorData&t=${generateTimeStamp()}&sid=${it.sid}",
|
||||||
|
@ -666,6 +669,7 @@ open class SflixProvider : MainAPI() {
|
||||||
sid = parseJson<PollingData>(text).sid
|
sid = parseJson<PollingData>(text).sid
|
||||||
ioSafe { app.get("$extractorData&t=${generateTimeStamp()}&sid=${it.sid}") }
|
ioSafe { app.get("$extractorData&t=${generateTimeStamp()}&sid=${it.sid}") }
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
val mapped = app.get(
|
val mapped = app.get(
|
||||||
"${
|
"${
|
||||||
|
@ -673,7 +677,7 @@ open class SflixProvider : MainAPI() {
|
||||||
"/embed",
|
"/embed",
|
||||||
"/ajax/embed"
|
"/ajax/embed"
|
||||||
)
|
)
|
||||||
}/getSources?id=$mainIframeId&_token=$iframeToken&_number=$number$&sId=${sid!!}",
|
}/getSources?id=$mainIframeId&_token=$iframeToken&_number=$number${sid?.let { "$&sId=$it" } ?: ""}",
|
||||||
referer = mainUrl,
|
referer = mainUrl,
|
||||||
headers = mapOf(
|
headers = mapOf(
|
||||||
"X-Requested-With" to "XMLHttpRequest",
|
"X-Requested-With" to "XMLHttpRequest",
|
||||||
|
|
|
@ -61,7 +61,7 @@ class TwoEmbedProvider : TmdbProvider() {
|
||||||
val mappedservers = parseJson<EmbedJson>(ajax)
|
val mappedservers = parseJson<EmbedJson>(ajax)
|
||||||
val iframeLink = mappedservers.link
|
val iframeLink = mappedservers.link
|
||||||
if (iframeLink.contains("rabbitstream")) {
|
if (iframeLink.contains("rabbitstream")) {
|
||||||
extractRabbitStream(iframeLink, subtitleCallback, callback, "https://ws10.rabbitstream.net/socket.io/?EIO=4&transport=polling") { it }
|
extractRabbitStream(iframeLink, subtitleCallback, callback, false) { it }
|
||||||
} else {
|
} else {
|
||||||
loadExtractor(iframeLink, embedUrl, callback)
|
loadExtractor(iframeLink, embedUrl, callback)
|
||||||
}
|
}
|
||||||
|
|
|
@ -379,7 +379,7 @@
|
||||||
"TwoEmbedProvider": {
|
"TwoEmbedProvider": {
|
||||||
"language": "en",
|
"language": "en",
|
||||||
"name": "2Embed",
|
"name": "2Embed",
|
||||||
"status": 1,
|
"status": 0,
|
||||||
"url": "https://www.2embed.ru"
|
"url": "https://www.2embed.ru"
|
||||||
},
|
},
|
||||||
"VMoveeProvider": {
|
"VMoveeProvider": {
|
||||||
|
|
|
@ -242,7 +242,7 @@
|
||||||
"TwoEmbedProvider": {
|
"TwoEmbedProvider": {
|
||||||
"name": "2Embed",
|
"name": "2Embed",
|
||||||
"url": "https://www.2embed.ru",
|
"url": "https://www.2embed.ru",
|
||||||
"status": 1
|
"status": 0
|
||||||
},
|
},
|
||||||
"VMoveeProvider": {
|
"VMoveeProvider": {
|
||||||
"name": "VMovee",
|
"name": "VMovee",
|
||||||
|
|
Loading…
Reference in a new issue