Skip to content

Commit

Permalink
sora: added mMovies & fix oploverz
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jan 2, 2024
1 parent 2d23f05 commit 29c78d2
Show file tree
Hide file tree
Showing 10 changed files with 1,086 additions and 2,493 deletions.
2 changes: 1 addition & 1 deletion OploverzProvider/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// use an integer for version numbers
version = 24
version = 25


cloudstream {
Expand Down
35 changes: 35 additions & 0 deletions OploverzProvider/src/main/kotlin/com/hexated/Extractors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,39 @@ open class Qiwi : ExtractorApi() {
?: Qualities.Unknown.value
}

}

open class Mediafire : ExtractorApi() {
override val name = "Mediafire"
override val mainUrl = "https://www.mediafire.com"
override val requiresReferer = true

override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val res = app.get(url, referer = referer).document
val title = res.select("div.dl-btn-label").text()
val video = res.selectFirst("a#downloadButton")?.attr("href")

callback.invoke(
ExtractorLink(
this.name,
this.name,
video ?: return,
"",
getQuality(title),
INFER_TYPE
)
)

}

private fun getQuality(str: String?): Int {
return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull()
?: Qualities.Unknown.value
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import com.lagradost.cloudstream3.utils.*
import org.jsoup.nodes.Element

class OploverzProvider : MainAPI() {
override var mainUrl = "https://oploverz.red"
override var mainUrl = "https://oploverz.life"
override var name = "Oploverz"
override val hasMainPage = true
override var lang = "id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ class OploverzProviderPlugin: Plugin() {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(OploverzProvider())
registerExtractorAPI(Qiwi())
registerExtractorAPI(Mediafire())
}
}
2 changes: 1 addition & 1 deletion SoraStream/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties

// use an integer for version numbers
version = 211
version = 212

android {
defaultConfig {
Expand Down
8 changes: 1 addition & 7 deletions SoraStream/src/main/kotlin/com/hexated/Extractors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,7 @@ open class Netembed : ExtractorApi() {
val script = getAndUnpack(response.text)
val m3u8 = Regex("((https:|http:)//.*\\.m3u8)").find(script)?.groupValues?.getOrNull(1) ?: return

if (!m3u8.startsWith("https://www.febbox.com")) {
M3u8Helper.generateM3u8(
this.name,
m3u8,
"$mainUrl/",
).forEach(callback)
}
M3u8Helper.generateM3u8(this.name, m3u8, "$mainUrl/", ).forEach(callback)
}
}

Expand Down
Loading

0 comments on commit 29c78d2

Please sign in to comment.