2
1
Fork 1
mirror of https://github.com/yoyzo/arab synced 2024-08-15 03:15:00 +00:00

update providers (#3)

* added more extractors and fixed movizland

* update movizland fushaar mycima shahed4u
This commit is contained in:
Spoonge 2023-01-28 10:19:51 +01:00 committed by GitHub
parent 0d681a51ae
commit 458aac3df7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 651 additions and 91 deletions

View file

@ -1,4 +1,4 @@
version = 3
version = 4
cloudstream {
description = ""

View file

@ -7,5 +7,6 @@ import android.content.Context
class MyCimaPlugin: Plugin() {
override fun load(context: Context) {
registerMainAPI(MyCima())
registerExtractorAPI(MyVid())
}
}

View file

@ -0,0 +1,32 @@
package com.mycima
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.app
open class MyVid : ExtractorApi() {
override val name = "MyVid"
override val mainUrl = "https://myviid.com"
override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
val sources = mutableListOf<ExtractorLink>()
val text = app.get(url).document.select("body > script:nth-child(2)").html() ?: ""
val a = text.substringAfter("||||").substringBefore("'.split").split("|")
val link = "${a[7]}://${a[24]}.${a[6]}.${a[5]}/${a[83]}/v.${a[82]}"
if (link.isNotBlank()) {
sources.add(
ExtractorLink(
name = name,
source = name,
url = link,
isM3u8 = false,
quality = "${a[80]}".replace("p","").toInt() ?: Qualities.Unknown.value,
referer = "$mainUrl/"
)
)
}
return sources
}
}