This commit is contained in:
hexated 2023-09-03 09:12:38 +07:00
parent 1affe156b1
commit 471a1703a3
14 changed files with 73 additions and 236 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 21
version = 22
cloudstream {

View file

@ -0,0 +1,45 @@
package com.hexated
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.*
open class Qiwi : ExtractorApi() {
override val name = "Qiwi"
override val mainUrl = "https://qiwi.gg"
override val requiresReferer = true
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val document = app.get(url, referer = referer).document
val title = document.select("title").text()
val source = document.select("video source").attr("src")
callback.invoke(
ExtractorLink(
this.name,
this.name,
source,
"$mainUrl/",
getIndexQuality(title),
headers = mapOf(
"Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5",
"Range" to "bytes=0-",
"Sec-Fetch-Dest" to "video",
"Sec-Fetch-Mode" to "no-cors",
)
)
)
}
private fun getIndexQuality(str: String): Int {
return Regex("(\\d{3,4})[pP]").find(str)?.groupValues?.getOrNull(1)?.toIntOrNull()
?: Qualities.Unknown.value
}
}

View file

@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.utils.*
import org.jsoup.nodes.Element
class OploverzProvider : MainAPI() {
override var mainUrl = "https://oploverz.team"
override var mainUrl = "https://oploverz.red"
override var name = "Oploverz"
override val hasMainPage = true
override var lang = "id"

View file

@ -10,5 +10,6 @@ class OploverzProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(OploverzProvider())
registerExtractorAPI(Qiwi())
}
}