mirror of
https://github.com/recloudstream/cloudstream.git
synced 2025-05-18 03:36:19 +08:00
feat(Extensions): newExtractorLink for developers (#1632)
* feat(Extensions): newExtractorLink for developers * remove isM3u8 and use type
This commit is contained in:
@ -352,7 +352,7 @@ class DownloadFragment : Fragment() {
|
|||||||
LinkGenerator(
|
LinkGenerator(
|
||||||
listOf(BasicLink(url)),
|
listOf(BasicLink(url)),
|
||||||
extract = true,
|
extract = true,
|
||||||
referer = referer,
|
refererUrl = referer,
|
||||||
isM3u8 = binding.hlsSwitch.isChecked
|
isM3u8 = binding.hlsSwitch.isChecked
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
|||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.unshortenLinkSafe
|
import com.lagradost.cloudstream3.utils.unshortenLinkSafe
|
||||||
|
|
||||||
data class ExtractorUri(
|
data class ExtractorUri(
|
||||||
@ -36,7 +37,7 @@ data class BasicLink(
|
|||||||
class LinkGenerator(
|
class LinkGenerator(
|
||||||
private val links: List<BasicLink>,
|
private val links: List<BasicLink>,
|
||||||
private val extract: Boolean = true,
|
private val extract: Boolean = true,
|
||||||
private val referer: String? = null,
|
private val refererUrl: String? = null,
|
||||||
private val isM3u8: Boolean? = null
|
private val isM3u8: Boolean? = null
|
||||||
) : IGenerator {
|
) : IGenerator {
|
||||||
override val hasCache = false
|
override val hasCache = false
|
||||||
@ -77,7 +78,7 @@ class LinkGenerator(
|
|||||||
isCasting: Boolean
|
isCasting: Boolean
|
||||||
): Boolean {
|
): Boolean {
|
||||||
links.amap { link ->
|
links.amap { link ->
|
||||||
if (!extract || !loadExtractor(link.url, referer, {
|
if (!extract || !loadExtractor(link.url, refererUrl, {
|
||||||
subtitleCallback(PlayerSubtitleHelper.getSubtitleData(it))
|
subtitleCallback(PlayerSubtitleHelper.getSubtitleData(it))
|
||||||
}) {
|
}) {
|
||||||
callback(it to null)
|
callback(it to null)
|
||||||
@ -85,14 +86,15 @@ class LinkGenerator(
|
|||||||
|
|
||||||
// if don't extract or if no extractor found simply return the link
|
// if don't extract or if no extractor found simply return the link
|
||||||
callback(
|
callback(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
"",
|
"",
|
||||||
link.name ?: link.url,
|
link.name ?: link.url,
|
||||||
unshortenLinkSafe(link.url), // unshorten because it might be a raw link
|
unshortenLinkSafe(link.url), // unshorten because it might be a raw link
|
||||||
referer ?: "",
|
|
||||||
Qualities.Unknown.value,
|
|
||||||
type = INFER_TYPE,
|
type = INFER_TYPE,
|
||||||
) to null
|
) {
|
||||||
|
this.referer = refererUrl ?: ""
|
||||||
|
this.quality = Qualities.Unknown.value
|
||||||
|
} to null
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2486,15 +2486,16 @@ class ResultViewModel2 : ViewModel() {
|
|||||||
{ links.add(it) }) && trailerData.raw
|
{ links.add(it) }) && trailerData.raw
|
||||||
) {
|
) {
|
||||||
arrayListOf(
|
arrayListOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
"",
|
"",
|
||||||
"Trailer",
|
"Trailer",
|
||||||
trailerData.extractorUrl,
|
trailerData.extractorUrl,
|
||||||
trailerData.referer ?: "",
|
|
||||||
Qualities.Unknown.value,
|
|
||||||
headers = trailerData.headers,
|
|
||||||
type = INFER_TYPE
|
type = INFER_TYPE
|
||||||
)
|
) {
|
||||||
|
this.referer = trailerData.referer ?: ""
|
||||||
|
this.quality = Qualities.Unknown.value
|
||||||
|
this.headers = trailerData.headers
|
||||||
|
}
|
||||||
) to arrayListOf()
|
) to arrayListOf()
|
||||||
} else {
|
} else {
|
||||||
links to subs
|
links to subs
|
||||||
|
@ -4,7 +4,9 @@ import com.lagradost.api.Log
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class AStreamHub : ExtractorApi() {
|
open class AStreamHub : ExtractorApi() {
|
||||||
override val name = "AStreamHub"
|
override val name = "AStreamHub"
|
||||||
@ -22,14 +24,15 @@ open class AStreamHub : ExtractorApi() {
|
|||||||
Log.i("Dev", "m3link => $m3link")
|
Log.i("Dev", "m3link => $m3link")
|
||||||
if (m3link.isNotBlank()) {
|
if (m3link.isNotBlank()) {
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name = name,
|
name = name,
|
||||||
source = name,
|
source = name,
|
||||||
url = m3link,
|
url = m3link,
|
||||||
isM3u8 = true,
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
referer = referer ?: url
|
this.quality = Qualities.Unknown.value
|
||||||
)
|
this.referer = referer ?: url
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,10 @@ open class Acefile : ExtractorApi() {
|
|||||||
val video = app.get(serverUrl ?: return, referer = "$mainUrl/").parsedSafe<Source>()?.data
|
val video = app.get(serverUrl ?: return, referer = "$mainUrl/").parsedSafe<Source>()?.data
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
video ?: return,
|
video ?: return
|
||||||
"",
|
|
||||||
Qualities.Unknown.value,
|
|
||||||
INFER_TYPE
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
open class AsianLoad : ExtractorApi() {
|
open class AsianLoad : ExtractorApi() {
|
||||||
@ -30,13 +31,14 @@ open class AsianLoad : ExtractorApi() {
|
|||||||
}
|
}
|
||||||
} else if (extractedUrl.endsWith(".mp4")) {
|
} else if (extractedUrl.endsWith(".mp4")) {
|
||||||
extractedLinksList.add(
|
extractedLinksList.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
source = name,
|
||||||
name,
|
name = name,
|
||||||
extractedUrl,
|
url = extractedUrl,
|
||||||
url.replace(" ", "%20"),
|
) {
|
||||||
getQualityFromName(sourceMatch.groupValues[2]),
|
this.referer = url.replace(" ", "%20")
|
||||||
)
|
this.quality = getQualityFromName(sourceMatch.groupValues[2])
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,17 +19,18 @@ open class Blogger : ExtractorApi() {
|
|||||||
.substringBefore("]")
|
.substringBefore("]")
|
||||||
tryParseJson<List<ResponseSource>>("[$data]")?.map {
|
tryParseJson<List<ResponseSource>>("[$data]")?.map {
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
it.play_url,
|
it.play_url,
|
||||||
referer = "https://www.youtube.com/",
|
) {
|
||||||
quality = when (it.format_id) {
|
this.referer = "https://www.youtube.com/"
|
||||||
|
this.quality = when (it.format_id) {
|
||||||
18 -> 360
|
18 -> 360
|
||||||
22 -> 720
|
22 -> 720
|
||||||
else -> Qualities.Unknown.value
|
else -> Qualities.Unknown.value
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,12 +10,10 @@ open class ByteShare : ExtractorApi() {
|
|||||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
|
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
|
||||||
val sources = mutableListOf<ExtractorLink>()
|
val sources = mutableListOf<ExtractorLink>()
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
source = name,
|
||||||
name,
|
name = name,
|
||||||
url.replace("/embed/", "/download/"),
|
url = url.replace("/embed/", "/download/"),
|
||||||
"",
|
|
||||||
Qualities.Unknown.value,
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return sources
|
return sources
|
||||||
|
@ -6,9 +6,10 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import java.net.URLDecoder
|
import java.net.URLDecoder
|
||||||
|
|
||||||
open class Cda: ExtractorApi() {
|
open class Cda : ExtractorApi() {
|
||||||
override var mainUrl = "https://ebd.cda.pl"
|
override var mainUrl = "https://ebd.cda.pl"
|
||||||
override var name = "Cda"
|
override var name = "Cda"
|
||||||
override val requiresReferer = false
|
override val requiresReferer = false
|
||||||
@ -18,20 +19,25 @@ open class Cda: ExtractorApi() {
|
|||||||
val mediaId = url
|
val mediaId = url
|
||||||
.split("/").last()
|
.split("/").last()
|
||||||
.split("?").first()
|
.split("?").first()
|
||||||
val doc = app.get("https://ebd.cda.pl/647x500/$mediaId", headers=mapOf(
|
val doc = app.get(
|
||||||
|
"https://ebd.cda.pl/647x500/$mediaId", headers = mapOf(
|
||||||
"Referer" to "https://ebd.cda.pl/647x500/$mediaId",
|
"Referer" to "https://ebd.cda.pl/647x500/$mediaId",
|
||||||
"User-Agent" to USER_AGENT,
|
"User-Agent" to USER_AGENT,
|
||||||
"Cookie" to "cda.player=html5"
|
"Cookie" to "cda.player=html5"
|
||||||
)).document
|
)
|
||||||
|
).document
|
||||||
val dataRaw = doc.selectFirst("[player_data]")?.attr("player_data") ?: return null
|
val dataRaw = doc.selectFirst("[player_data]")?.attr("player_data") ?: return null
|
||||||
val playerData = tryParseJson<PlayerData>(dataRaw) ?: return null
|
val playerData = tryParseJson<PlayerData>(dataRaw) ?: return null
|
||||||
return listOf(ExtractorLink(
|
return listOf(
|
||||||
name,
|
newExtractorLink(
|
||||||
name,
|
source = name,
|
||||||
getFile(playerData.video.file),
|
name = name,
|
||||||
referer = "https://ebd.cda.pl/647x500/$mediaId",
|
url = getFile(playerData.video.file),
|
||||||
quality = Qualities.Unknown.value
|
) {
|
||||||
))
|
this.referer = "https://ebd.cda.pl/647x500/$mediaId"
|
||||||
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun rot13(a: String): String {
|
private fun rot13(a: String): String {
|
||||||
@ -46,7 +52,7 @@ open class Cda: ExtractorApi() {
|
|||||||
|
|
||||||
private fun cdaUggc(a: String): String {
|
private fun cdaUggc(a: String): String {
|
||||||
val decoded = rot13(a)
|
val decoded = rot13(a)
|
||||||
return if (decoded.endsWith("adc.mp4")) decoded.replace("adc.mp4",".mp4")
|
return if (decoded.endsWith("adc.mp4")) decoded.replace("adc.mp4", ".mp4")
|
||||||
else decoded
|
else decoded
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import java.security.MessageDigest
|
import java.security.MessageDigest
|
||||||
|
|
||||||
|
|
||||||
@ -106,15 +107,15 @@ open class Chillx : ExtractorApi() {
|
|||||||
"user-agent" to USER_AGENT,
|
"user-agent" to USER_AGENT,
|
||||||
)
|
)
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
source = name,
|
||||||
name,
|
name = name,
|
||||||
m3u8,
|
url = m3u8,
|
||||||
mainUrl,
|
) {
|
||||||
Qualities.P1080.value,
|
this.referer = mainUrl
|
||||||
INFER_TYPE,
|
this.quality = Qualities.P1080.value
|
||||||
headers = header
|
this.headers = header
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
val subtitles = extractSrtSubtitles(decoded)
|
val subtitles = extractSrtSubtitles(decoded)
|
||||||
|
@ -37,14 +37,15 @@ open class ContentX : ExtractorApi() {
|
|||||||
val m3uLink = vidExtract.replace("\\", "")
|
val m3uLink = vidExtract.replace("\\", "")
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = m3uLink,
|
url = m3uLink,
|
||||||
referer = url,
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
val iDublaj = Regex(""",\"([^']+)\",\"Türkçe""").find(iSource)!!.groups[1]?.value
|
val iDublaj = Regex(""",\"([^']+)\",\"Türkçe""").find(iSource)!!.groups[1]?.value
|
||||||
@ -54,14 +55,15 @@ open class ContentX : ExtractorApi() {
|
|||||||
val dublajLink = dublajExtract.replace("\\", "")
|
val dublajLink = dublajExtract.replace("\\", "")
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = "${this.name} Türkçe Dublaj",
|
source = "${this.name} Türkçe Dublaj",
|
||||||
name = "${this.name} Türkçe Dublaj",
|
name = "${this.name} Türkçe Dublaj",
|
||||||
url = dublajLink,
|
url = dublajLink,
|
||||||
referer = url,
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
|
|
||||||
@ -98,14 +99,14 @@ open class DoodLaExtractor : ExtractorApi() {
|
|||||||
?.getOrNull(0)
|
?.getOrNull(0)
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
trueUrl,
|
trueUrl,
|
||||||
"$mainUrl/",
|
) {
|
||||||
getQualityFromName(quality),
|
this.referer = "$mainUrl/"
|
||||||
INFER_TYPE,
|
this.quality = getQualityFromName(quality)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,14 +14,14 @@ open class EPlayExtractor : ExtractorApi() {
|
|||||||
val response = app.get(url).document
|
val response = app.get(url).document
|
||||||
val trueUrl = response.select("source").attr("src")
|
val trueUrl = response.select("source").attr("src")
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
trueUrl,
|
trueUrl,
|
||||||
mainUrl,
|
) {
|
||||||
getQualityFromName(""), // this needs to be auto
|
this.referer = mainUrl
|
||||||
false
|
this.quality = getQualityFromName("") // this needs to be auto
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
import com.lagradost.cloudstream3.utils.httpsify
|
import com.lagradost.cloudstream3.utils.httpsify
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Embedgram : ExtractorApi() {
|
open class Embedgram : ExtractorApi() {
|
||||||
override val name = "Embedgram"
|
override val name = "Embedgram"
|
||||||
@ -22,16 +23,17 @@ open class Embedgram : ExtractorApi() {
|
|||||||
val link = document.select("video source:last-child").attr("src")
|
val link = document.select("video source:last-child").attr("src")
|
||||||
val quality = document.select("video source:last-child").attr("title")
|
val quality = document.select("video source:last-child").attr("title")
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
httpsify(link),
|
httpsify(link),
|
||||||
"$mainUrl/",
|
) {
|
||||||
getQualityFromName(quality),
|
this.referer = "$mainUrl/"
|
||||||
headers = mapOf(
|
this.quality = getQualityFromName(quality)
|
||||||
|
this.headers = mapOf(
|
||||||
"Range" to "bytes=0-"
|
"Range" to "bytes=0-"
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,7 +3,9 @@ package com.lagradost.cloudstream3.extractors
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class EmturbovidExtractor : ExtractorApi() {
|
open class EmturbovidExtractor : ExtractorApi() {
|
||||||
override var name = "Emturbovid"
|
override var name = "Emturbovid"
|
||||||
@ -24,14 +26,15 @@ open class EmturbovidExtractor : ExtractorApi() {
|
|||||||
playerScript.substringAfter("var urlPlay = '").substringBefore("'")
|
playerScript.substringAfter("var urlPlay = '").substringBefore("'")
|
||||||
|
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = name,
|
source = name,
|
||||||
name = name,
|
name = name,
|
||||||
url = m3u8Url,
|
url = m3u8Url,
|
||||||
referer = "$mainUrl/",
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = "$mainUrl/"
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return sources
|
return sources
|
||||||
|
@ -23,13 +23,14 @@ open class Evoload : ExtractorApi() {
|
|||||||
val r = app.post("https://evoload.io/SecurePlayer", data=(payload)).text
|
val r = app.post("https://evoload.io/SecurePlayer", data=(payload)).text
|
||||||
val link = Regex("src\":\"(.*?)\"").find(r)?.destructured?.component1() ?: return listOf()
|
val link = Regex("src\":\"(.*?)\"").find(r)?.destructured?.component1() ?: return listOf()
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
link,
|
link,
|
||||||
url,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,9 @@ package com.lagradost.cloudstream3.extractors
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class GMPlayer : ExtractorApi() {
|
open class GMPlayer : ExtractorApi() {
|
||||||
override val name = "GM Player"
|
override val name = "GM Player"
|
||||||
@ -26,15 +28,16 @@ open class GMPlayer : ExtractorApi() {
|
|||||||
).parsed<GmResponse>().videoSource ?: return null
|
).parsed<GmResponse>().videoSource ?: return null
|
||||||
|
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
source = this.name,
|
||||||
this.name,
|
name = this.name,
|
||||||
m3u8,
|
url = m3u8,
|
||||||
ref,
|
type = ExtractorLinkType.M3U8
|
||||||
Qualities.Unknown.value,
|
) {
|
||||||
headers = mapOf("accept" to "*/*"),
|
this.referer = ref
|
||||||
isM3u8 = true
|
this.quality = Qualities.Unknown.value
|
||||||
)
|
this.headers = mapOf("accept" to "*/*")
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,13 +17,14 @@ open class GamoVideo : ExtractorApi() {
|
|||||||
.firstOrNull { it.html().contains("sources:") }!!.html().substringAfter("file: \"")
|
.firstOrNull { it.html().contains("sources:") }!!.html().substringAfter("file: \"")
|
||||||
.substringBefore("\",").let {
|
.substringBefore("\",").let {
|
||||||
listOf(
|
listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
it,
|
it,
|
||||||
url,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,14 +94,15 @@ open class Gdriveplayer : ExtractorApi() {
|
|||||||
it.groupValues[1] to it.groupValues[2]
|
it.groupValues[1] to it.groupValues[2]
|
||||||
}.toList().distinctBy { it.second }.map { (link, quality) ->
|
}.toList().distinctBy { it.second }.map { (link, quality) ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = "${httpsify(link)}&res=$quality",
|
url = "${httpsify(link)}&res=$quality",
|
||||||
referer = mainUrl,
|
) {
|
||||||
quality = quality.toIntOrNull() ?: Qualities.Unknown.value,
|
this.referer = mainUrl
|
||||||
headers = mapOf("Range" to "bytes=0-")
|
this.quality = quality.toIntOrNull() ?: Qualities.Unknown.value
|
||||||
)
|
this.headers = mapOf("Range" to "bytes=0-")
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Gofile : ExtractorApi() {
|
open class Gofile : ExtractorApi() {
|
||||||
override val name = "Gofile"
|
override val name = "Gofile"
|
||||||
@ -27,16 +28,16 @@ open class Gofile : ExtractorApi() {
|
|||||||
app.get("$mainApi/getContent?contentId=$id&token=$token&wt=$websiteToken")
|
app.get("$mainApi/getContent?contentId=$id&token=$token&wt=$websiteToken")
|
||||||
.parsedSafe<Source>()?.data?.contents?.forEach {
|
.parsedSafe<Source>()?.data?.contents?.forEach {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
it.value["link"] ?: return,
|
it.value["link"] ?: return,
|
||||||
"",
|
) {
|
||||||
getQuality(it.value["name"]),
|
this.quality = getQuality(it.value["name"])
|
||||||
headers = mapOf(
|
this.headers = mapOf(
|
||||||
"Cookie" to "accountToken=$token"
|
"Cookie" to "accountToken=$token"
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
class GoodstreamExtractor : ExtractorApi() {
|
class GoodstreamExtractor : ExtractorApi() {
|
||||||
override var name = "Goodstream"
|
override var name = "Goodstream"
|
||||||
@ -22,13 +23,13 @@ class GoodstreamExtractor : ExtractorApi() {
|
|||||||
val urlRegex = Regex("file: \"(https:\\/\\/[a-z0-9.\\/-_?=&]+)\",")
|
val urlRegex = Regex("file: \"(https:\\/\\/[a-z0-9.\\/-_?=&]+)\",")
|
||||||
urlRegex.find(script.data())?.groupValues?.get(1).let { link ->
|
urlRegex.find(script.data())?.groupValues?.get(1).let { link ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
link!!,
|
link!!,
|
||||||
mainUrl,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = mainUrl
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,14 +57,14 @@ open class GuardareStream : ExtractorApi() {
|
|||||||
val jsonVideoData = AppUtils.parseJson<GuardareJsonData>(response)
|
val jsonVideoData = AppUtils.parseJson<GuardareJsonData>(response)
|
||||||
jsonVideoData.data.forEach {
|
jsonVideoData.data.forEach {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
it.file + ".${it.type}",
|
it.file + ".${it.type}",
|
||||||
mainUrl,
|
) {
|
||||||
it.label.filter { it.isDigit() }.toInt(),
|
this.referer = mainUrl
|
||||||
false
|
this.quality = it.label.filter { it.isDigit() }.toInt()
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,14 +49,15 @@ open class HDMomPlayer : ExtractorApi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = m3uLink ?: throw ErrorLoadingException("m3u link not found"),
|
url = m3uLink ?: throw ErrorLoadingException("m3u link not found"),
|
||||||
referer = url,
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,14 +38,13 @@ open class HDPlayerSystem : ExtractorApi() {
|
|||||||
val m3uLink = videoResponse.securedLink
|
val m3uLink = videoResponse.securedLink
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = m3uLink,
|
url = m3uLink
|
||||||
referer = extRef,
|
) {
|
||||||
quality = Qualities.Unknown.value,
|
this.referer = extRef
|
||||||
type = INFER_TYPE
|
}
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,12 +49,13 @@ open class Hxfile : ExtractorApi() {
|
|||||||
getAndUnpack(script.data()).substringAfter("sources:[").substringBefore("]")
|
getAndUnpack(script.data()).substringAfter("sources:[").substringBefore("]")
|
||||||
tryParseJson<List<ResponseSource>>("[$data]")?.map {
|
tryParseJson<List<ResponseSource>>("[$data]")?.map {
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
it.file,
|
it.file,
|
||||||
referer = mainUrl,
|
) {
|
||||||
quality = when {
|
this.referer = mainUrl
|
||||||
|
this.quality = when {
|
||||||
url.contains("hxfile.co") -> getQualityFromName(
|
url.contains("hxfile.co") -> getQualityFromName(
|
||||||
Regex("\\d\\.(.*?).mp4").find(
|
Regex("\\d\\.(.*?).mp4").find(
|
||||||
document.select("title").text()
|
document.select("title").text()
|
||||||
@ -62,24 +63,25 @@ open class Hxfile : ExtractorApi() {
|
|||||||
)
|
)
|
||||||
else -> getQualityFromName(it.label)
|
else -> getQualityFromName(it.label)
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else if (script.data().contains("\"sources\":[")) {
|
} else if (script.data().contains("\"sources\":[")) {
|
||||||
val data = script.data().substringAfter("\"sources\":[").substringBefore("]")
|
val data = script.data().substringAfter("\"sources\":[").substringBefore("]")
|
||||||
tryParseJson<List<ResponseSource>>("[$data]")?.map {
|
tryParseJson<List<ResponseSource>>("[$data]")?.map {
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
it.file,
|
it.file,
|
||||||
referer = mainUrl,
|
) {
|
||||||
quality = when {
|
this.referer = mainUrl
|
||||||
|
this.quality = when {
|
||||||
it.label?.contains("HD") == true -> Qualities.P720.value
|
it.label?.contains("HD") == true -> Qualities.P720.value
|
||||||
it.label?.contains("SD") == true -> Qualities.P480.value
|
it.label?.contains("SD") == true -> Qualities.P480.value
|
||||||
else -> getQualityFromName(it.label)
|
else -> getQualityFromName(it.label)
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.StringUtils.decodeUri
|
import com.lagradost.cloudstream3.utils.StringUtils.decodeUri
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
|
|
||||||
open class InternetArchive : ExtractorApi() {
|
open class InternetArchive : ExtractorApi() {
|
||||||
@ -98,13 +99,13 @@ open class InternetArchive : ExtractorApi() {
|
|||||||
"$fileNameCleaned ($fileExtension)"
|
"$fileNameCleaned ($fileExtension)"
|
||||||
} else this.name
|
} else this.name
|
||||||
callback(
|
callback(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
name,
|
name,
|
||||||
mediaUrl,
|
mediaUrl
|
||||||
"",
|
) {
|
||||||
quality
|
this.quality = quality
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
class Meownime : JWPlayer() {
|
class Meownime : JWPlayer() {
|
||||||
override val name = "Meownime"
|
override val name = "Meownime"
|
||||||
@ -55,17 +56,18 @@ open class JWPlayer : ExtractorApi() {
|
|||||||
|
|
||||||
tryParseJson<List<ResponseSource>>("$data")?.map {
|
tryParseJson<List<ResponseSource>>("$data")?.map {
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
it.file,
|
it.file,
|
||||||
referer = url,
|
) {
|
||||||
quality = getQualityFromName(
|
this.referer = url
|
||||||
|
this.quality = getQualityFromName(
|
||||||
Regex("(\\d{3,4}p)").find(it.file)?.groupValues?.get(
|
Regex("(\\d{3,4}p)").find(it.file)?.groupValues?.get(
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.httpsify
|
import com.lagradost.cloudstream3.utils.httpsify
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Krakenfiles : ExtractorApi() {
|
open class Krakenfiles : ExtractorApi() {
|
||||||
override val name = "Krakenfiles"
|
override val name = "Krakenfiles"
|
||||||
@ -23,12 +24,10 @@ open class Krakenfiles : ExtractorApi() {
|
|||||||
val link = doc.selectFirst("source")?.attr("src")
|
val link = doc.selectFirst("source")?.attr("src")
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
httpsify(link ?: return),
|
httpsify(link ?: return),
|
||||||
"",
|
|
||||||
Qualities.Unknown.value
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Linkbox : ExtractorApi() {
|
open class Linkbox : ExtractorApi() {
|
||||||
override val name = "Linkbox"
|
override val name = "Linkbox"
|
||||||
@ -23,13 +24,14 @@ open class Linkbox : ExtractorApi() {
|
|||||||
app.get("$mainUrl/api/file/detail?itemId=$id", referer = url)
|
app.get("$mainUrl/api/file/detail?itemId=$id", referer = url)
|
||||||
.parsedSafe<Responses>()?.data?.itemInfo?.resolutionList?.map { link ->
|
.parsedSafe<Responses>()?.data?.itemInfo?.resolutionList?.map { link ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
link.url ?: return@map null,
|
link.url ?: return@map null,
|
||||||
url,
|
) {
|
||||||
getQualityFromName(link.resolution)
|
this.referer = url
|
||||||
)
|
this.quality = getQualityFromName(link.resolution)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
class Lulustream1 : LuluStream() {
|
class Lulustream1 : LuluStream() {
|
||||||
override val name = "Lulustream"
|
override val name = "Lulustream"
|
||||||
@ -43,14 +44,14 @@ open class LuluStream : ExtractorApi() {
|
|||||||
?.let { script ->
|
?.let { script ->
|
||||||
Regex("file:\"(.*)\"").find(script)?.groupValues?.get(1)?.let { link ->
|
Regex("file:\"(.*)\"").find(script)?.groupValues?.get(1)?.let { link ->
|
||||||
callback(
|
callback(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
link,
|
link,
|
||||||
mainUrl,
|
) {
|
||||||
Qualities.P1080.value,
|
this.referer = mainUrl
|
||||||
type = INFER_TYPE
|
this.quality = Qualities.P1080.value
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,15 +26,16 @@ open class MailRu : ExtractorApi() {
|
|||||||
val videoUrl = if (video.url.startsWith("//")) "https:${video.url}" else video.url
|
val videoUrl = if (video.url.startsWith("//")) "https:${video.url}" else video.url
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = videoUrl,
|
url = videoUrl,
|
||||||
referer = url,
|
type = ExtractorLinkType.M3U8
|
||||||
headers = mapOf("Cookie" to "video_key=${videoKey}"),
|
) {
|
||||||
quality = getQualityFromName(video.key),
|
this.referer = url
|
||||||
isM3u8 = false
|
this.headers = mapOf("Cookie" to "video_key=${videoKey}")
|
||||||
)
|
this.quality = getQualityFromName(video.key)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Mediafire : ExtractorApi() {
|
open class Mediafire : ExtractorApi() {
|
||||||
override val name = "Mediafire"
|
override val name = "Mediafire"
|
||||||
@ -23,14 +24,13 @@ open class Mediafire : ExtractorApi() {
|
|||||||
val video = res.selectFirst("a#downloadButton")?.attr("href")
|
val video = res.selectFirst("a#downloadButton")?.attr("href")
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
video ?: return,
|
video ?: return
|
||||||
"",
|
) {
|
||||||
getQuality(title),
|
this.quality = getQuality(title)
|
||||||
INFER_TYPE
|
}
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -33,13 +33,14 @@ open class MixDrop : ExtractorApi() {
|
|||||||
getAndUnpack(this.text).let { unpackedText ->
|
getAndUnpack(this.text).let { unpackedText ->
|
||||||
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
httpsify(link),
|
httpsify(link),
|
||||||
url,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.getAndUnpack
|
import com.lagradost.cloudstream3.utils.getAndUnpack
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Mp4Upload : ExtractorApi() {
|
open class Mp4Upload : ExtractorApi() {
|
||||||
override var name = "Mp4Upload"
|
override var name = "Mp4Upload"
|
||||||
@ -24,24 +25,26 @@ open class Mp4Upload : ExtractorApi() {
|
|||||||
unpackedText.lowercase().substringAfter(" height=").substringBefore(" ").toIntOrNull()
|
unpackedText.lowercase().substringAfter(" height=").substringBefore(" ").toIntOrNull()
|
||||||
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
link,
|
link,
|
||||||
url,
|
) {
|
||||||
quality ?: Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
this.quality = quality ?: Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
srcRegex2.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
srcRegex2.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
link,
|
link,
|
||||||
url,
|
) {
|
||||||
quality ?: Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
this.quality = quality ?: Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
|
@ -3,8 +3,10 @@ package com.lagradost.cloudstream3.extractors
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
open class MultiQuality : ExtractorApi() {
|
open class MultiQuality : ExtractorApi() {
|
||||||
@ -29,27 +31,29 @@ open class MultiQuality : ExtractorApi() {
|
|||||||
with(app.get(extractedUrl)) {
|
with(app.get(extractedUrl)) {
|
||||||
m3u8Regex.findAll(this.text).forEach { match ->
|
m3u8Regex.findAll(this.text).forEach { match ->
|
||||||
extractedLinksList.add(
|
extractedLinksList.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
source = name,
|
||||||
name = name,
|
name = name,
|
||||||
urlRegex.find(this.url)!!.groupValues[1] + match.groupValues[0],
|
url = urlRegex.find(this.url)!!.groupValues[1] + match.groupValues[0],
|
||||||
url,
|
type = ExtractorLinkType.M3U8
|
||||||
getQualityFromName(match.groupValues[1]),
|
) {
|
||||||
isM3u8 = true
|
this.referer = url
|
||||||
)
|
this.quality = getQualityFromName(match.groupValues[1])
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if (extractedUrl.endsWith(".mp4")) {
|
} else if (extractedUrl.endsWith(".mp4")) {
|
||||||
extractedLinksList.add(
|
extractedLinksList.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
"$name ${sourceMatch.groupValues[2]}",
|
"$name ${sourceMatch.groupValues[2]}",
|
||||||
extractedUrl,
|
extractedUrl,
|
||||||
url.replace(" ", "%20"),
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = url.replace(" ", "%20")
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Mvidoo : ExtractorApi() {
|
open class Mvidoo : ExtractorApi() {
|
||||||
override val name = "Mvidoo"
|
override val name = "Mvidoo"
|
||||||
@ -31,16 +32,17 @@ open class Mvidoo : ExtractorApi() {
|
|||||||
?.removeSurrounding("[", "]")?.replace("\"", "")?.replace("\\x", "")?.split(",")?.map { it.decodeHex() }?.reversed()?.joinToString("") ?: return
|
?.removeSurrounding("[", "]")?.replace("\"", "")?.replace("\\x", "")?.split(",")?.map { it.decodeHex() }?.reversed()?.joinToString("") ?: return
|
||||||
Regex("source\\s*src=\"([^\"]+)").find(data)?.groupValues?.get(1)?.let { link ->
|
Regex("source\\s*src=\"([^\"]+)").find(data)?.groupValues?.get(1)?.let { link ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
link,
|
link
|
||||||
"$mainUrl/",
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = "$mainUrl/"
|
||||||
headers = mapOf(
|
this.quality = Qualities.Unknown.value
|
||||||
|
this.headers = mapOf(
|
||||||
"Range" to "bytes=0-"
|
"Range" to "bytes=0-"
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,9 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.AppUtils
|
import com.lagradost.cloudstream3.utils.AppUtils
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Odnoklassniki : ExtractorApi() {
|
open class Odnoklassniki : ExtractorApi() {
|
||||||
override val name = "Odnoklassniki"
|
override val name = "Odnoklassniki"
|
||||||
@ -50,15 +52,16 @@ open class Odnoklassniki : ExtractorApi() {
|
|||||||
.replace("ULTRA", "4k")
|
.replace("ULTRA", "4k")
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = videoUrl,
|
url = videoUrl,
|
||||||
referer = "$mainUrl/",
|
type = ExtractorLinkType.M3U8
|
||||||
quality = getQualityFromName(quality),
|
) {
|
||||||
headers = headers,
|
this.referer = "$mainUrl/"
|
||||||
isM3u8 = false,
|
this.quality = getQualityFromName(quality)
|
||||||
)
|
this.headers = headers
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
data class Okrulinkdata (
|
data class Okrulinkdata (
|
||||||
@JsonProperty("status" ) var status : String? = null,
|
@JsonProperty("status" ) var status : String? = null,
|
||||||
@ -24,13 +25,10 @@ open class Okrulink: ExtractorApi() {
|
|||||||
).parsedSafe<Okrulinkdata>()
|
).parsedSafe<Okrulinkdata>()
|
||||||
if (request?.url != null) {
|
if (request?.url != null) {
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
request.url!!,
|
request.url!!
|
||||||
"",
|
|
||||||
Qualities.Unknown.value,
|
|
||||||
isM3u8 = false
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -49,14 +49,14 @@ open class PeaceMakerst : ExtractorApi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = m3uLink ?: throw ErrorLoadingException("m3u link not found"),
|
url = m3uLink ?: throw ErrorLoadingException("m3u link not found"),
|
||||||
referer = extRef,
|
) {
|
||||||
quality = Qualities.Unknown.value,
|
this.referer = extRef
|
||||||
type = INFER_TYPE
|
this.quality = Qualities.Unknown.value
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ import com.lagradost.cloudstream3.utils.INFER_TYPE
|
|||||||
import com.lagradost.cloudstream3.utils.extractorApis
|
import com.lagradost.cloudstream3.utils.extractorApis
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,14 +62,14 @@ open class Pelisplus(val mainUrl: String) {
|
|||||||
|
|
||||||
if (!loadExtractor(href, link, subtitleCallback, callback)) {
|
if (!loadExtractor(href, link, subtitleCallback, callback)) {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
href,
|
href
|
||||||
page.url,
|
) {
|
||||||
getQualityFromName(qual),
|
this.referer = page.url
|
||||||
type = INFER_TYPE
|
this.quality = getQualityFromName(qual)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,24 +15,24 @@ open class PixelDrain : ExtractorApi() {
|
|||||||
if (mId.isNullOrEmpty())
|
if (mId.isNullOrEmpty())
|
||||||
{
|
{
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
url,
|
url
|
||||||
url,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
"$mainUrl/api/file/${mId}?download",
|
"$mainUrl/api/file/${mId}?download",
|
||||||
url,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -61,14 +61,15 @@ open class PlayLtXyz: ExtractorApi() {
|
|||||||
val linkUrl = item.data ?: ""
|
val linkUrl = item.data ?: ""
|
||||||
if (linkUrl.isNotBlank()) {
|
if (linkUrl.isNotBlank()) {
|
||||||
extractedLinksList.add(
|
extractedLinksList.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = name,
|
source = name,
|
||||||
name = name,
|
name = name,
|
||||||
url = linkUrl,
|
url = linkUrl,
|
||||||
referer = url,
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,14 +46,15 @@ open class RapidVid : ExtractorApi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = decoded,
|
url = decoded,
|
||||||
referer = extRef,
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = extRef
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.getPostForm
|
import com.lagradost.cloudstream3.utils.getPostForm
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
|
|
||||||
//class SBPlay1 : SBPlay() {
|
//class SBPlay1 : SBPlay() {
|
||||||
@ -39,20 +40,25 @@ open class SBPlay : ExtractorApi() {
|
|||||||
val hash = it.groupValues[3]
|
val hash = it.groupValues[3]
|
||||||
val href = "https://sbplay.one/dl?op=download_orig&id=$id&mode=$mode&hash=$hash"
|
val href = "https://sbplay.one/dl?op=download_orig&id=$id&mode=$mode&hash=$hash"
|
||||||
val hrefResponse = app.get(href).text
|
val hrefResponse = app.get(href).text
|
||||||
app.post("https://sbplay.one/?op=notifications&open=&_=$unixTimeMS", referer = href)
|
app.post(
|
||||||
|
"https://sbplay.one/?op=notifications&open=&_=$unixTimeMS",
|
||||||
|
referer = href
|
||||||
|
)
|
||||||
val hrefDocument = Jsoup.parse(hrefResponse)
|
val hrefDocument = Jsoup.parse(hrefResponse)
|
||||||
val hrefSpan = hrefDocument.selectFirst("span > a")
|
val hrefSpan = hrefDocument.selectFirst("span > a")
|
||||||
if (hrefSpan == null) {
|
if (hrefSpan == null) {
|
||||||
getPostForm(href, hrefResponse)?.let { form ->
|
getPostForm(href, hrefResponse)?.let { form ->
|
||||||
val postDocument = Jsoup.parse(form)
|
val postDocument = Jsoup.parse(form)
|
||||||
val downloadBtn = postDocument.selectFirst("a.downloadbtn")?.attr("href")
|
val downloadBtn =
|
||||||
|
postDocument.selectFirst("a.downloadbtn")?.attr("href")
|
||||||
if (downloadBtn.isNullOrEmpty()) {
|
if (downloadBtn.isNullOrEmpty()) {
|
||||||
val hrefSpan2 = postDocument.selectFirst("span > a")?.attr("href")
|
val hrefSpan2 = postDocument.selectFirst("span > a")?.attr("href")
|
||||||
if (hrefSpan2?.startsWith("https://") == true) {
|
if (hrefSpan2?.startsWith("https://") == true) {
|
||||||
links.add(
|
links.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name, name,
|
this.name,
|
||||||
hrefSpan2, "", Qualities.Unknown.value, false
|
name,
|
||||||
|
hrefSpan2
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@ -60,20 +66,23 @@ open class SBPlay : ExtractorApi() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
links.add(
|
links.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
name,
|
name,
|
||||||
downloadBtn,
|
downloadBtn
|
||||||
"",
|
|
||||||
Qualities.Unknown.value,
|
|
||||||
false
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val link = hrefSpan.attr("href")
|
val link = hrefSpan.attr("href")
|
||||||
links.add(ExtractorLink(this.name, name, link, "", Qualities.Unknown.value, false))
|
links.add(
|
||||||
|
newExtractorLink(
|
||||||
|
this.name,
|
||||||
|
name,
|
||||||
|
link
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -19,14 +19,13 @@ open class SibNet : ExtractorApi() {
|
|||||||
m3uLink = "${mainUrl}${m3uLink}"
|
m3uLink = "${mainUrl}${m3uLink}"
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = m3uLink,
|
url = m3uLink,
|
||||||
referer = url,
|
) {
|
||||||
quality = Qualities.Unknown.value,
|
this.referer = url
|
||||||
type = INFER_TYPE
|
}
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -34,14 +34,13 @@ open class Sobreatsesuyp : ExtractorApi() {
|
|||||||
val videoData = app.post("${mainUrl}/playlist/${item.file.substring(1)}.txt", referer = extRef).text
|
val videoData = app.post("${mainUrl}/playlist/${item.file.substring(1)}.txt", referer = extRef).text
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = "${this.name} - ${item.title}",
|
name = "${this.name} - ${item.title}",
|
||||||
url = videoData,
|
url = videoData,
|
||||||
referer = extRef,
|
) {
|
||||||
quality = Qualities.Unknown.value,
|
this.referer = extRef
|
||||||
type = INFER_TYPE
|
}
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
|
|
||||||
open class Solidfiles : ExtractorApi() {
|
open class Solidfiles : ExtractorApi() {
|
||||||
@ -22,13 +23,14 @@ open class Solidfiles : ExtractorApi() {
|
|||||||
val source = tryParseJson<ResponseSource>("{$data}")
|
val source = tryParseJson<ResponseSource>("{$data}")
|
||||||
val quality = Regex("\\d{3,4}p").find(source!!.nodeName)?.groupValues?.get(0)
|
val quality = Regex("\\d{3,4}p").find(source!!.nodeName)?.groupValues?.get(0)
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
source.streamUrl,
|
source.streamUrl,
|
||||||
referer = url,
|
) {
|
||||||
quality = getQualityFromName(quality)
|
this.referer = url
|
||||||
)
|
this.quality = getQualityFromName(quality)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import org.mozilla.javascript.Context
|
import org.mozilla.javascript.Context
|
||||||
|
|
||||||
class StreamTapeNet : StreamTape() {
|
class StreamTapeNet : StreamTape() {
|
||||||
@ -45,13 +46,14 @@ open class StreamTape : ExtractorApi() {
|
|||||||
if(!result.isNullOrEmpty()){
|
if(!result.isNullOrEmpty()){
|
||||||
val extractedUrl = "https:${result}&stream=1"
|
val extractedUrl = "https:${result}&stream=1"
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
extractedUrl,
|
extractedUrl,
|
||||||
url,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,11 @@ package com.lagradost.cloudstream3.extractors
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.JsUnpacker
|
import com.lagradost.cloudstream3.utils.JsUnpacker
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
open class Streamhub : ExtractorApi() {
|
open class Streamhub : ExtractorApi() {
|
||||||
@ -22,13 +25,10 @@ open class Streamhub : ExtractorApi() {
|
|||||||
JsUnpacker("eval$jsEval").unpack()?.let { unPacked ->
|
JsUnpacker("eval$jsEval").unpack()?.let { unPacked ->
|
||||||
Regex("sources:\\[\\{src:\"(.*?)\"").find(unPacked)?.groupValues?.get(1)?.let { link ->
|
Regex("sources:\\[\\{src:\"(.*?)\"").find(unPacked)?.groupValues?.get(1)?.let { link ->
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
source = this.name,
|
||||||
this.name,
|
this.name,
|
||||||
link,
|
link,
|
||||||
referer ?: "",
|
|
||||||
Qualities.Unknown.value,
|
|
||||||
URI(link).path.endsWith(".m3u8")
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,9 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.nicehttp.RequestBodyTypes
|
import com.lagradost.nicehttp.RequestBodyTypes
|
||||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||||
@ -45,15 +48,21 @@ open class Slmaxed : ExtractorApi() {
|
|||||||
).parsed<JsonResponse>()
|
).parsed<JsonResponse>()
|
||||||
return json.result?.mapNotNull {
|
return json.result?.mapNotNull {
|
||||||
it.value.let { result ->
|
it.value.let { result ->
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
result.file ?: return@mapNotNull null,
|
result.file ?: return@mapNotNull null,
|
||||||
url,
|
type = if (result.type?.contains(
|
||||||
|
"hls",
|
||||||
|
ignoreCase = true
|
||||||
|
) == true
|
||||||
|
) ExtractorLinkType.M3U8 else INFER_TYPE
|
||||||
|
) {
|
||||||
|
this.referer = url
|
||||||
|
this.quality =
|
||||||
result.label?.replace("p", "", ignoreCase = true)?.trim()?.toIntOrNull()
|
result.label?.replace("p", "", ignoreCase = true)?.trim()?.toIntOrNull()
|
||||||
?: Qualities.Unknown.value,
|
?: Qualities.Unknown.value
|
||||||
isM3u8 = result.type?.contains("hls", ignoreCase = true) == true
|
}
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,20 +53,21 @@ open class Streamplay : ExtractorApi() {
|
|||||||
.replace("label", "\"label\"")
|
.replace("label", "\"label\"")
|
||||||
tryParseJson<List<Source>>("[$data}]")?.map { res ->
|
tryParseJson<List<Source>>("[$data}]")?.map { res ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
res.file ?: return@map null,
|
res.file ?: return@map null,
|
||||||
"$mainServer/",
|
) {
|
||||||
when (res.label) {
|
this.referer = "$mainServer/"
|
||||||
|
this.quality = when (res.label) {
|
||||||
"HD" -> Qualities.P720.value
|
"HD" -> Qualities.P720.value
|
||||||
"SD" -> Qualities.P480.value
|
"SD" -> Qualities.P480.value
|
||||||
else -> Qualities.Unknown.value
|
else -> Qualities.Unknown.value
|
||||||
},
|
}
|
||||||
headers = mapOf(
|
this.headers = mapOf(
|
||||||
"Range" to "bytes=0-"
|
"Range" to "bytes=0-"
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,14 +52,13 @@ open class TRsTX : ExtractorApi() {
|
|||||||
val m3uLink = mapEntry["videoData"] ?: continue
|
val m3uLink = mapEntry["videoData"] ?: continue
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = "${this.name} - ${title}",
|
name = "${this.name} - ${title}",
|
||||||
url = m3uLink,
|
url = m3uLink,
|
||||||
referer = extRef,
|
) {
|
||||||
quality = Qualities.Unknown.value,
|
this.referer = extRef
|
||||||
type = INFER_TYPE
|
}
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Tantifilm : ExtractorApi() {
|
open class Tantifilm : ExtractorApi() {
|
||||||
override var name = "Tantifilm"
|
override var name = "Tantifilm"
|
||||||
@ -29,14 +30,14 @@ open class Tantifilm : ExtractorApi() {
|
|||||||
val response = app.post(link).text.replace("""\""","")
|
val response = app.post(link).text.replace("""\""","")
|
||||||
val jsonvideodata = parseJson<TantifilmJsonData>(response)
|
val jsonvideodata = parseJson<TantifilmJsonData>(response)
|
||||||
return jsonvideodata.data.map {
|
return jsonvideodata.data.map {
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
it.file+".${it.type}",
|
it.file+".${it.type}"
|
||||||
mainUrl,
|
) {
|
||||||
it.label.filter{ it.isDigit() }.toInt(),
|
this.referer = mainUrl
|
||||||
false
|
this.quality = it.label.filter{ it.isDigit() }.toInt()
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -21,14 +21,14 @@ open class TauVideo : ExtractorApi() {
|
|||||||
|
|
||||||
for (video in api.urls) {
|
for (video in api.urls) {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = video.url,
|
url = video.url,
|
||||||
referer = extRef,
|
) {
|
||||||
quality = getQualityFromName(video.label),
|
this.referer = extRef
|
||||||
type = INFER_TYPE
|
this.quality = getQualityFromName(video.label)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,13 +49,10 @@ open class Tomatomatela : ExtractorApi() {
|
|||||||
).parsedSafe<Tomato>()
|
).parsedSafe<Tomato>()
|
||||||
if (server?.file != null) {
|
if (server?.file != null) {
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
server.file,
|
server.file,
|
||||||
"",
|
|
||||||
Qualities.Unknown.value,
|
|
||||||
isM3u8 = false
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,13 @@ open class Uqload : ExtractorApi() {
|
|||||||
with(app.get(url)) { // raised error ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED (3003) is due to the response: "error_nofile"
|
with(app.get(url)) { // raised error ERROR_CODE_PARSING_CONTAINER_UNSUPPORTED (3003) is due to the response: "error_nofile"
|
||||||
srcRegex.find(this.text)?.groupValues?.get(1)?.replace("\"", "")?.let { link ->
|
srcRegex.find(this.text)?.groupValues?.get(1)?.replace("\"", "")?.let { link ->
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
link,
|
link
|
||||||
url,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,13 +103,14 @@ open class Userload : ExtractorApi() {
|
|||||||
val videoLink = videoLinkPage.text
|
val videoLink = videoLinkPage.text
|
||||||
val nameSource = app.get(url).document.head().selectFirst("title")!!.text()
|
val nameSource = app.get(url).document.head().selectFirst("title")!!.text()
|
||||||
extractedLinksList.add(
|
extractedLinksList.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
videoLink,
|
videoLink
|
||||||
mainUrl,
|
) {
|
||||||
getQualityFromName(nameSource),
|
this.referer = mainUrl
|
||||||
)
|
this.quality = getQualityFromName(nameSource)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
return extractedLinksList
|
return extractedLinksList
|
||||||
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Userscloud : ExtractorApi() {
|
open class Userscloud : ExtractorApi() {
|
||||||
override val name = "Userscloud"
|
override val name = "Userscloud"
|
||||||
@ -21,19 +22,20 @@ open class Userscloud : ExtractorApi() {
|
|||||||
val video = res.selectFirst("video#vjsplayer source")?.attr("src")
|
val video = res.selectFirst("video#vjsplayer source")?.attr("src")
|
||||||
val quality = res.selectFirst("div.innerTB h2 b")?.text()
|
val quality = res.selectFirst("div.innerTB h2 b")?.text()
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
video ?: return,
|
video ?: return,
|
||||||
"$mainUrl/",
|
) {
|
||||||
getQuality(quality),
|
this.referer = "$mainUrl/"
|
||||||
headers = mapOf(
|
this.quality = getQuality(quality)
|
||||||
|
this.headers = mapOf(
|
||||||
"Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5",
|
"Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5",
|
||||||
"Range" to "bytes=0-",
|
"Range" to "bytes=0-",
|
||||||
"Sec-Fetch-Dest" to "video",
|
"Sec-Fetch-Dest" to "video",
|
||||||
"Sec-Fetch-Mode" to "no-cors",
|
"Sec-Fetch-Mode" to "no-cors",
|
||||||
)
|
)
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.AppUtils
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Uservideo : ExtractorApi() {
|
open class Uservideo : ExtractorApi() {
|
||||||
override val name: String = "Uservideo"
|
override val name: String = "Uservideo"
|
||||||
@ -30,13 +31,14 @@ open class Uservideo : ExtractorApi() {
|
|||||||
|
|
||||||
sources?.map { source ->
|
sources?.map { source ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
source.src ?: return@map null,
|
source.src ?: return@map null
|
||||||
url,
|
) {
|
||||||
quality ?: Qualities.Unknown.value,
|
this.referer = url
|
||||||
)
|
this.quality = quality ?: Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Vicloud : ExtractorApi() {
|
open class Vicloud : ExtractorApi() {
|
||||||
override val name: String = "Vicloud"
|
override val name: String = "Vicloud"
|
||||||
@ -27,13 +28,14 @@ open class Vicloud : ExtractorApi() {
|
|||||||
referer = url
|
referer = url
|
||||||
).parsedSafe<Responses>()?.sources?.map { source ->
|
).parsedSafe<Responses>()?.sources?.map { source ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
source.file ?: return@map null,
|
source.file ?: return@map null,
|
||||||
url,
|
) {
|
||||||
getQualityFromName(source.label),
|
this.referer = url
|
||||||
)
|
this.quality = getQualityFromName(source.label)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,14 +46,15 @@ open class VidMoxy : ExtractorApi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = decoded,
|
url = decoded,
|
||||||
referer = extRef,
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = extRef
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,8 +5,10 @@ import com.lagradost.cloudstream3.amap
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import java.util.Base64
|
import java.util.Base64
|
||||||
|
|
||||||
class VidSrcExtractor2 : VidSrcExtractor() {
|
class VidSrcExtractor2 : VidSrcExtractor() {
|
||||||
@ -46,14 +48,15 @@ open class VidSrcExtractor : ExtractorApi() {
|
|||||||
decodeUrl(encodedElement.attr("id"), encodedElement.text()) ?: return@amap
|
decodeUrl(encodedElement.attr("id"), encodedElement.text()) ?: return@amap
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
source = this.name,
|
||||||
this.name,
|
name = this.name,
|
||||||
decodedUrl,
|
url = decodedUrl,
|
||||||
apiUrl,
|
type = ExtractorLinkType.M3U8
|
||||||
Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = apiUrl
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
loadExtractor(res.url, url, subtitleCallback, callback)
|
loadExtractor(res.url, url, subtitleCallback, callback)
|
||||||
|
@ -3,7 +3,9 @@ package com.lagradost.cloudstream3.extractors
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import javax.crypto.Cipher
|
import javax.crypto.Cipher
|
||||||
import javax.crypto.spec.IvParameterSpec
|
import javax.crypto.spec.IvParameterSpec
|
||||||
import javax.crypto.spec.SecretKeySpec
|
import javax.crypto.spec.SecretKeySpec
|
||||||
@ -20,14 +22,15 @@ open class VidStack : ExtractorApi() {
|
|||||||
val decryptedText = AesHelper.decryptAES(encoded, "kiemtienmua911ca", "0123456789abcdef")
|
val decryptedText = AesHelper.decryptAES(encoded, "kiemtienmua911ca", "0123456789abcdef")
|
||||||
val m3u8=Regex("\"source\":\"(.*?)\"").find(decryptedText)?.groupValues?.get(1)?.replace("\\/","/") ?:""
|
val m3u8=Regex("\"source\":\"(.*?)\"").find(decryptedText)?.groupValues?.get(1)?.replace("\\/","/") ?:""
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
source = this.name,
|
||||||
this.name,
|
name = this.name,
|
||||||
m3u8,
|
url = m3u8,
|
||||||
url,
|
type = ExtractorLinkType.M3U8
|
||||||
Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,14 +36,14 @@ open class VideoSeyred : ExtractorApi() {
|
|||||||
|
|
||||||
for (source in response.sources) {
|
for (source in response.sources) {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = this.name,
|
source = this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
url = source.file,
|
url = source.file,
|
||||||
referer = "${mainUrl}/",
|
) {
|
||||||
quality = Qualities.Unknown.value,
|
this.referer = "${mainUrl}/"
|
||||||
type = INFER_TYPE
|
this.quality = Qualities.Unknown.value
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import org.mozilla.javascript.Context
|
import org.mozilla.javascript.Context
|
||||||
import org.mozilla.javascript.NativeJSON
|
import org.mozilla.javascript.NativeJSON
|
||||||
import org.mozilla.javascript.NativeObject
|
import org.mozilla.javascript.NativeObject
|
||||||
@ -45,14 +46,13 @@ open class Vidguardto : ExtractorApi() {
|
|||||||
val watchlink = sigDecode(jsonStr2.stream)
|
val watchlink = sigDecode(jsonStr2.stream)
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
name,
|
name,
|
||||||
watchlink,
|
watchlink,
|
||||||
this.mainUrl,
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = mainUrl
|
||||||
INFER_TYPE
|
}
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.network.WebViewResolver
|
import com.lagradost.cloudstream3.network.WebViewResolver
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class VidhideExtractor : ExtractorApi() {
|
open class VidhideExtractor : ExtractorApi() {
|
||||||
override var name = "VidHide"
|
override var name = "VidHide"
|
||||||
@ -20,14 +22,15 @@ open class VidhideExtractor : ExtractorApi() {
|
|||||||
val sources = mutableListOf<ExtractorLink>()
|
val sources = mutableListOf<ExtractorLink>()
|
||||||
if (response.url.contains("m3u8"))
|
if (response.url.contains("m3u8"))
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = name,
|
source = name,
|
||||||
name = name,
|
name = name,
|
||||||
url = response.url,
|
url = response.url,
|
||||||
referer = referer ?: "$mainUrl/",
|
type = ExtractorLinkType.M3U8
|
||||||
quality = Qualities.Unknown.value,
|
) {
|
||||||
isM3u8 = true
|
this.referer = referer ?: "$mainUrl/"
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
return sources
|
return sources
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,10 @@ package com.lagradost.cloudstream3.extractors
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.getAndUnpack
|
import com.lagradost.cloudstream3.utils.getAndUnpack
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
class Vido : ExtractorApi() {
|
class Vido : ExtractorApi() {
|
||||||
override var name = "Vido"
|
override var name = "Vido"
|
||||||
@ -18,14 +20,15 @@ class Vido : ExtractorApi() {
|
|||||||
//val quality = unpackedText.lowercase().substringAfter(" height=").substringBefore(" ").toIntOrNull()
|
//val quality = unpackedText.lowercase().substringAfter(" height=").substringBefore(" ").toIntOrNull()
|
||||||
srcRegex.find(this.text)?.groupValues?.get(1)?.let { link ->
|
srcRegex.find(this.text)?.groupValues?.get(1)?.let { link ->
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
source = name,
|
||||||
name,
|
name = name,
|
||||||
link,
|
url = link,
|
||||||
url,
|
type = ExtractorLinkType.M3U8
|
||||||
Qualities.Unknown.value,
|
) {
|
||||||
true,
|
this.referer = url
|
||||||
)
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import com.lagradost.cloudstream3.utils.INFER_TYPE
|
|||||||
import com.lagradost.cloudstream3.utils.extractorApis
|
import com.lagradost.cloudstream3.utils.extractorApis
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,14 +66,15 @@ class Vidstream(val mainUrl: String) {
|
|||||||
|
|
||||||
if (!loadExtractor(href, link, subtitleCallback, callback)) {
|
if (!loadExtractor(href, link, subtitleCallback, callback)) {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
name = this.name,
|
name = this.name,
|
||||||
href,
|
href,
|
||||||
page.url,
|
|
||||||
getQualityFromName(qual),
|
|
||||||
type = INFER_TYPE
|
type = INFER_TYPE
|
||||||
)
|
) {
|
||||||
|
this.referer = page.url
|
||||||
|
this.quality = getQualityFromName(qual)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,14 +23,14 @@ open class Vtbe : ExtractorApi() {
|
|||||||
JsUnpacker(extractedpack).unpack()?.let { unPacked ->
|
JsUnpacker(extractedpack).unpack()?.let { unPacked ->
|
||||||
Regex("sources:\\[\\{file:\"(.*?)\"").find(unPacked)?.groupValues?.get(1)?.let { link ->
|
Regex("sources:\\[\\{file:\"(.*?)\"").find(unPacked)?.groupValues?.get(1)?.let { link ->
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
this.name,
|
this.name,
|
||||||
link,
|
link,
|
||||||
referer ?: "",
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = referer ?: ""
|
||||||
URI(link).path.endsWith(".m3u8")
|
this.quality = Qualities.Unknown.value
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.extractors.helper.NineAnimeHelper.encrypt
|
|||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
|
||||||
@ -127,7 +128,15 @@ open class WcoStream : ExtractorApi() {
|
|||||||
|
|
||||||
if (!response.text.startsWith("{")) throw ErrorLoadingException("Seems like 9Anime kiddies changed stuff again, Go touch some grass for bout an hour Or use a different Server")
|
if (!response.text.startsWith("{")) throw ErrorLoadingException("Seems like 9Anime kiddies changed stuff again, Go touch some grass for bout an hour Or use a different Server")
|
||||||
return response.parsed<Response>().data.media.sources.map {
|
return response.parsed<Response>().data.media.sources.map {
|
||||||
ExtractorLink(name, it.file, it.file, host, Qualities.Unknown.value, type = INFER_TYPE)
|
newExtractorLink(
|
||||||
|
name,
|
||||||
|
it.file,
|
||||||
|
it.file,
|
||||||
|
type = INFER_TYPE
|
||||||
|
) {
|
||||||
|
this.referer = host
|
||||||
|
this.quality = Qualities.Unknown.value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.ExtractorApi
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
import com.lagradost.cloudstream3.utils.INFER_TYPE
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class Wibufile : ExtractorApi() {
|
open class Wibufile : ExtractorApi() {
|
||||||
override val name: String = "Wibufile"
|
override val name: String = "Wibufile"
|
||||||
@ -22,14 +23,14 @@ open class Wibufile : ExtractorApi() {
|
|||||||
val video = Regex("src: ['\"](.*?)['\"]").find(res)?.groupValues?.get(1)
|
val video = Regex("src: ['\"](.*?)['\"]").find(res)?.groupValues?.get(1)
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name,
|
name,
|
||||||
video ?: return,
|
video ?: return,
|
||||||
"$mainUrl/",
|
) {
|
||||||
Qualities.Unknown.value,
|
this.referer = "$mainUrl/"
|
||||||
type = INFER_TYPE
|
this.quality = Qualities.Unknown.value
|
||||||
)
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
class StreamM4u : XStreamCdn() {
|
class StreamM4u : XStreamCdn() {
|
||||||
override val name: String = "StreamM4u"
|
override val name: String = "StreamM4u"
|
||||||
@ -120,13 +121,14 @@ open class XStreamCdn : ExtractorApi() {
|
|||||||
if (it.success && it.data != null) {
|
if (it.success && it.data != null) {
|
||||||
it.data.map { source ->
|
it.data.map { source ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
name,
|
name,
|
||||||
name = name,
|
name = name,
|
||||||
source.file,
|
source.file,
|
||||||
url,
|
) {
|
||||||
getQualityFromName(source.label),
|
this.referer = url
|
||||||
)
|
this.quality = getQualityFromName(source.label)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
open class YourUpload: ExtractorApi() {
|
open class YourUpload: ExtractorApi() {
|
||||||
override val name = "Yourupload"
|
override val name = "Yourupload"
|
||||||
@ -26,13 +27,14 @@ open class YourUpload: ExtractorApi() {
|
|||||||
}}"
|
}}"
|
||||||
)
|
)
|
||||||
sources.add(
|
sources.add(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source = name,
|
source = name,
|
||||||
name = name,
|
name = name,
|
||||||
url = link!!.file,
|
url = link!!.file,
|
||||||
referer = url,
|
) {
|
||||||
quality = getQualityFromName(quality)
|
this.referer = url
|
||||||
)
|
this.quality = getQualityFromName(quality)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,9 @@ import com.lagradost.cloudstream3.SubtitleFile
|
|||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.schemaStripRegex
|
import com.lagradost.cloudstream3.utils.schemaStripRegex
|
||||||
import org.schabi.newpipe.extractor.ServiceList
|
import org.schabi.newpipe.extractor.ServiceList
|
||||||
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor
|
import org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor
|
||||||
@ -73,13 +75,11 @@ open class YoutubeExtractor : ExtractorApi() {
|
|||||||
}
|
}
|
||||||
ytVideos[url]?.let {
|
ytVideos[url]?.let {
|
||||||
callback(
|
callback(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
this.name,
|
source = this.name,
|
||||||
this.name,
|
name = this.name,
|
||||||
it,
|
url = it,
|
||||||
"",
|
type = ExtractorLinkType.M3U8
|
||||||
Qualities.Unknown.value,
|
|
||||||
isM3u8 = true
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ import com.lagradost.cloudstream3.utils.AppUtils
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.getQualityFromName
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import javax.crypto.Cipher
|
import javax.crypto.Cipher
|
||||||
@ -124,13 +125,14 @@ object GogoHelper {
|
|||||||
).forEach(sourceCallback)
|
).forEach(sourceCallback)
|
||||||
} else {
|
} else {
|
||||||
sourceCallback.invoke(
|
sourceCallback.invoke(
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
mainApiName,
|
mainApiName,
|
||||||
mainApiName,
|
mainApiName,
|
||||||
source.file,
|
source.file,
|
||||||
mainUrl,
|
) {
|
||||||
getQualityFromName(source.label),
|
this.referer = mainUrl
|
||||||
)
|
this.quality = getQualityFromName(source.label)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,10 @@ package com.lagradost.cloudstream3.extractors.helper
|
|||||||
import com.lagradost.cloudstream3.SubtitleFile
|
import com.lagradost.cloudstream3.SubtitleFile
|
||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||||
|
|
||||||
class VstreamhubHelper {
|
class VstreamhubHelper {
|
||||||
companion object {
|
companion object {
|
||||||
@ -28,14 +30,15 @@ class VstreamhubHelper {
|
|||||||
val linkUrl =
|
val linkUrl =
|
||||||
aa.substring(startString.length + 1, aa.indexOf("\",")).trim()
|
aa.substring(startString.length + 1, aa.indexOf("\",")).trim()
|
||||||
//Log.i(baseName, "Result => (linkUrl) ${linkUrl}")
|
//Log.i(baseName, "Result => (linkUrl) ${linkUrl}")
|
||||||
val exlink = ExtractorLink(
|
val exlink = newExtractorLink(
|
||||||
name = "$baseName m3u8",
|
name = "$baseName m3u8",
|
||||||
source = baseName,
|
source = baseName,
|
||||||
url = linkUrl,
|
url = linkUrl,
|
||||||
quality = Qualities.Unknown.value,
|
type = ExtractorLinkType.M3U8
|
||||||
referer = url,
|
) {
|
||||||
isM3u8 = true
|
this.quality = Qualities.Unknown.value
|
||||||
)
|
this.referer = url
|
||||||
|
}
|
||||||
callback.invoke(exlink)
|
callback.invoke(exlink)
|
||||||
}
|
}
|
||||||
if (innerText.contains("playerInstance")) {
|
if (innerText.contains("playerInstance")) {
|
||||||
|
@ -325,12 +325,12 @@ data class ExtractorLinkPlayList(
|
|||||||
override val source: String,
|
override val source: String,
|
||||||
override val name: String,
|
override val name: String,
|
||||||
val playlist: List<PlayListItem>,
|
val playlist: List<PlayListItem>,
|
||||||
override val referer: String,
|
override var referer: String,
|
||||||
override val quality: Int,
|
override var quality: Int,
|
||||||
override val headers: Map<String, String> = mapOf(),
|
override var headers: Map<String, String> = mapOf(),
|
||||||
/** Used for getExtractorVerifierJob() */
|
/** Used for getExtractorVerifierJob() */
|
||||||
override val extractorData: String? = null,
|
override var extractorData: String? = null,
|
||||||
override val type: ExtractorLinkType,
|
override var type: ExtractorLinkType,
|
||||||
) : ExtractorLink(
|
) : ExtractorLink(
|
||||||
source = source,
|
source = source,
|
||||||
name = name,
|
name = name,
|
||||||
@ -435,6 +435,50 @@ val WIDEVINE_UUID = UUID(-0x121074568629b532L, -0x5c37d8232ae2de13L)
|
|||||||
*/
|
*/
|
||||||
val PLAYREADY_UUID = UUID(-0x65fb0f8667bfbd7aL, -0x546d19a41f77a06bL)
|
val PLAYREADY_UUID = UUID(-0x65fb0f8667bfbd7aL, -0x546d19a41f77a06bL)
|
||||||
|
|
||||||
|
suspend fun newExtractorLink(
|
||||||
|
source: String,
|
||||||
|
name: String,
|
||||||
|
url: String,
|
||||||
|
type: ExtractorLinkType? = null,
|
||||||
|
initializer: suspend ExtractorLink.() -> Unit = { }
|
||||||
|
): ExtractorLink {
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION_ERROR")
|
||||||
|
val builder =
|
||||||
|
ExtractorLink(
|
||||||
|
source = source,
|
||||||
|
name = name,
|
||||||
|
url = url,
|
||||||
|
type = type ?: INFER_TYPE
|
||||||
|
)
|
||||||
|
|
||||||
|
builder.initializer()
|
||||||
|
return builder
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun newDrmExtractorLink(
|
||||||
|
source: String,
|
||||||
|
name: String,
|
||||||
|
url: String,
|
||||||
|
type: ExtractorLinkType? = null,
|
||||||
|
uuid: UUID,
|
||||||
|
initializer: suspend DrmExtractorLink.() -> Unit = { }
|
||||||
|
): DrmExtractorLink {
|
||||||
|
|
||||||
|
@Suppress("DEPRECATION_ERROR")
|
||||||
|
val builder =
|
||||||
|
DrmExtractorLink(
|
||||||
|
source = source,
|
||||||
|
name = name,
|
||||||
|
url = url,
|
||||||
|
uuid = uuid,
|
||||||
|
type = type ?: INFER_TYPE
|
||||||
|
)
|
||||||
|
|
||||||
|
builder.initializer()
|
||||||
|
return builder
|
||||||
|
}
|
||||||
|
|
||||||
/** Class holds extracted DRM media info to be passed to the player.
|
/** Class holds extracted DRM media info to be passed to the player.
|
||||||
* @property source Name of the media source, appears on player layout.
|
* @property source Name of the media source, appears on player layout.
|
||||||
* @property name Title of the media, appears on player layout.
|
* @property name Title of the media, appears on player layout.
|
||||||
@ -450,16 +494,17 @@ val PLAYREADY_UUID = UUID(-0x65fb0f8667bfbd7aL, -0x546d19a41f77a06bL)
|
|||||||
* @property kty Key type "oct" (octet sequence) by default
|
* @property kty Key type "oct" (octet sequence) by default
|
||||||
* @property keyRequestParameters Parameters that will used to request the key.
|
* @property keyRequestParameters Parameters that will used to request the key.
|
||||||
* */
|
* */
|
||||||
|
@Suppress("DEPRECATION_ERROR")
|
||||||
open class DrmExtractorLink private constructor(
|
open class DrmExtractorLink private constructor(
|
||||||
override val source: String,
|
override val source: String,
|
||||||
override val name: String,
|
override val name: String,
|
||||||
override val url: String,
|
override val url: String,
|
||||||
override val referer: String,
|
override var referer: String,
|
||||||
override val quality: Int,
|
override var quality: Int,
|
||||||
override val headers: Map<String, String> = mapOf(),
|
override var headers: Map<String, String> = mapOf(),
|
||||||
/** Used for getExtractorVerifierJob() */
|
/** Used for getExtractorVerifierJob() */
|
||||||
override val extractorData: String? = null,
|
override var extractorData: String? = null,
|
||||||
override val type: ExtractorLinkType,
|
override var type: ExtractorLinkType,
|
||||||
open var kid: String? = null,
|
open var kid: String? = null,
|
||||||
open var key: String? = null,
|
open var key: String? = null,
|
||||||
open var uuid: UUID,
|
open var uuid: UUID,
|
||||||
@ -469,6 +514,42 @@ open class DrmExtractorLink private constructor(
|
|||||||
) : ExtractorLink(
|
) : ExtractorLink(
|
||||||
source, name, url, referer, quality, type, headers, extractorData
|
source, name, url, referer, quality, type, headers, extractorData
|
||||||
) {
|
) {
|
||||||
|
@Deprecated("Use newDrmExtractorLink", level = DeprecationLevel.ERROR)
|
||||||
|
constructor(
|
||||||
|
source: String,
|
||||||
|
name: String,
|
||||||
|
url: String,
|
||||||
|
referer: String? = null,
|
||||||
|
quality: Int? = null,
|
||||||
|
/** the type of the media, use INFER_TYPE if you want to auto infer the type from the url */
|
||||||
|
type: ExtractorLinkType? = INFER_TYPE,
|
||||||
|
headers: Map<String, String> = mapOf(),
|
||||||
|
/** Used for getExtractorVerifierJob() */
|
||||||
|
extractorData: String? = null,
|
||||||
|
kid: String? = null,
|
||||||
|
key: String? = null,
|
||||||
|
uuid: UUID = CLEARKEY_UUID,
|
||||||
|
kty: String? = "oct",
|
||||||
|
keyRequestParameters: HashMap<String, String> = hashMapOf(),
|
||||||
|
licenseUrl: String? = null,
|
||||||
|
) : this(
|
||||||
|
source = source,
|
||||||
|
name = name,
|
||||||
|
url = url,
|
||||||
|
referer = referer ?: "",
|
||||||
|
quality = quality ?: Qualities.Unknown.value,
|
||||||
|
headers = headers,
|
||||||
|
extractorData = extractorData,
|
||||||
|
type = type ?: inferTypeFromUrl(url),
|
||||||
|
kid = kid,
|
||||||
|
key = key,
|
||||||
|
uuid = uuid,
|
||||||
|
keyRequestParameters = keyRequestParameters,
|
||||||
|
kty = kty,
|
||||||
|
licenseUrl = licenseUrl,
|
||||||
|
)
|
||||||
|
|
||||||
|
@Deprecated("Use newDrmExtractorLink", level = DeprecationLevel.ERROR)
|
||||||
constructor(
|
constructor(
|
||||||
source: String,
|
source: String,
|
||||||
name: String,
|
name: String,
|
||||||
@ -518,12 +599,12 @@ open class ExtractorLink constructor(
|
|||||||
open val source: String,
|
open val source: String,
|
||||||
open val name: String,
|
open val name: String,
|
||||||
override val url: String,
|
override val url: String,
|
||||||
override val referer: String,
|
override var referer: String,
|
||||||
open val quality: Int,
|
open var quality: Int,
|
||||||
override val headers: Map<String, String> = mapOf(),
|
override var headers: Map<String, String> = mapOf(),
|
||||||
/** Used for getExtractorVerifierJob() */
|
/** Used for getExtractorVerifierJob() */
|
||||||
open val extractorData: String? = null,
|
open var extractorData: String? = null,
|
||||||
open val type: ExtractorLinkType,
|
open var type: ExtractorLinkType,
|
||||||
) : IDownloadableMinimum {
|
) : IDownloadableMinimum {
|
||||||
val isM3u8: Boolean get() = type == ExtractorLinkType.M3U8
|
val isM3u8: Boolean get() = type == ExtractorLinkType.M3U8
|
||||||
val isDash: Boolean get() = type == ExtractorLinkType.DASH
|
val isDash: Boolean get() = type == ExtractorLinkType.DASH
|
||||||
@ -558,6 +639,30 @@ open class ExtractorLink constructor(
|
|||||||
return headers
|
return headers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated("Use newExtractorLink", level = DeprecationLevel.ERROR)
|
||||||
|
constructor(
|
||||||
|
source: String,
|
||||||
|
name: String,
|
||||||
|
url: String,
|
||||||
|
referer: String? = null,
|
||||||
|
quality: Int? = null,
|
||||||
|
/** the type of the media, use INFER_TYPE if you want to auto infer the type from the url */
|
||||||
|
type: ExtractorLinkType? = INFER_TYPE,
|
||||||
|
headers: Map<String, String> = mapOf(),
|
||||||
|
/** Used for getExtractorVerifierJob() */
|
||||||
|
extractorData: String? = null,
|
||||||
|
) : this(
|
||||||
|
source = source,
|
||||||
|
name = name,
|
||||||
|
url = url,
|
||||||
|
referer = referer ?: "",
|
||||||
|
quality = quality ?: Qualities.Unknown.value,
|
||||||
|
headers = headers,
|
||||||
|
extractorData = extractorData,
|
||||||
|
type = type ?: inferTypeFromUrl(url)
|
||||||
|
)
|
||||||
|
|
||||||
|
@Deprecated("Use newExtractorLink", level = DeprecationLevel.ERROR)
|
||||||
constructor(
|
constructor(
|
||||||
source: String,
|
source: String,
|
||||||
name: String,
|
name: String,
|
||||||
@ -584,6 +689,8 @@ open class ExtractorLink constructor(
|
|||||||
* Old constructor without isDash, allows for backwards compatibility with extensions.
|
* Old constructor without isDash, allows for backwards compatibility with extensions.
|
||||||
* Should be removed after all extensions have updated their cloudstream.jar
|
* Should be removed after all extensions have updated their cloudstream.jar
|
||||||
**/
|
**/
|
||||||
|
@Suppress("DEPRECATION_ERROR")
|
||||||
|
@Deprecated("Use newExtractorLink", level = DeprecationLevel.ERROR)
|
||||||
constructor(
|
constructor(
|
||||||
source: String,
|
source: String,
|
||||||
name: String,
|
name: String,
|
||||||
@ -596,6 +703,7 @@ open class ExtractorLink constructor(
|
|||||||
extractorData: String? = null
|
extractorData: String? = null
|
||||||
) : this(source, name, url, referer, quality, isM3u8, headers, extractorData, false)
|
) : this(source, name, url, referer, quality, isM3u8, headers, extractorData, false)
|
||||||
|
|
||||||
|
@Deprecated("Use newExtractorLink", level = DeprecationLevel.ERROR)
|
||||||
constructor(
|
constructor(
|
||||||
source: String,
|
source: String,
|
||||||
name: String,
|
name: String,
|
||||||
@ -729,7 +837,7 @@ suspend fun loadExtractor(
|
|||||||
if (compareUrl.startsWith(extractor.mainUrl.replace(schemaStripRegex, ""))) {
|
if (compareUrl.startsWith(extractor.mainUrl.replace(schemaStripRegex, ""))) {
|
||||||
try {
|
try {
|
||||||
extractor.getUrl(currentUrl, referer, subtitleCallback, callback)
|
extractor.getUrl(currentUrl, referer, subtitleCallback, callback)
|
||||||
} catch (e : Exception) {
|
} catch (e: Exception) {
|
||||||
logError(e)
|
logError(e)
|
||||||
// Rethrow if we have timed out
|
// Rethrow if we have timed out
|
||||||
if (e is CancellationException) {
|
if (e is CancellationException) {
|
||||||
@ -750,7 +858,7 @@ suspend fun loadExtractor(
|
|||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
extractor.getUrl(currentUrl, referer, subtitleCallback, callback)
|
extractor.getUrl(currentUrl, referer, subtitleCallback, callback)
|
||||||
} catch (e : Exception) {
|
} catch (e: Exception) {
|
||||||
logError(e)
|
logError(e)
|
||||||
// Rethrow if we have timed out
|
// Rethrow if we have timed out
|
||||||
if (e is CancellationException) {
|
if (e is CancellationException) {
|
||||||
@ -1084,7 +1192,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||||||
InternetArchive(),
|
InternetArchive(),
|
||||||
VidStack(),
|
VidStack(),
|
||||||
GDMirrorbot(),
|
GDMirrorbot(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
fun getExtractorApiFromName(name: String): ExtractorApi {
|
fun getExtractorApiFromName(name: String): ExtractorApi {
|
||||||
|
@ -53,15 +53,16 @@ object M3u8Helper2 {
|
|||||||
), null
|
), null
|
||||||
)
|
)
|
||||||
.map { stream ->
|
.map { stream ->
|
||||||
ExtractorLink(
|
newExtractorLink(
|
||||||
source,
|
source,
|
||||||
name = name,
|
name = name,
|
||||||
stream.streamUrl,
|
stream.streamUrl,
|
||||||
referer,
|
type = ExtractorLinkType.M3U8
|
||||||
stream.quality ?: Qualities.Unknown.value,
|
) {
|
||||||
true,
|
this.referer = referer
|
||||||
stream.headers,
|
this.quality = stream.quality ?: Qualities.Unknown.value
|
||||||
)
|
this.headers = stream.headers
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user