mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
sendvid extractor
This commit is contained in:
parent
0bd22f957c
commit
6b9e5b0211
2 changed files with 34 additions and 0 deletions
|
@ -0,0 +1,32 @@
|
|||
package com.lagradost.cloudstream3.extractors
|
||||
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.M3u8Helper.Companion.generateM3u8
|
||||
|
||||
class SendvidHttps: Sendvid() {
|
||||
override val mainUrl: String = "https://www.sendvid.com"
|
||||
}
|
||||
|
||||
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?): List<ExtractorLink>? {
|
||||
val doc = app.get(url).document
|
||||
val urlString = doc.select("head meta[property=og:video:secure_url]").attr("content")
|
||||
val sources = mutableListOf<ExtractorLink>()
|
||||
if (urlString.contains("m3u8")) {
|
||||
generateM3u8(
|
||||
name,
|
||||
urlString,
|
||||
mainUrl,
|
||||
headers = app.get(url).headers.toMap()
|
||||
).forEach { link ->
|
||||
sources.add(link)
|
||||
}
|
||||
}
|
||||
return sources
|
||||
}
|
||||
}
|
|
@ -265,6 +265,8 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||
OkRu(),
|
||||
OkRuHttps(),
|
||||
Okrulink(),
|
||||
Sendvid(),
|
||||
SendvidHttps(),
|
||||
|
||||
// dood extractors
|
||||
DoodCxExtractor(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue