feat: add sonyliv, zee5 channels, TMLJioTV, SWJioTV, ZLZee5

fix: remove NPJioTV, IJioTV, SJioTV
This commit is contained in:
Deepak Patil 2022-12-16 00:43:05 +05:30
parent 8cd2bf8b2b
commit 9da95f516e
No known key found for this signature in database
GPG key ID: 72C2703D0D120C3D
3 changed files with 183 additions and 121 deletions

View file

@ -1,4 +1,4 @@
version = 1 version = 2
cloudstream { cloudstream {

View file

@ -9,41 +9,6 @@ import com.lagradost.cloudstream3.utils.Qualities
// //
object SoraJioTVExtractor: SoraJioTVProvider() { object SoraJioTVExtractor: SoraJioTVProvider() {
suspend fun invokeNP(
id: Int? = null,
callback: (ExtractorLink) -> Unit
){
val document = app.get("$NPJioTV/play.php?id=$id").document
val link = "$NPJioTV/${document.selectFirst("source")?.attr("src")}"
callback.invoke(
ExtractorLink(
this.name,
"NPJioTV",
link,
referer = "",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
}
suspend fun invokeS(
id: Int? = null,
callback: (ExtractorLink) -> Unit
){
val document = app.get("$SJioTV/play.php?id=$id").document
val link = "$SJioTV/${document.selectFirst("source")?.attr("src")}"
callback.invoke(
ExtractorLink(
this.name,
"SJioTV",
link,
referer = "",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
}
fun invokeGDL( fun invokeGDL(
id: String? = null, id: String? = null,
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
@ -61,23 +26,6 @@ object SoraJioTVExtractor: SoraJioTVProvider() {
) )
} }
fun invokeI(
id: String? = null,
callback: (ExtractorLink) -> Unit
){
val link = "$IJioTV/https://epic-austin.128-199-17-57.plesk.page/$id"
callback.invoke(
ExtractorLink(
this.name,
"IJioTV",
link,
referer = "",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
}
fun invokeFS( fun invokeFS(
id: String? = null, id: String? = null,
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
@ -158,4 +106,85 @@ object SoraJioTVExtractor: SoraJioTVProvider() {
) )
) )
} }
suspend fun invokeTML(
id: String? = null,
category: Int? = null,
callback: (ExtractorLink) -> Unit
) {
if (category == 30) {
val link = "$TMLJioTV/zee5/zeeapi.php?c=$id"
callback.invoke(
ExtractorLink(
this.name,
"TMLZee5",
link,
referer = "",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
} else if (category == 31) {
val document = app.get("$TMLJioTV/sonyliv/channels/$id").document
val link = document.select("source").attr("src")
callback.invoke(
ExtractorLink(
this.name,
"TMLSonyLiv",
link,
referer = "",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
} else {
val link = "$TMLJioTV/autoq.php?c=$id"
callback.invoke(
ExtractorLink(
this.name,
"TMLJioTV",
link,
referer = "",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
}
}
fun invokeSW(
id: String? = null,
callback: (ExtractorLink) -> Unit
) {
val link = "$SWJioTV/app/master.php?id=$id"
callback.invoke(
ExtractorLink(
this.name,
"SWJioTV",
link,
referer = "",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
}
fun invokeZL(
id: String? = null,
callback: (ExtractorLink) -> Unit
) {
val link = "$ZLZee5/api.php?c=$id"
callback.invoke(
ExtractorLink(
this.name,
"ZLZee5",
link,
referer = "",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
}
} }

View file

@ -4,16 +4,16 @@ import com.darkdemon.SoraJioTVExtractor.invokeBF
import com.darkdemon.SoraJioTVExtractor.invokeFH import com.darkdemon.SoraJioTVExtractor.invokeFH
import com.darkdemon.SoraJioTVExtractor.invokeFS import com.darkdemon.SoraJioTVExtractor.invokeFS
import com.darkdemon.SoraJioTVExtractor.invokeGDL import com.darkdemon.SoraJioTVExtractor.invokeGDL
import com.darkdemon.SoraJioTVExtractor.invokeI import com.darkdemon.SoraJioTVExtractor.invokeRPK
import com.darkdemon.SoraJioTVExtractor.invokeSW
import com.darkdemon.SoraJioTVExtractor.invokeTML
import com.darkdemon.SoraJioTVExtractor.invokeTS
import com.darkdemon.SoraJioTVExtractor.invokeZL
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.AppUtils.toJson
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.darkdemon.SoraJioTVExtractor.invokeNP
import com.darkdemon.SoraJioTVExtractor.invokeRPK
import com.darkdemon.SoraJioTVExtractor.invokeS
import com.darkdemon.SoraJioTVExtractor.invokeTS
open class SoraJioTVProvider : MainAPI() { // all providers must be an instance of MainAPI open class SoraJioTVProvider : MainAPI() { // all providers must be an instance of MainAPI
override var name = "SoraJioTV" override var name = "SoraJioTV"
@ -29,7 +29,7 @@ open class SoraJioTVProvider : MainAPI() { // all providers must be an instance
) )
data class Result( data class Result(
@JsonProperty("channel_id") var channelId: Int? = null, @JsonProperty("channel_id") var channelId: String? = null,
@JsonProperty("channel_order") var channelOrder: String? = null, @JsonProperty("channel_order") var channelOrder: String? = null,
@JsonProperty("channel_name") var channelName: String? = null, @JsonProperty("channel_name") var channelName: String? = null,
@JsonProperty("channelCategoryId") var channelCategoryId: Int? = null, @JsonProperty("channelCategoryId") var channelCategoryId: Int? = null,
@ -42,16 +42,16 @@ open class SoraJioTVProvider : MainAPI() { // all providers must be an instance
companion object { companion object {
private const val jsonUrl = private const val jsonUrl =
"https://raw.githubusercontent.com/daarkdemon/jiotvchannels/main/channels.json" "https://raw.githubusercontent.com/daarkdemon/jiotvchannels/test/channels.json"
const val NPJioTV = "https://nayeemparvez.chadasaniya.cf"
const val GDLJioTV = "https://tv.googledrivelinks.com" const val GDLJioTV = "https://tv.googledrivelinks.com"
const val IJioTV = "https://epic-austin.128-199-17-57.plesk.page"
const val SJioTV = "https://the-nayeemparvez.ml"
const val FSJioTV = "https://tv.freeseries.eu.org" const val FSJioTV = "https://tv.freeseries.eu.org"
const val BFJioTV = "https://jio.buttflix.best" const val BFJioTV = "https://jio.buttflix.best"
const val FHJioTV = "https://filmyhub.ga" const val FHJioTV = "https://filmyhub.ga"
const val TSJioTV = "https://tvstream.fun" const val TSJioTV = "https://tvstream.fun"
const val RPKJioTV = "http://ranapk-nxt.ml" const val RPKJioTV = "http://ranapk-nxt.ml"
const val TMLJioTV = "http://techmaxlive.ml"
const val SWJioTV = "https://spidyworld.ga"
const val ZLZee5 = "https://zeeliv.tk"
} }
override suspend fun getMainPage( override suspend fun getMainPage(
@ -59,6 +59,8 @@ open class SoraJioTVProvider : MainAPI() { // all providers must be an instance
request: MainPageRequest request: MainPageRequest
): HomePageResponse { ): HomePageResponse {
val categories = mapOf( val categories = mapOf(
"Zee5" to 30,
"Sonyliv" to 31,
"Sports" to 8, "Sports" to 8,
"Entertainment" to 5, "Entertainment" to 5,
"Movies" to 6, "Movies" to 6,
@ -80,10 +82,11 @@ open class SoraJioTVProvider : MainAPI() { // all providers must be an instance
val filtered = response.filter { it.channelCategoryId == cat.value } val filtered = response.filter { it.channelCategoryId == cat.value }
filtered.forEach { filtered.forEach {
val title = it.channelName.toString() val title = it.channelName.toString()
val posterUrl = "http://jiotv.catchup.cdn.jio.com/dare_images/images/${it.logoUrl}" val posterUrl =
if (it.logoUrl?.startsWith("https://") == true) it.logoUrl else "http://jiotv.catchup.cdn.jio.com/dare_images/images/${it.logoUrl}"
val quality = if (it.isHD == true) "HD" else "" val quality = if (it.isHD == true) "HD" else ""
results.add( results.add(
newMovieSearchResponse(title, title, TvType.Live) { newMovieSearchResponse(title, it.channelId.toString(), TvType.Live) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
this.quality = getQualityFromString(quality) this.quality = getQualityFromString(quality)
} }
@ -107,8 +110,9 @@ open class SoraJioTVProvider : MainAPI() { // all providers must be an instance
return searchResults.map { return searchResults.map {
val title = it.channelName.toString() val title = it.channelName.toString()
val posterUrl = "http://jiotv.catchup.cdn.jio.com/dare_images/images/${it.logoUrl}" val posterUrl =
newMovieSearchResponse(title, title, TvType.Live) { if (it.logoUrl?.startsWith("https://") == true) it.logoUrl else "http://jiotv.catchup.cdn.jio.com/dare_images/images/${it.logoUrl}"
newMovieSearchResponse(title, it.channelId.toString(), TvType.Live) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
} }
} }
@ -117,7 +121,7 @@ open class SoraJioTVProvider : MainAPI() { // all providers must be an instance
override suspend fun load(url: String): LoadResponse { override suspend fun load(url: String): LoadResponse {
val response = app.get(jsonUrl).parsed<Channels>().result val response = app.get(jsonUrl).parsed<Channels>().result
val searchResults = val searchResults =
response.filter { it.channelName?.contains(url.substringAfterLast("/")) == true } response.filter { it.channelId?.contains(url.substringAfterLast("/")) == true }
val title = searchResults[0].channelName.toString() val title = searchResults[0].channelName.toString()
val posterUrl = val posterUrl =
"http://jiotv.catchup.cdn.jio.com/dare_images/images/${searchResults[0].logoUrl}" "http://jiotv.catchup.cdn.jio.com/dare_images/images/${searchResults[0].logoUrl}"
@ -125,6 +129,7 @@ open class SoraJioTVProvider : MainAPI() { // all providers must be an instance
title, title, TvType.Live, Result( title, title, TvType.Live, Result(
channelId = searchResults[0].channelId, channelId = searchResults[0].channelId,
channelName = title, channelName = title,
channelCategoryId = searchResults[0].channelCategoryId,
logoUrl = searchResults[0].logoUrl logoUrl = searchResults[0].logoUrl
).toJson() ).toJson()
) { ) {
@ -140,63 +145,91 @@ open class SoraJioTVProvider : MainAPI() { // all providers must be an instance
): Boolean { ): Boolean {
val result = parseJson<Result>(data) val result = parseJson<Result>(data)
argamap( when (result.channelCategoryId) {
{ 30 -> {
invokeNP( argamap(
result.channelId, {
callback invokeZL(
result.channelId,
callback
)
},
{
invokeTML(
result.channelId,
result.channelCategoryId,
callback
)
}
) )
},
{ }
invokeS( 31 -> {
result.channelId, argamap(
callback {
invokeTML(
result.logoUrl?.substringBefore(".png"),
result.channelCategoryId,
callback
)
}
) )
},
{ }
invokeGDL( else -> {
result.logoUrl?.substringBefore(".png"), argamap(
callback {
) invokeGDL(
}, result.logoUrl?.substringBefore(".png"),
{ callback
invokeI( )
result.logoUrl?.substringBefore(".png"), },
callback {
) invokeFS(
}, result.logoUrl?.substringBefore(".png"),
{ callback
invokeFS( )
result.logoUrl?.substringBefore(".png"), },
callback {
) invokeFH(
}, result.logoUrl?.substringBefore(".png"),
{ callback
invokeFH( )
result.logoUrl?.substringBefore(".png"), },
callback {
) invokeTS(
}, result.logoUrl?.substringBefore(".png"),
{ callback
invokeTS( )
result.logoUrl?.substringBefore(".png"), },
callback {
) invokeRPK(
}, result.logoUrl?.substringBefore(".png"),
{ callback
invokeRPK( )
result.logoUrl?.substringBefore(".png"), },
callback {
) invokeBF(
}, result.logoUrl?.substringBefore(".png"),
{ callback
invokeBF( )
result.logoUrl?.substringBefore(".png"), },
callback {
invokeTML(
result.logoUrl?.substringBefore(".png"),
result.channelCategoryId,
callback
)
},
{
invokeSW(
result.logoUrl?.substringBefore(".png"),
callback
)
}
) )
} }
) }
return true return true
} }
} }