mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Sendvid extractor (#365)
* fix fastream, tomatomatela, and added okrulink * forgot this * sendvid extractor * sendvid extractor * fixes
This commit is contained in:
parent
1117271a71
commit
df6c395acb
2 changed files with 29 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -265,6 +265,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||
OkRu(),
|
||||
OkRuHttps(),
|
||||
Okrulink(),
|
||||
Sendvid(),
|
||||
|
||||
// dood extractors
|
||||
DoodCxExtractor(),
|
||||
|
|
Loading…
Reference in a new issue