fixed Rebahin Sources

This commit is contained in:
hexated 2022-10-14 19:02:39 +07:00
parent 87aadc3986
commit 56b3b079c7
3 changed files with 8 additions and 13 deletions

View file

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

View file

@ -180,17 +180,12 @@ open class RebahinProvider : MainAPI() {
document.select("script").find { it.data().contains("config =") }?.data()?.let { script ->
Regex("\"file\":\\s?\"(.+.m3u8)\"").find(script)?.groupValues?.getOrNull(1)
?.let { link ->
sourceCallback.invoke(
ExtractorLink(
source = name,
name = name,
url = link,
referer = "$mainServer/",
quality = Qualities.Unknown.value,
isM3u8 = true,
headers = mapOf("Accept" to "*/*", "Origin" to mainServer)
)
)
M3u8Helper.generateM3u8(
name,
link,
referer = "$mainServer/",
headers = mapOf("Accept" to "*/*", "Origin" to mainServer)
).forEach(sourceCallback)
}
val subData =

View file

@ -77,7 +77,7 @@ subprojects {
// but you dont need to include any of them if you dont need them
// https://github.com/recloudstream/cloudstream/blob/master/app/build.gradle
implementation(kotlin("stdlib")) // adds standard kotlin features, like listOf, mapOf etc
implementation("com.github.Blatzar:NiceHttp:0.3.2") // http library
implementation("com.github.Blatzar:NiceHttp:0.3.3") // http library
implementation("org.jsoup:jsoup:1.13.1") // html parser
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.13.1")
implementation("io.karn:khttp-android:0.1.2")