mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: added mMovies & fix oploverz
This commit is contained in:
parent
2d23f05fa0
commit
29c78d2468
10 changed files with 1079 additions and 2486 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 24
|
||||
version = 25
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
}
|
|
@ -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"
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue