From df6c395acb3a939636d2b818edc1ff8b9d109991 Mon Sep 17 00:00:00 2001 From: Stormunblessed <86633626+Stormunblessed@users.noreply.github.com> Date: Tue, 14 Feb 2023 09:11:20 -0600 Subject: [PATCH] Sendvid extractor (#365) * fix fastream, tomatomatela, and added okrulink * forgot this * sendvid extractor * sendvid extractor * fixes --- .../cloudstream3/extractors/Sendvid.kt | 28 +++++++++++++++++++ .../cloudstream3/utils/ExtractorApi.kt | 1 + 2 files changed, 29 insertions(+) create mode 100644 app/src/main/java/com/lagradost/cloudstream3/extractors/Sendvid.kt diff --git a/app/src/main/java/com/lagradost/cloudstream3/extractors/Sendvid.kt b/app/src/main/java/com/lagradost/cloudstream3/extractors/Sendvid.kt new file mode 100644 index 00000000..514b802d --- /dev/null +++ b/app/src/main/java/com/lagradost/cloudstream3/extractors/Sendvid.kt @@ -0,0 +1,28 @@ +package com.lagradost.cloudstream3.extractors + +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.utils.* +import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.utils.M3u8Helper.Companion.generateM3u8 + +open class Sendvid : ExtractorApi() { + override var name = "Sendvid" + override val mainUrl = "https://sendvid.com" + override val requiresReferer = false + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val doc = app.get(url).document + val urlString = doc.select("head meta[property=og:video:secure_url]").attr("content") + if (urlString.contains("m3u8")) { + generateM3u8( + name, + urlString, + mainUrl, + ).forEach(callback) + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/ExtractorApi.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/ExtractorApi.kt index 1ad3639b..b0dba9ff 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/ExtractorApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/ExtractorApi.kt @@ -265,6 +265,7 @@ val extractorApis: MutableList = arrayListOf( OkRu(), OkRuHttps(), Okrulink(), + Sendvid(), // dood extractors DoodCxExtractor(),