This commit is contained in:
hexated 2023-02-21 03:35:47 +07:00
parent 15bf2e5866
commit 2c82e903e8
2 changed files with 12 additions and 15 deletions

View file

@ -327,7 +327,6 @@ object SoraExtractor : SoraStream() {
), headers = mapOf("X-Requested-With" to "XMLHttpRequest") ), headers = mapOf("X-Requested-With" to "XMLHttpRequest")
).parsedSafe<HdMovieBoxIframe>()?.apiIframe ?: return ).parsedSafe<HdMovieBoxIframe>()?.apiIframe ?: return
delay(1000)
val iframe = app.get(iframeUrl, referer = "$hdMovieBoxAPI/").document.selectFirst("iframe") val iframe = app.get(iframeUrl, referer = "$hdMovieBoxAPI/").document.selectFirst("iframe")
?.attr("src") ?.attr("src")
val base = getBaseUrl(iframe ?: return) val base = getBaseUrl(iframe ?: return)
@ -947,19 +946,23 @@ object SoraExtractor : SoraStream() {
resDetail.episodes?.find { it.number == episode }?.id resDetail.episodes?.find { it.number == episode }?.id
} }
delay(2000)
app.get( app.get(
"$kissKhAPI/api/DramaList/Episode/$epsId.png?err=false&ts=&time=", "$kissKhAPI/api/DramaList/Episode/$epsId.png?err=false&ts=&time=",
referer = "$kissKhAPI/Drama/${getKisskhTitle(contentTitle)}/Episode-${episode ?: 0}?id=$id&ep=$epsId&page=0&pageSize=100" referer = "$kissKhAPI/Drama/${getKisskhTitle(contentTitle)}/Episode-${episode ?: 0}?id=$id&ep=$epsId&page=0&pageSize=100"
).parsedSafe<KisskhSources>()?.let { source -> ).parsedSafe<KisskhSources>()?.let { source ->
listOf(source.video, source.thirdParty).apmap { link -> listOf(source.video, source.thirdParty).apmap { link ->
if (link?.contains(".m3u8") == true) { if (link?.contains(".m3u8") == true) {
M3u8Helper.generateM3u8( callback.invoke(
"Kisskh", ExtractorLink(
link, "Kisskh",
referer = "$kissKhAPI/", "Kisskh",
headers = mapOf("Origin" to kissKhAPI) link,
).forEach(callback) referer = "$kissKhAPI/",
Qualities.P720.value,
true,
headers = mapOf("Origin" to kissKhAPI)
)
)
} else { } else {
loadExtractor( loadExtractor(
link?.substringBefore("=http") ?: return@apmap null, link?.substringBefore("=http") ?: return@apmap null,
@ -1246,7 +1249,6 @@ object SoraExtractor : SoraStream() {
} }
sources.apmap { (quality, link) -> sources.apmap { (quality, link) ->
delay(2000)
val driveLink = bypassHrefli(link ?: return@apmap null) val driveLink = bypassHrefli(link ?: return@apmap null)
val base = getBaseUrl(driveLink ?: return@apmap null) val base = getBaseUrl(driveLink ?: return@apmap null)
val resDoc = app.get(driveLink).text.substringAfter("replace(\"") val resDoc = app.get(driveLink).text.substringAfter("replace(\"")
@ -2383,6 +2385,7 @@ object SoraExtractor : SoraStream() {
val files = app.get( val files = app.get(
"https://api.telegram.d1.zindex.eu.org/search?name=${encode(query)}&page=1", "https://api.telegram.d1.zindex.eu.org/search?name=${encode(query)}&page=1",
referer = tgarMovieAPI, referer = tgarMovieAPI,
verify = false
).parsedSafe<TgarData>()?.results?.filter { media -> ).parsedSafe<TgarData>()?.results?.filter { media ->
(if (season == null) { (if (season == null) {
media.name?.contains("$year") == true media.name?.contains("$year") == true

View file

@ -730,17 +730,11 @@ var arrayofworkers = (.*)""".toRegex()
return BaymoviesConfig(country, downloadTime, workers) return BaymoviesConfig(country, downloadTime, workers)
} }
/** taken from https://github.com/821938089/cloudstream-extensions/blob/6e41697cbf816d2f57d9922d813c538e3192f708/PiousIndexProvider/src/main/kotlin/com/horis/cloudstreamplugins/PiousIndexProvider.kt#L175-L179
- Credits to Horis
**/
fun decodeIndexJson(json: String): String { fun decodeIndexJson(json: String): String {
val slug = json.reversed().substring(24) val slug = json.reversed().substring(24)
return base64Decode(slug.substring(0, slug.length - 20)) return base64Decode(slug.substring(0, slug.length - 20))
} }
/** taken from https://github.com/821938089/cloudstream-extensions/blob/23dae833a48fb329d4c67dd77ac1e8bb592ac5a9/Movie123Provider/src/main/kotlin/com/horis/cloudstreamplugins/Movie123Provider.kt#L138-L150
- Credits to Horis
**/
fun String.decryptGomoviesJson(key: String = "123"): String { fun String.decryptGomoviesJson(key: String = "123"): String {
val sb = StringBuilder() val sb = StringBuilder()
var i = 0 var i = 0