Skip to content
840 changes: 809 additions & 31 deletions library/api/jvm/library.api

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package com.lagradost.cloudstream3.extractors

import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

open class Acefile : ExtractorApi() {
override val name = "Acefile"
Expand All @@ -13,7 +16,7 @@ open class Acefile : ExtractorApi() {
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
callback: (ExtractorLink) -> Unit,
) {
val id = "/(?:d|download|player|f|file)/(\\w+)".toRegex().find(url)?.groupValues?.get(1)
val script = getAndUnpack(app.get("$mainUrl/player/${id ?: return}").text)
Expand All @@ -27,14 +30,14 @@ open class Acefile : ExtractorApi() {
newExtractorLink(
this.name,
this.name,
video ?: return
video ?: return,
)
)

}

@Serializable
data class Source(
val data: String? = null,
@JsonProperty("data") @SerialName("data") val data: String? = null,
)

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

open class Blogger : ExtractorApi() {
override val name = "Blogger"
Expand All @@ -22,10 +24,10 @@ open class Blogger : ExtractorApi() {
newExtractorLink(
name,
name,
it.play_url,
it.playUrl,
) {
this.referer = "https://www.youtube.com/"
this.quality = when (it.format_id) {
this.quality = when (it.formatId) {
18 -> 360
22 -> 720
else -> Qualities.Unknown.value
Expand All @@ -36,11 +38,13 @@ open class Blogger : ExtractorApi() {
}
}
}

return sources
}

@Serializable
private data class ResponseSource(
@JsonProperty("play_url") val play_url: String,
@JsonProperty("format_id") val format_id: Int
@JsonProperty("play_url") @SerialName("play_url") val playUrl: String,
@JsonProperty("format_id") @SerialName("format_id") val formatId: Int,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,32 @@ import dev.whyoleg.cryptography.DelicateCryptographyApi
import dev.whyoleg.cryptography.algorithms.AES
import io.ktor.http.Url
import io.ktor.http.decodeURLPart
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

class Bysezejataos : ByseSX() {
override var name = "Bysezejataos"
override var mainUrl = "https://bysezejataos.com"
override val name = "Bysezejataos"
override val mainUrl = "https://bysezejataos.com"
}

class ByseBuho : ByseSX() {
override var name = "ByseBuho"
override var mainUrl = "https://bysebuho.com"
override val name = "ByseBuho"
override val mainUrl = "https://bysebuho.com"
}

class ByseVepoin : ByseSX() {
override var name = "ByseVepoin"
override var mainUrl = "https://bysevepoin.com"
override val name = "ByseVepoin"
override val mainUrl = "https://bysevepoin.com"
}

class ByseQekaho : ByseSX() {
override var name = "ByseQekaho"
override var mainUrl = "https://byseqekaho.com"
override val name = "ByseQekaho"
override val mainUrl = "https://byseqekaho.com"
}

open class ByseSX : ExtractorApi() {
override var name = "Byse"
override var mainUrl = "https://byse.sx"
override val name = "Byse"
override val mainUrl = "https://byse.sx"
override val requiresReferer = true

private val aesGcm = CryptographyProvider.Default.get(AES.GCM)
Expand Down Expand Up @@ -112,7 +114,7 @@ open class ByseSX : ExtractorApi() {
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
callback: (ExtractorLink) -> Unit,
) {
val refererUrl = getBaseUrl(url)
val playbackRoot = getPlayback(url) ?: return
Expand All @@ -123,64 +125,58 @@ open class ByseSX : ExtractorApi() {
name,
streamUrl,
mainUrl,
headers = headers
headers = headers,
).forEach(callback)
}
}

@Serializable
data class DetailsRoot(
val id: Long,
val code: String,
val title: String,
@JsonProperty("poster_url")
val posterUrl: String,
val description: String,
@JsonProperty("created_at")
val createdAt: String,
@JsonProperty("owner_private")
val ownerPrivate: Boolean,
@JsonProperty("embed_frame_url")
val embedFrameUrl: String,
@JsonProperty("id") @SerialName("id") val id: Long,
@JsonProperty("code") @SerialName("code") val code: String,
@JsonProperty("title") @SerialName("title") val title: String,
@JsonProperty("poster_url") @SerialName("poster_url") val posterUrl: String,
@JsonProperty("description") @SerialName("description") val description: String,
@JsonProperty("created_at") @SerialName("created_at") val createdAt: String,
@JsonProperty("owner_private") @SerialName("owner_private") val ownerPrivate: Boolean,
@JsonProperty("embed_frame_url") @SerialName("embed_frame_url") val embedFrameUrl: String,
)

@Serializable
data class PlaybackRoot(
val playback: Playback,
@JsonProperty("playback") @SerialName("playback") val playback: Playback,
)

@Serializable
data class Playback(
val algorithm: String,
val iv: String,
val payload: String,
@JsonProperty("key_parts")
val keyParts: List<String>,
@JsonProperty("expires_at")
val expiresAt: String,
@JsonProperty("decrypt_keys")
val decryptKeys: DecryptKeys,
val iv2: String,
val payload2: String,
@JsonProperty("algorithm") @SerialName("algorithm") val algorithm: String,
@JsonProperty("iv") @SerialName("iv") val iv: String,
@JsonProperty("payload") @SerialName("payload") val payload: String,
@JsonProperty("key_parts") @SerialName("key_parts") val keyParts: List<String>,
@JsonProperty("expires_at") @SerialName("expires_at") val expiresAt: String,
@JsonProperty("decrypt_keys") @SerialName("decrypt_keys") val decryptKeys: DecryptKeys,
@JsonProperty("iv2") @SerialName("iv2") val iv2: String,
@JsonProperty("payload2") @SerialName("payload2") val payload2: String,
)

@Serializable
data class DecryptKeys(
@JsonProperty("edge_1")
val edge1: String,
@JsonProperty("edge_2")
val edge2: String,
@JsonProperty("legacy_fallback")
val legacyFallback: String,
@JsonProperty("edge_1") @SerialName("edge_1") val edge1: String,
@JsonProperty("edge_2") @SerialName("edge_2") val edge2: String,
@JsonProperty("legacy_fallback") @SerialName("legacy_fallback") val legacyFallback: String,
)

@Serializable
data class PlaybackDecrypt(
val sources: List<PlaybackDecryptSource>,
@JsonProperty("sources") @SerialName("sources") val sources: List<PlaybackDecryptSource>,
)

@Serializable
data class PlaybackDecryptSource(
val quality: String,
val label: String,
@JsonProperty("mime_type")
val mimeType: String,
val url: String,
@JsonProperty("bitrate_kbps")
val bitrateKbps: Long,
val height: Any?,
@JsonProperty("quality") @SerialName("quality") val quality: String,
@JsonProperty("label") @SerialName("label") val label: String,
@JsonProperty("mime_type") @SerialName("mime_type") val mimeType: String,
@JsonProperty("url") @SerialName("url") val url: String,
@JsonProperty("bitrate_kbps") @SerialName("bitrate_kbps") val bitrateKbps: Long,
@JsonProperty("height") @SerialName("height") val height: Int?,
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lagradost.cloudstream3.extractors

import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.USER_AGENT
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
Expand All @@ -8,6 +9,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.StringUtils.decodeUrl
import com.lagradost.cloudstream3.utils.newExtractorLink
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

open class Cda : ExtractorApi() {
override var mainUrl = "https://ebd.cda.pl"
Expand All @@ -22,7 +25,7 @@ open class Cda : ExtractorApi() {
"https://ebd.cda.pl/647x500/$mediaId", headers = mapOf(
"Referer" to "https://ebd.cda.pl/647x500/$mediaId",
"User-Agent" to USER_AGENT,
"Cookie" to "cda.player=html5"
"Cookie" to "cda.player=html5",
)
).document
val dataRaw = doc.selectFirst("[player_data]")?.attr("player_data") ?: return null
Expand Down Expand Up @@ -86,15 +89,17 @@ open class Cda : ExtractorApi() {
else -> a
}

@Serializable
data class VideoPlayerData(
val file: String,
val qualities: Map<String, String> = mapOf(),
val quality: String?,
val ts: Int?,
val hash2: String?
@JsonProperty("file") @SerialName("file") val file: String,
@JsonProperty("qualities") @SerialName("qualities") val qualities: Map<String, String> = mapOf(),
@JsonProperty("quality") @SerialName("quality") val quality: String?,
@JsonProperty("ts") @SerialName("ts") val ts: Int?,
@JsonProperty("hash2") @SerialName("hash2") val hash2: String?,
)

@Serializable
data class PlayerData(
val video: VideoPlayerData
@JsonProperty("video") @SerialName("video") val video: VideoPlayerData,
)
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.lagradost.cloudstream3.extractors

import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.Prerelease
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.app
Expand All @@ -10,31 +11,29 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

class Firestream : ExtractorApi() {
override val name: String = "Firestream"
override val mainUrl: String = "https://firestream.to"
override val requiresReferer: Boolean = false
override val name = "Firestream"
override val mainUrl = "https://firestream.to"
override val requiresReferer = false

override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
callback: (ExtractorLink) -> Unit,
) {
val id = url.removeSuffix("/").substringAfterLast("/")
val url = getExtractorUrl(id)

val doc = app.get(url).document
val token = doc.selectFirst("script[id=token-blob]")!!.data()

val videoResponse =
app.post("$mainUrl/api/videos/$id/resolve", json = mapOf("blob" to token))
.parsed<VideoResponse>()
val videoResponse = app.post("$mainUrl/api/videos/$id/resolve", json = mapOf("blob" to token))
.parsed<VideoResponse>()

callback.invoke(
newExtractorLink(
source = name,
name = name,
url = videoResponse.signedVideoUrl
url = videoResponse.signedVideoUrl,
)
)
}
Expand All @@ -45,7 +44,6 @@ class Firestream : ExtractorApi() {

@Serializable
private data class VideoResponse(
@SerialName("signedVideoUrl")
val signedVideoUrl: String,
@JsonProperty("signedVideoUrl") @SerialName("signedVideoUrl") val signedVideoUrl: String,
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

open class Flyfile : ExtractorApi() {
override val name: String = "FlyFile"
override val mainUrl: String = "https://flyfile.app"
override val name = "FlyFile"
override val mainUrl = "https://flyfile.app"
override val requiresReferer = false
open val apiUrl: String = "https://api.flyfile.app"
override val requiresReferer: Boolean = false

override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
callback: (ExtractorLink) -> Unit,
) {
val videoId = url.substringAfterLast("/")
val videoInfo = app.get("$apiUrl/api/streaming/assign/$videoId")
Expand All @@ -32,16 +32,14 @@ open class Flyfile : ExtractorApi() {
source = name,
name = name,
url = streamUrl,
type = ExtractorLinkType.M3U8
type = ExtractorLinkType.M3U8,
)
)
}

@Serializable
private data class StreamInfo(
@SerialName("url")
val url: String,
@SerialName("token")
val token: String
@SerialName("url") val url: String,
@SerialName("token") val token: String,
)
}
}
Loading