mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Oploverz: Updated source
This commit is contained in:
parent
d1b117540f
commit
c82488fcbc
3 changed files with 20 additions and 46 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 7
|
||||
version = 8
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -25,7 +25,7 @@ class OploverzProvider : MainAPI() {
|
|||
|
||||
companion object {
|
||||
const val acefile = "https://acefile.co"
|
||||
const val linkbox = "https://www.linkbox.to"
|
||||
const val linkbox = "https://lbx.to"
|
||||
|
||||
fun getType(t: String): TvType {
|
||||
return when {
|
||||
|
@ -185,27 +185,6 @@ class OploverzProvider : MainAPI() {
|
|||
|
||||
}
|
||||
|
||||
private suspend fun invokeLinkbox(
|
||||
url: String,
|
||||
referer: String,
|
||||
quality: String? = null,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val id = Regex("""(/file/|id=)(\S+)""").find(url)?.groupValues?.get(2)
|
||||
app.get("$linkbox/api/open/get_url?itemId=$id", referer = url)
|
||||
.parsedSafe<Responses>()?.data?.rList?.map { link ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
"Linkbox",
|
||||
"Linkbox",
|
||||
link.url,
|
||||
referer,
|
||||
getQualityFromName(quality),
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
|
@ -228,9 +207,6 @@ class OploverzProvider : MainAPI() {
|
|||
if (downloadSources?.isNotEmpty() == true) sources.addAll(downloadSources)
|
||||
|
||||
sources.apmap { (quality, source) ->
|
||||
if(source.startsWith(linkbox)) {
|
||||
invokeLinkbox(source, data, quality, callback)
|
||||
} else {
|
||||
loadExtractor(fixedIframe(source), data, subtitleCallback) { link ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
|
@ -246,18 +222,16 @@ class OploverzProvider : MainAPI() {
|
|||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
private fun fixedIframe(url: String): String {
|
||||
return if (url.startsWith(acefile)) {
|
||||
Regex("""/f/(\S+)/|/file/(\S+)/""").find(url)?.groupValues?.getOrNull(1).let { id ->
|
||||
"$acefile/player/$id"
|
||||
}
|
||||
} else {
|
||||
url
|
||||
val id = Regex("""/f/(\S+)/|/file/(\S+)/""").find(url)?.groupValues?.getOrNull(1)
|
||||
return when {
|
||||
url.startsWith(acefile) -> "$acefile/player/$id"
|
||||
url.startsWith(linkbox) -> "https://www.linkbox.to/a/f/$id"
|
||||
else -> url
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2628,7 +2628,7 @@ class Sblongvu : StreamSB() {
|
|||
}
|
||||
|
||||
class Keephealth : StreamSB() {
|
||||
override var name = "Kimcartoon"
|
||||
override var name = "Keephealth"
|
||||
override var mainUrl = "https://keephealth.info"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue