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,
|
||||
// Blacklist VidCloud for now
|
||||
{ videoLink -> if (!videoLink.url.contains("betterstream")) callback(videoLink) },
|
||||
true,
|
||||
extractorData
|
||||
) { sourceName ->
|
||||
sourceName + " - ${it.first}"
|
||||
|
|
|
@ -342,7 +342,7 @@ open class SflixProvider : MainAPI() {
|
|||
val extractorData =
|
||||
"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 {
|
||||
listOf(ExtractorLink(
|
||||
listOf(
|
||||
ExtractorLink(
|
||||
caller.name,
|
||||
caller.name,
|
||||
file,
|
||||
|
@ -615,7 +616,8 @@ open class SflixProvider : MainAPI() {
|
|||
getQualityFromName(this.label),
|
||||
false,
|
||||
extractorData = extractorData
|
||||
))
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -633,9 +635,10 @@ open class SflixProvider : MainAPI() {
|
|||
url: String,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
useSidAuthentication: Boolean,
|
||||
/** Used for extractorLink name, input: Source name */
|
||||
extractorData: String,
|
||||
nameTransformer: (String) -> String
|
||||
extractorData: String? = null,
|
||||
nameTransformer: (String) -> String,
|
||||
) = suspendSafeApiCall {
|
||||
// https://rapid-cloud.ru/embed-6/dcPOVRE57YOT?z= -> https://rapid-cloud.ru/embed-6
|
||||
val mainIframeUrl =
|
||||
|
@ -651,7 +654,7 @@ open class SflixProvider : MainAPI() {
|
|||
Regex("""recaptchaNumber = '(.*?)'""").find(iframe.text)?.groupValues?.get(1)
|
||||
|
||||
var sid: String? = null
|
||||
|
||||
if (useSidAuthentication && extractorData != null) {
|
||||
negotiateNewSid(extractorData)?.also {
|
||||
app.post(
|
||||
"$extractorData&t=${generateTimeStamp()}&sid=${it.sid}",
|
||||
|
@ -666,6 +669,7 @@ open class SflixProvider : MainAPI() {
|
|||
sid = parseJson<PollingData>(text).sid
|
||||
ioSafe { app.get("$extractorData&t=${generateTimeStamp()}&sid=${it.sid}") }
|
||||
}
|
||||
}
|
||||
|
||||
val mapped = app.get(
|
||||
"${
|
||||
|
@ -673,7 +677,7 @@ open class SflixProvider : MainAPI() {
|
|||
"/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,
|
||||
headers = mapOf(
|
||||
"X-Requested-With" to "XMLHttpRequest",
|
||||
|
|
|
@ -61,7 +61,7 @@ class TwoEmbedProvider : TmdbProvider() {
|
|||
val mappedservers = parseJson<EmbedJson>(ajax)
|
||||
val iframeLink = mappedservers.link
|
||||
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 {
|
||||
loadExtractor(iframeLink, embedUrl, callback)
|
||||
}
|
||||
|
|
|
@ -379,7 +379,7 @@
|
|||
"TwoEmbedProvider": {
|
||||
"language": "en",
|
||||
"name": "2Embed",
|
||||
"status": 1,
|
||||
"status": 0,
|
||||
"url": "https://www.2embed.ru"
|
||||
},
|
||||
"VMoveeProvider": {
|
||||
|
|
|
@ -242,7 +242,7 @@
|
|||
"TwoEmbedProvider": {
|
||||
"name": "2Embed",
|
||||
"url": "https://www.2embed.ru",
|
||||
"status": 1
|
||||
"status": 0
|
||||
},
|
||||
"VMoveeProvider": {
|
||||
"name": "VMovee",
|
||||
|
|
Loading…
Reference in a new issue