mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
added fallback in Shivamhw and fixed hdfilmcehennemi
This commit is contained in:
parent
db046fe123
commit
fb566a6796
4 changed files with 17 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 8
|
version = 9
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -168,25 +168,20 @@ class Hdfilmcehennemi : MainAPI() {
|
||||||
url,
|
url,
|
||||||
referer = "${mainUrl}/"
|
referer = "${mainUrl}/"
|
||||||
).document.select("script")
|
).document.select("script")
|
||||||
.find { it.data().contains("sources:") }?.data()
|
.find { it.data().contains("sources:") }?.data() ?: return
|
||||||
val videoData = script?.substringAfter("sources: [")
|
val videoData = getAndUnpack(script).substringAfter("file_link=\"").substringBefore("\";")
|
||||||
?.substringBefore("],")?.addMarks("file")
|
val subData = script.substringAfter("tracks: [").substringBefore("]")
|
||||||
val subData = script?.substringAfter("tracks: [")?.substringBefore("]")?.addMarks("file")
|
|
||||||
?.addMarks("label")?.addMarks("kind")
|
|
||||||
|
|
||||||
tryParseJson<Source>(videoData)?.file?.let { m3uLink ->
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
source,
|
source,
|
||||||
source,
|
source,
|
||||||
m3uLink,
|
base64Decode(videoData),
|
||||||
"$mainUrl/",
|
"$mainUrl/",
|
||||||
Qualities.Unknown.value,
|
Qualities.Unknown.value,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
|
||||||
tryParseJson<List<SubSource>>("[${subData}]")
|
tryParseJson<List<SubSource>>("[${subData}]")
|
||||||
?.filter { it.kind == "captions" }?.map {
|
?.filter { it.kind == "captions" }?.map {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
|
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 124
|
version = 125
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -2872,11 +2872,13 @@ object SoraExtractor : SoraStream() {
|
||||||
}?.map { source ->
|
}?.map { source ->
|
||||||
val quality = getIndexQuality(source.first)
|
val quality = getIndexQuality(source.first)
|
||||||
val tags = getIndexQualityTags(source.first)
|
val tags = getIndexQualityTags(source.first)
|
||||||
|
val video = source.third?.removePrefix("vlc://") ?: return@map
|
||||||
|
if(!app.get(video).isSuccessful) return@map
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
"Shivamhw",
|
"Shivamhw",
|
||||||
"Shivamhw $tags [${source.second}]",
|
"Shivamhw $tags [${source.second}]",
|
||||||
source.third?.removePrefix("vlc://") ?: return@map,
|
video,
|
||||||
"",
|
"",
|
||||||
quality,
|
quality,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue