fixed Rebahin Sources

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

View File

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

View File

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

View File

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