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 = 6
version = 7
cloudstream {
description = ""

View file

@ -57,10 +57,6 @@ class VidHD : JWPlayer() {
override val name = "VidHD"
override val mainUrl = "https://vidhd.fun"
}
class GoStream : JWPlayer() {
override val name = "GoStream"
override val mainUrl = "https://gostream.pro"
}
class Vidbom : JWPlayer() {
override val name = "Vidbom"
override val mainUrl = "https://vidbom.com"

View file

@ -8,7 +8,7 @@ import org.jsoup.nodes.Element
class Shahid4u : MainAPI() {
override var lang = "ar"
override var mainUrl = "https://shahed4u.vip"
override var mainUrl = "https://shaheed4u.me/"
override var name = "Shahid4u"
override val usesWebView = false
override val hasMainPage = true

View file

@ -0,0 +1,33 @@
package com.shahid4u
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 GoStream : ExtractorApi() {
override val name = "GoStream"
override val mainUrl = "https://gostream.pro"
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("#player_code > script:nth-child(4)").html() ?: ""
val a = text.split("|")
val b = a[0].substring(a[0].lastIndexOf("http"))
val link = "$b://${a[5]}.${a[4]}-${a[3]}.${a[2]}:${a[11]}/d/${a[10]}/${a[9]}.${a[8]}"
if (link.isNotBlank()) {
sources.add(
ExtractorLink(
name = name,
source = name,
url = link,
isM3u8 = false,
quality = Qualities.Unknown.value,
referer = "$mainUrl/"
)
)
}
return sources
}
}

View file

@ -0,0 +1,46 @@
package com.shahid4u
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 VidHD : ExtractorApi() {
override val name = "VidHD"
override val mainUrl = "https://vidhd.fun"
override val requiresReferer = false
private fun String.getIntFromText(): Int? {
return Regex("""\d+""").find(this)?.groupValues?.firstOrNull()?.toIntOrNull()
}
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
val sources = mutableListOf<ExtractorLink>()
app.get(url).document.select("body > script:nth-child(2)").html().substringAfter("||||").let{ c->
val a = c.split("|")
val b = c.substringAfter("|image|").split("|")
val f = c.substringAfter("|label|").substringBefore("|file|")
val e = "${a[6]}://${a[21]}.e-${a[20]}-${a[19]}.${a[18]}/${b[1]}/v.$f"
val d = e.replace(b[1],b[3])
val links: MutableMap<String, Int?> = mutableMapOf(
e to b[0].getIntFromText(),
d to b[2].getIntFromText(),
)
links.forEach { (watchlink, quality) ->
if(watchlink.isNotBlank()){
sources.add(
ExtractorLink(
name = name,
source = name,
url = watchlink,
isM3u8 = false,
quality = quality ?: Qualities.Unknown.value,
referer = "$mainUrl/"
)
)
}
}
}
return sources
}
}