added fallback in Shivamhw and fixed hdfilmcehennemi

This commit is contained in:
hexated 2023-04-30 00:58:58 +07:00
parent db046fe123
commit fb566a6796
4 changed files with 17 additions and 20 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 8
version = 9
cloudstream {

View file

@ -168,25 +168,20 @@ class Hdfilmcehennemi : MainAPI() {
url,
referer = "${mainUrl}/"
).document.select("script")
.find { it.data().contains("sources:") }?.data()
val videoData = script?.substringAfter("sources: [")
?.substringBefore("],")?.addMarks("file")
val subData = script?.substringAfter("tracks: [")?.substringBefore("]")?.addMarks("file")
?.addMarks("label")?.addMarks("kind")
tryParseJson<Source>(videoData)?.file?.let { m3uLink ->
callback.invoke(
ExtractorLink(
source,
source,
m3uLink,
"$mainUrl/",
Qualities.Unknown.value,
true
)
.find { it.data().contains("sources:") }?.data() ?: return
val videoData = getAndUnpack(script).substringAfter("file_link=\"").substringBefore("\";")
val subData = script.substringAfter("tracks: [").substringBefore("]")
callback.invoke(
ExtractorLink(
source,
source,
base64Decode(videoData),
"$mainUrl/",
Qualities.Unknown.value,
true
)
}
)
tryParseJson<List<SubSource>>("[${subData}]")
?.filter { it.kind == "captions" }?.map {

View file

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties
// use an integer for version numbers
version = 124
version = 125
android {
defaultConfig {

View file

@ -2872,11 +2872,13 @@ object SoraExtractor : SoraStream() {
}?.map { source ->
val quality = getIndexQuality(source.first)
val tags = getIndexQualityTags(source.first)
val video = source.third?.removePrefix("vlc://") ?: return@map
if(!app.get(video).isSuccessful) return@map
callback.invoke(
ExtractorLink(
"Shivamhw",
"Shivamhw $tags [${source.second}]",
source.third?.removePrefix("vlc://") ?: return@map,
video,
"",
quality,
)