mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Extractor: added Moviesapi and fix some extractors (#504)
* Extractor: added Pixeldrain, Wibufile and fix some extractors * Extractor: added Moviesapi and fix some extractors --------- Co-authored-by: Sofie99 <Sofie99@gmail.com>
This commit is contained in:
parent
9237817bd3
commit
927453d9fe
3 changed files with 20 additions and 22 deletions
|
@ -12,6 +12,11 @@ import javax.crypto.spec.IvParameterSpec
|
||||||
import javax.crypto.spec.PBEKeySpec
|
import javax.crypto.spec.PBEKeySpec
|
||||||
import javax.crypto.spec.SecretKeySpec
|
import javax.crypto.spec.SecretKeySpec
|
||||||
|
|
||||||
|
class Moviesapi : Chillx() {
|
||||||
|
override val name = "Moviesapi"
|
||||||
|
override val mainUrl = "https://w1.moviesapi.club"
|
||||||
|
}
|
||||||
|
|
||||||
class Bestx : Chillx() {
|
class Bestx : Chillx() {
|
||||||
override val name = "Bestx"
|
override val name = "Bestx"
|
||||||
override val mainUrl = "https://bestx.stream"
|
override val mainUrl = "https://bestx.stream"
|
||||||
|
@ -27,7 +32,7 @@ open class Chillx : ExtractorApi() {
|
||||||
override val requiresReferer = true
|
override val requiresReferer = true
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val KEY = "4VqE3#N7zt&HEP^a"
|
private const val KEY = "11x&W5UBrcqn\$9Yl"
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getUrl(
|
override suspend fun getUrl(
|
||||||
|
@ -45,7 +50,7 @@ open class Chillx : ExtractorApi() {
|
||||||
val encData = AppUtils.tryParseJson<AESData>(base64Decode(master ?: return))
|
val encData = AppUtils.tryParseJson<AESData>(base64Decode(master ?: return))
|
||||||
val decrypt = cryptoAESHandler(encData ?: return, KEY, false)
|
val decrypt = cryptoAESHandler(encData ?: return, KEY, false)
|
||||||
|
|
||||||
val source = Regex("""sources:\s*\[\{"file":"([^"]+)""").find(decrypt)?.groupValues?.get(1)
|
val source = Regex(""""?file"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1)
|
||||||
val tracks = Regex("""tracks:\s*\[(.+)]""").find(decrypt)?.groupValues?.get(1)
|
val tracks = Regex("""tracks:\s*\[(.+)]""").find(decrypt)?.groupValues?.get(1)
|
||||||
|
|
||||||
// required
|
// required
|
||||||
|
|
|
@ -65,27 +65,19 @@ open class Filesim : ExtractorApi() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val response = app.get(url, referer = referer).document
|
val response = app.get(url, referer = referer)
|
||||||
response.select("script[type=text/javascript]").map { script ->
|
val script = if (!getPacked(response.text).isNullOrEmpty()) {
|
||||||
if (script.data().contains(Regex("eval\\(function\\(p,a,c,k,e,[rd]"))) {
|
getAndUnpack(response.text)
|
||||||
val unpackedscript = getAndUnpack(script.data())
|
} else {
|
||||||
val m3u8Regex = Regex("file.\"(.*?m3u8.*?)\"")
|
response.document.selectFirst("script:containsData(sources:)")?.data()
|
||||||
val m3u8 = m3u8Regex.find(unpackedscript)?.destructured?.component1() ?: ""
|
}
|
||||||
if (m3u8.isNotEmpty()) {
|
val m3u8 =
|
||||||
|
Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return)?.groupValues?.getOrNull(1)
|
||||||
generateM3u8(
|
generateM3u8(
|
||||||
name,
|
name,
|
||||||
m3u8,
|
m3u8 ?: return,
|
||||||
mainUrl
|
mainUrl
|
||||||
).forEach(callback)
|
).forEach(callback)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* private data class ResponseSource(
|
|
||||||
@JsonProperty("file") val file: String,
|
|
||||||
@JsonProperty("type") val type: String?,
|
|
||||||
@JsonProperty("label") val label: String?
|
|
||||||
) */
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -357,6 +357,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
||||||
DesuDrive(),
|
DesuDrive(),
|
||||||
|
|
||||||
Chillx(),
|
Chillx(),
|
||||||
|
Moviesapi(),
|
||||||
Watchx(),
|
Watchx(),
|
||||||
Bestx(),
|
Bestx(),
|
||||||
Keephealth(),
|
Keephealth(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue