feat: add secvideo (fsst, dsst, csst) extractor (#1654)

This commit is contained in:
Bnyro
2025-04-10 19:48:56 +02:00
committed by GitHub
parent 6fd5548f8a
commit e0f2299d1d
2 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,79 @@
package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.ExtractorLinkType
import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.newExtractorLink
open class SecvideoOnline : ExtractorApi() {
override val name: String = "Secvideo1"
override val mainUrl: String = "https://secvideo1.online"
override val requiresReferer: Boolean = false
private val fileListRegex = Regex("""file:\s*"(.*)\"""")
private val subtitleListRegex = Regex("""subtitle:\s*"(.*)\"""")
private val labelSourceRegex = Regex("""\[(.*?)\](.*)""")
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val doc = app.get(url, referer = referer).document
for (script in doc.select("script")) {
val files = fileListRegex.findAll(script.data())
.mapNotNull { it.groupValues.getOrNull(1)?.split(",") }
.flatten()
.distinct()
for (file in files) {
val labelAndSourceMatch = labelSourceRegex.find(file) ?: continue
callback.invoke(
newExtractorLink(
source = name,
name = name,
url = labelAndSourceMatch.groupValues[2]
) {
quality = labelAndSourceMatch.groupValues[1].replace("p", "").toIntOrNull()
?: Qualities.Unknown.value
this.type = ExtractorLinkType.VIDEO
}
)
}
val subtitles = subtitleListRegex.findAll(script.data())
.mapNotNull { it.groupValues.getOrNull(1)?.split(",") }
.flatten()
.distinct()
for (subtitle in subtitles) {
val languageAndSourceMatch = labelSourceRegex.find(subtitle) ?: continue
subtitleCallback.invoke(
SubtitleFile(
lang = languageAndSourceMatch.groupValues[1],
url = languageAndSourceMatch.groupValues[2]
)
)
}
}
}
}
class FsstOnline : SecvideoOnline() {
override val name: String = "FsstOnline"
override val mainUrl: String = "https://fsst.online"
}
class CsstOnline : SecvideoOnline() {
override val name: String = "CsstOnline"
override val mainUrl: String = "https://csst.online"
}
class DsstOnline : SecvideoOnline() {
override val name: String = "DsstOnline"
override val mainUrl: String = "https://dsst.online"
}

View File

@ -31,6 +31,7 @@ import com.lagradost.cloudstream3.extractors.Chillx
import com.lagradost.cloudstream3.extractors.CineGrabber
import com.lagradost.cloudstream3.extractors.Cinestart
import com.lagradost.cloudstream3.extractors.ContentX
import com.lagradost.cloudstream3.extractors.CsstOnline
import com.lagradost.cloudstream3.extractors.D0000d
import com.lagradost.cloudstream3.extractors.D000dCom
import com.lagradost.cloudstream3.extractors.DBfilm
@ -58,6 +59,7 @@ import com.lagradost.cloudstream3.extractors.DoodstreamCom
import com.lagradost.cloudstream3.extractors.Dooood
import com.lagradost.cloudstream3.extractors.Ds2play
import com.lagradost.cloudstream3.extractors.Ds2video
import com.lagradost.cloudstream3.extractors.DsstOnline
import com.lagradost.cloudstream3.extractors.Dwish
import com.lagradost.cloudstream3.extractors.EPlayExtractor
import com.lagradost.cloudstream3.extractors.Embedgram
@ -80,6 +82,7 @@ import com.lagradost.cloudstream3.extractors.FourCX
import com.lagradost.cloudstream3.extractors.FourPichive
import com.lagradost.cloudstream3.extractors.FourPlayRu
import com.lagradost.cloudstream3.extractors.Fplayer
import com.lagradost.cloudstream3.extractors.FsstOnline
import com.lagradost.cloudstream3.extractors.GDMirrorbot
import com.lagradost.cloudstream3.extractors.GMPlayer
import com.lagradost.cloudstream3.extractors.GamoVideo
@ -179,6 +182,7 @@ import com.lagradost.cloudstream3.extractors.Sbrapid
import com.lagradost.cloudstream3.extractors.Sbsonic
import com.lagradost.cloudstream3.extractors.Sbspeed
import com.lagradost.cloudstream3.extractors.Sbthe
import com.lagradost.cloudstream3.extractors.SecvideoOnline
import com.lagradost.cloudstream3.extractors.Sendvid
import com.lagradost.cloudstream3.extractors.SfastwishCom
import com.lagradost.cloudstream3.extractors.ShaveTape
@ -1167,6 +1171,10 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
Vidguardto1(),
Vidguardto2(),
Vidguardto3(),
SecvideoOnline(),
FsstOnline(),
CsstOnline(),
DsstOnline(),
Simpulumlamerop(),
Urochsunloath(),
NathanFromSubject(),