mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Udate vidoExtractor to take in account Wiflix ! Optimized FrenchStream to take directly the redirected link
This commit is contained in:
parent
b61b1c1213
commit
2d2f71a24a
2 changed files with 32 additions and 17 deletions
|
@ -203,25 +203,30 @@ class FrenchStreamProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
movieServers
|
movieServers
|
||||||
}
|
}
|
||||||
val regeUpstream = Regex("""https:\\\/\\\/uptostream.com\\\/([^&]*)""")
|
|
||||||
val regeVido = Regex("""href\=\"https:\/\/vido\.lol\/(.*)\" target="_blank"><img""")
|
|
||||||
servers.apmap {
|
servers.apmap {
|
||||||
for (extractor in extractorApis) {
|
for (extractor in extractorApis) {
|
||||||
if (it.first.contains(extractor.name, ignoreCase = true)) {
|
var playerName = it.first
|
||||||
val playerName = it.first
|
|
||||||
var playerUrl = when (!playerName.isNullOrEmpty()) {
|
|
||||||
playerName.contains("Uqload"), playerName.contains("UQLOAD") -> it.second
|
|
||||||
playerName.contains("Uptostream"), playerName.contains("UPTOSTREAM") -> "https://uptostream.com/iframe/" + (regeUpstream.find(
|
|
||||||
app.get("https" + it.second.split("https").get(1)).text // need to do the extractor
|
|
||||||
)?.groupValues?.get(1)
|
|
||||||
?: "")
|
|
||||||
playerName.contains("ViDO"), playerName.contains("VIDO") -> "https://vido.lol/embed-" + (regeVido.find(
|
|
||||||
app.get("https" + it.second.split("https").get(1)).text
|
|
||||||
)?.groupValues?.get(1)) + ".html"
|
|
||||||
|
|
||||||
else -> ""
|
if (playerName.contains("Stream.B")) {
|
||||||
|
playerName = it.first.replace("Stream.B", "StreamSB")
|
||||||
|
}
|
||||||
|
if (playerName.contains(extractor.name, ignoreCase = true)) {
|
||||||
|
val header = app.get(
|
||||||
|
"https" + it.second.split("https").get(1),
|
||||||
|
allowRedirects = false
|
||||||
|
).headers
|
||||||
|
println(header)
|
||||||
|
val urlplayer = it.second
|
||||||
|
var playerUrl = when (!urlplayer.isNullOrEmpty()) {
|
||||||
|
urlplayer.contains("uqload") -> it.second
|
||||||
|
urlplayer.contains("opsktp.com") -> header.get("location")
|
||||||
|
.toString() // case where there is redirection to opsktp
|
||||||
|
|
||||||
|
else -> it.second
|
||||||
}
|
}
|
||||||
extractor.getSafeUrl(playerUrl, playerUrl, subtitleCallback, callback)
|
extractor.getSafeUrl(playerUrl, playerUrl, subtitleCallback, callback)
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,5 +307,3 @@ class FrenchStreamProvider : MainAPI() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,19 @@ class VidoExtractor : ExtractorApi() {
|
||||||
override val requiresReferer = true
|
override val requiresReferer = true
|
||||||
|
|
||||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||||
with(app.get(url)) {
|
val methode = if (url.contains("embed")) {
|
||||||
|
app.get(url) // french stream
|
||||||
|
} else {
|
||||||
|
val code = url.substringAfterLast("/")
|
||||||
|
val data = mapOf(
|
||||||
|
"op" to "embed",
|
||||||
|
"file_code" to code,
|
||||||
|
"&auto" to "1"
|
||||||
|
|
||||||
|
)
|
||||||
|
app.post("https://vido.lol/dl", referer = url, data = data) // wiflix
|
||||||
|
}
|
||||||
|
with(methode) {
|
||||||
getAndUnpack(this.text).let { unpackedText ->
|
getAndUnpack(this.text).let { unpackedText ->
|
||||||
//val quality = unpackedText.lowercase().substringAfter(" height=").substringBefore(" ").toIntOrNull()
|
//val quality = unpackedText.lowercase().substringAfter(" height=").substringBefore(" ").toIntOrNull()
|
||||||
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue