Removed YallaShoots because its such a mess

if i find a better one, ill add it
This commit is contained in:
Zaw 2022-08-20 17:39:00 +03:00
parent 4fc1edfa5f
commit cea1771b42
4 changed files with 0 additions and 110 deletions

View file

@ -1,12 +0,0 @@
version = 1
cloudstream {
description = ""
authors = listOf( "ImZaw" )
status = 1
tvTypes = listOf( "Live" )
iconUrl = "https://www.google.com/s2/favicons?domain=www.yalla-shoots.com&sz=%size%"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.yallashoots"/>

View file

@ -1,11 +0,0 @@
package com.yallashoots
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class YallaShootsPlugin: Plugin() {
override fun load(context: Context) {
registerMainAPI(YallaShoots())
}
}

View file

@ -1,85 +0,0 @@
package com.yallashoots
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
class YallaShoots : MainAPI() {
override var mainUrl = "https://www.yalla-shoots.com"
override var name = "Yalla Shoots"
override var lang = "ar"
override val hasDownloadSupport = false
override val hasMainPage = true
override val supportedTypes = setOf(
TvType.Live
)
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
val dataMap = mapOf(
"Matches Today" to mainUrl,
)
return HomePageResponse(dataMap.apmap { (title, data) ->
val document = app.get(data).document
val shows = document.select("div.albaflex > div.live").mapNotNull {
if(it.select("a").attr("href") === "$mainUrl/#/") return@mapNotNull null
val linkElement = it.select("a")
LiveSearchResponse(
linkElement.attr("title")+"( ${it.select("div#result").text()} )",
linkElement.attr("href"),
this@YallaShoots.name,
TvType.Live,
"https://img.zr5.repl.co/vs?title=${linkElement.attr("title")}&leftUrl=${it.select("div.left-team img").attr("data-src")}&rightUrl=${it.select("div.right-team img").attr("data-src")}",
lang = "ar"
)
}
HomePageList(
title,
shows.ifEmpty {
arrayListOf(LiveSearchResponse(
"لا يوجد اي مباراة حاليا",
mainUrl,
this@YallaShoots.name,
TvType.Live,
"https://img.zr5.repl.co/vs",
lang = "ar"
))
},
isHorizontalImages = true
)
})
}
override suspend fun load(url: String): LoadResponse {
val doc = app.get(url).document
val title = doc.select("h1").text()
val poster = fixUrl(doc.select("img.img-responsive").attr("src"))
return LiveStreamLoadResponse(
title,
url,
this.name,
doc.select("iframe[loading=\"lazy\"]").attr("src"),
poster,
)
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val doc = app.get("$data?serv=2").document
val sourceLink = doc.select("body > div.albaplayer_server-body > div.video-con.embed-responsive > script:nth-child(5)").html().replace(".*hls: \"|\"\\};.*".toRegex(),"")
callback.invoke(
ExtractorLink(
this.name,
this.name,
sourceLink,
mainUrl,
Qualities.Unknown.value,
isM3u8 = true
)
)
return true
}
}