Updated Rebahin domain & added filmxy again in SoraExtractor

This commit is contained in:
hexated 2022-11-10 11:28:02 +07:00
parent 5ef54a80cd
commit 50cbdacc0c
7 changed files with 16 additions and 16 deletions

View file

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

View file

@ -3,7 +3,7 @@ package com.hexated
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
class Kitanonton : RebahinProvider() { class Kitanonton : RebahinProvider() {
override var mainUrl = "https://124.150.139.91" override var mainUrl = "http://kitanonton.org"
override var name = "KitaNonton" override var name = "KitaNonton"
override var mainServer = "https://199.87.210.226" override var mainServer = "https://199.87.210.226"

View file

@ -13,7 +13,7 @@ import org.jsoup.nodes.Element
import java.net.URI import java.net.URI
open class RebahinProvider : MainAPI() { open class RebahinProvider : MainAPI() {
override var mainUrl = "http://104.237.198.196" override var mainUrl = "http://104.237.198.197"
override var name = "Rebahin" override var name = "Rebahin"
override val hasMainPage = true override val hasMainPage = true
override var lang = "id" override var lang = "id"

View file

@ -10,6 +10,6 @@ class RebahinProviderPlugin: Plugin() {
override fun load(context: Context) { override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly. // All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(RebahinProvider()) registerMainAPI(RebahinProvider())
registerMainAPI(Kitanonton()) // registerMainAPI(Kitanonton())
} }
} }

View file

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

View file

@ -11,6 +11,7 @@ import com.lagradost.nicehttp.Session
import com.lagradost.nicehttp.requestCreator import com.lagradost.nicehttp.requestCreator
import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.HttpUrl.Companion.toHttpUrl
import com.google.gson.JsonParser import com.google.gson.JsonParser
import com.lagradost.cloudstream3.utils.AppUtils.toJson
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.RequestBody.Companion.toRequestBody
import java.net.URI import java.net.URI
@ -622,12 +623,8 @@ object SoraExtractor : SoraStream() {
name, name,
name, name,
link, link,
"$noverseAPI/", "",
getQualityFromName("${quality?.substringBefore("p")?.trim()}p"), getQualityFromName("${quality?.substringBefore("p")?.trim()}p"),
// headers = mapOf(
// "Origin" to noverseAPI,
// "Range" to "bytes=0-"
// )
) )
) )
} }
@ -654,7 +651,10 @@ object SoraExtractor : SoraStream() {
"PHPSESSID" to filmxyCookies.phpsessid "PHPSESSID" to filmxyCookies.phpsessid
) )
val doc = session.get(url, cookies = cookiesDoc).document val request = session.get(url, cookies = cookiesDoc)
if(!request.isSuccessful) return
val doc = request.document
val script = doc.selectFirst("script:containsData(var isSingle)")?.data().toString() val script = doc.selectFirst("script:containsData(var isSingle)")?.data().toString()
val sourcesData = Regex("listSE\\s*=\\s?(.*?),[\\n|\\s]").find(script)?.groupValues?.get(1) val sourcesData = Regex("listSE\\s*=\\s?(.*?),[\\n|\\s]").find(script)?.groupValues?.get(1)
val sourcesDetail = Regex("linkDetails\\s*=\\s?(.*?),[\\n|\\s]").find(script)?.groupValues?.get(1) val sourcesDetail = Regex("linkDetails\\s*=\\s?(.*?),[\\n|\\s]").find(script)?.groupValues?.get(1)
@ -697,7 +697,7 @@ object SoraExtractor : SoraStream() {
"X-Requested-With" to "XMLHttpRequest", "X-Requested-With" to "XMLHttpRequest",
), ),
cookies = cookiesJson cookies = cookiesJson
).text.let { JsonParser().parse(it).asJsonObject } ).text.let { JsonParser.parseString(it).asJsonObject }
sources.map { source -> sources.map { source ->
val src = source.asString val src = source.asString
@ -819,7 +819,7 @@ object SoraExtractor : SoraStream() {
val json = jsonResponse.parsedSafe<Load>()?.data?.episodeVo?.first { it.seriesNo == (episode ?: 0) } val json = jsonResponse.parsedSafe<Load>()?.data?.episodeVo?.first { it.seriesNo == (episode ?: 0) }
json?.definitionList?.apmap { video -> json?.definitionList?.apmap { video ->
delay(1000) delay(2000)
app.get( app.get(
"${vipAPI}/media/previewInfo?category=${type}&contentId=${id}&episodeId=${json.id}&definition=${video.code}", "${vipAPI}/media/previewInfo?category=${type}&contentId=${id}&episodeId=${json.id}&definition=${video.code}",
headers = headers headers = headers

View file

@ -441,9 +441,9 @@ open class SoraStream : TmdbProvider() {
callback callback
) )
}, },
// { {
// invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback) invokeFilmxy(res.imdbId, res.season, res.episode, subtitleCallback, callback)
// }, },
{ {
invokeKimcartoon(res.title, res.season, res.episode, subtitleCallback, callback) invokeKimcartoon(res.title, res.season, res.episode, subtitleCallback, callback)
}, },