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
app/src/main/java/com/lagradost/cloudstream3
|
@ -12,6 +12,11 @@ import javax.crypto.spec.IvParameterSpec
|
|||
import javax.crypto.spec.PBEKeySpec
|
||||
import javax.crypto.spec.SecretKeySpec
|
||||
|
||||
class Moviesapi : Chillx() {
|
||||
override val name = "Moviesapi"
|
||||
override val mainUrl = "https://w1.moviesapi.club"
|
||||
}
|
||||
|
||||
class Bestx : Chillx() {
|
||||
override val name = "Bestx"
|
||||
override val mainUrl = "https://bestx.stream"
|
||||
|
@ -27,7 +32,7 @@ open class Chillx : ExtractorApi() {
|
|||
override val requiresReferer = true
|
||||
|
||||
companion object {
|
||||
private const val KEY = "4VqE3#N7zt&HEP^a"
|
||||
private const val KEY = "11x&W5UBrcqn\$9Yl"
|
||||
}
|
||||
|
||||
override suspend fun getUrl(
|
||||
|
@ -45,7 +50,7 @@ open class Chillx : ExtractorApi() {
|
|||
val encData = AppUtils.tryParseJson<AESData>(base64Decode(master ?: return))
|
||||
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)
|
||||
|
||||
// required
|
||||
|
|
|
@ -65,27 +65,19 @@ open class Filesim : ExtractorApi() {
|
|||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val response = app.get(url, referer = referer).document
|
||||
response.select("script[type=text/javascript]").map { script ->
|
||||
if (script.data().contains(Regex("eval\\(function\\(p,a,c,k,e,[rd]"))) {
|
||||
val unpackedscript = getAndUnpack(script.data())
|
||||
val m3u8Regex = Regex("file.\"(.*?m3u8.*?)\"")
|
||||
val m3u8 = m3u8Regex.find(unpackedscript)?.destructured?.component1() ?: ""
|
||||
if (m3u8.isNotEmpty()) {
|
||||
generateM3u8(
|
||||
name,
|
||||
m3u8,
|
||||
mainUrl
|
||||
).forEach(callback)
|
||||
}
|
||||
}
|
||||
val response = app.get(url, referer = referer)
|
||||
val script = if (!getPacked(response.text).isNullOrEmpty()) {
|
||||
getAndUnpack(response.text)
|
||||
} else {
|
||||
response.document.selectFirst("script:containsData(sources:)")?.data()
|
||||
}
|
||||
val m3u8 =
|
||||
Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return)?.groupValues?.getOrNull(1)
|
||||
generateM3u8(
|
||||
name,
|
||||
m3u8 ?: return,
|
||||
mainUrl
|
||||
).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(),
|
||||
|
||||
Chillx(),
|
||||
Moviesapi(),
|
||||
Watchx(),
|
||||
Bestx(),
|
||||
Keephealth(),
|
||||
|
|
Loading…
Reference in a new issue