File tree Expand file tree Collapse file tree
library/src/commonMain/kotlin/com/lagradost/cloudstream3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package com.lagradost.cloudstream3.extractors
2+
3+ import com.lagradost.cloudstream3.Prerelease
4+ import com.lagradost.cloudstream3.SubtitleFile
5+ import com.lagradost.cloudstream3.app
6+ import com.lagradost.cloudstream3.utils.ExtractorApi
7+ import com.lagradost.cloudstream3.utils.ExtractorLink
8+ import com.lagradost.cloudstream3.utils.ExtractorLinkType
9+ import com.lagradost.cloudstream3.utils.newExtractorLink
10+ import kotlinx.serialization.SerialName
11+ import kotlinx.serialization.Serializable
12+
13+ @Prerelease
14+ open class Flyfile : ExtractorApi () {
15+ override val name: String = " FlyFile"
16+ override val mainUrl: String = " https://flyfile.app"
17+ open val apiUrl: String = " https://api.flyfile.app"
18+ override val requiresReferer: Boolean = false
19+
20+ override suspend fun getUrl (
21+ url : String ,
22+ referer : String? ,
23+ subtitleCallback : (SubtitleFile ) -> Unit ,
24+ callback : (ExtractorLink ) -> Unit
25+ ) {
26+ val videoId = url.substringAfterLast(" /" )
27+ val videoInfo = app.get(" $apiUrl /api/streaming/assign/$videoId " )
28+ .parsed<StreamInfo >()
29+
30+ val streamUrl = " ${videoInfo.url} /hls/${videoInfo.token} /master.m3u8"
31+ callback.invoke(
32+ newExtractorLink(
33+ source = name,
34+ name = name,
35+ url = streamUrl,
36+ type = ExtractorLinkType .M3U8
37+ )
38+ )
39+ }
40+
41+ @Serializable
42+ private data class StreamInfo (
43+ @SerialName(" url" )
44+ val url : String ,
45+ @SerialName(" token" )
46+ val token : String
47+ )
48+ }
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ import com.lagradost.cloudstream3.extractors.FilemoonV2
8181import com.lagradost.cloudstream3.extractors.Filesim
8282import com.lagradost.cloudstream3.extractors.Multimoviesshg
8383import com.lagradost.cloudstream3.extractors.FlaswishCom
84+ import com.lagradost.cloudstream3.extractors.Flyfile
8485import com.lagradost.cloudstream3.extractors.FourCX
8586import com.lagradost.cloudstream3.extractors.FourPichive
8687import com.lagradost.cloudstream3.extractors.FourPlayRu
@@ -1298,6 +1299,7 @@ val extractorApis: AtomicMutableList<ExtractorApi> = atomicListOf(
12981299 GUpload (),
12991300 HlsWish (),
13001301 ByseQekaho (),
1302+ Flyfile ()
13011303)
13021304
13031305
You can’t perform that action at this time.
0 commit comments