feat: added emturbovid extractor (#893)

Co-authored-by: coxju <coxju>
This commit is contained in:
coxju 2024-01-18 03:58:17 +05:30 committed by GitHub
parent 1676094488
commit 5dfc08aabb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 42 additions and 1 deletions

View file

@ -0,0 +1,39 @@
package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
open class EmturbovidExtractor : ExtractorApi() {
override var name = "Emturbovid"
override var mainUrl = "https://emturbovid.com"
override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val response = app.get(
url, referer = referer ?: "$mainUrl/"
)
val playerScript =
response.document.selectXpath("//script[contains(text(),'var urlPlay')]")
.html()
val sources = mutableListOf<ExtractorLink>()
if (playerScript.isNotBlank()) {
val m3u8Url =
playerScript.substringAfter("var urlPlay = '").substringBefore("'")
sources.add(
ExtractorLink(
source = name,
name = name,
url = m3u8Url,
referer = "$mainUrl/",
quality = Qualities.Unknown.value,
isM3u8 = true
)
)
}
return sources
}
}

View file

@ -103,6 +103,7 @@ import com.lagradost.cloudstream3.extractors.Odnoklassniki
import com.lagradost.cloudstream3.extractors.TauVideo import com.lagradost.cloudstream3.extractors.TauVideo
import com.lagradost.cloudstream3.extractors.SibNet import com.lagradost.cloudstream3.extractors.SibNet
import com.lagradost.cloudstream3.extractors.ContentX import com.lagradost.cloudstream3.extractors.ContentX
import com.lagradost.cloudstream3.extractors.EmturbovidExtractor
import com.lagradost.cloudstream3.extractors.Hotlinger import com.lagradost.cloudstream3.extractors.Hotlinger
import com.lagradost.cloudstream3.extractors.FourCX import com.lagradost.cloudstream3.extractors.FourCX
import com.lagradost.cloudstream3.extractors.HDMomPlayer import com.lagradost.cloudstream3.extractors.HDMomPlayer
@ -856,7 +857,8 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
Dokicloud(), Dokicloud(),
Megacloud(), Megacloud(),
VidhideExtractor(), VidhideExtractor(),
StreamWishExtractor() StreamWishExtractor(),
EmturbovidExtractor()
) )