From be6b026fe083521f07f21193e540d780994614b0 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 30 Nov 2023 17:38:33 +0700 Subject: [PATCH 01/47] fixed #419, fixed #424 --- SoraStream/build.gradle.kts | 2 +- .../main/kotlin/com/hexated/SoraExtractor.kt | 68 ++++++++++--------- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 6824105e..ec8974cd 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 197 +version = 198 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 261b0e18..aae6e9f7 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -451,7 +451,7 @@ object SoraExtractor : SoraStream() { sourcesData?.get("movie")?.get("movie") } else { sourcesData?.get("s$seasonSlug")?.get("e$episodeSlug") - } + } ?: return val subSources = if (season == null) { subSourcesData?.get("movie")?.get("movie") } else { @@ -464,39 +464,45 @@ object SoraExtractor : SoraStream() { Regex("var\\suserNonce.*?[\"|'](\\S+?)[\"|'];").find(scriptUser)?.groupValues?.get(1) val userId = Regex("var\\suser_id.*?[\"|'](\\S+?)[\"|'];").find(scriptUser)?.groupValues?.get(1) - val linkIDs = sources?.joinToString("") { - "&linkIDs%5B%5D=$it" - }?.replace("\"", "") - val json = app.post( - "$filmxyAPI/wp-admin/admin-ajax.php", - requestBody = "action=get_vid_links$linkIDs&user_id=$userId&nonce=$userNonce".toRequestBody(), - referer = url, - headers = mapOf( - "Accept" to "*/*", - "DNT" to "1", - "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8", - "Origin" to filmxyAPI, - "X-Requested-With" to "XMLHttpRequest", - ), - cookies = filmxyCookies - ).text.let { tryParseJson>(it) } + val listSources = sources.withIndex() + .groupBy { it.index / 2 } + .map { entry -> entry.value.map { it.value } } - sources?.map { source -> - val link = json?.get(source) - val quality = sourcesDetail?.get(source)?.get("resolution") - val server = sourcesDetail?.get(source)?.get("server") - val size = sourcesDetail?.get(source)?.get("size") + listSources.apmap { src -> + val linkIDs = src.joinToString("") { + "&linkIDs%5B%5D=$it" + }.replace("\"", "") + val json = app.post( + "$filmxyAPI/wp-admin/admin-ajax.php", + requestBody = "action=get_vid_links$linkIDs&user_id=$userId&nonce=$userNonce".toRequestBody(), + referer = url, + headers = mapOf( + "Accept" to "*/*", + "DNT" to "1", + "Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8", + "Origin" to filmxyAPI, + "X-Requested-With" to "XMLHttpRequest", + ), + cookies = filmxyCookies + ).text.let { tryParseJson>(it) } - callback.invoke( - ExtractorLink( - "Filmxy", - "Filmxy $server [$size]", - link ?: return@map, - "$filmxyAPI/", - getQualityFromName(quality) + src.map { source -> + val link = json?.get(source) + val quality = sourcesDetail?.get(source)?.get("resolution") + val server = sourcesDetail?.get(source)?.get("server") + val size = sourcesDetail?.get(source)?.get("size") + + callback.invoke( + ExtractorLink( + "Filmxy", + "Filmxy $server [$size]", + link ?: return@map, + "$filmxyAPI/", + getQualityFromName(quality) + ) ) - ) + } } subSources?.mapKeys { sub -> @@ -2463,7 +2469,7 @@ object SoraExtractor : SoraStream() { ExtractorLink( "SFMovies", "SFMovies", - fixUrl(video, base64DecodeAPI("aQ==YXA=dGE=ZGE=c3Q=cmU=dC8=bmU=cy4=b3c=bmQ=d2k=ZS4=b3I=LmM=b2I=Ymw=aS4=YXA=dGE=ZGE=c3Q=cmU=Ly8=czo=dHA=aHQ=")), + fixUrl(video, base64DecodeAPI("cw==bmU=Ym8=Y2s=YmE=dC8=bmU=cy4=b3c=bmQ=d2k=ZS4=b3I=LmM=b2I=Ymw=cy4=bmU=Ym8=Y2s=YmE=Ly8=czo=dHA=aHQ=")), "", Qualities.P1080.value, INFER_TYPE From 3cfa6e8dab671c971e269e88701b703a8638044b Mon Sep 17 00:00:00 2001 From: adityajd <45625055+adityajd@users.noreply.github.com> Date: Thu, 30 Nov 2023 18:52:20 +0700 Subject: [PATCH 02/47] Adityajd patch 1 (#423) * Update RebahinProvider.kt * Update LayarKacaProvider.kt update main url ="https://tv3.lk21official.wiki" change to "https://tv4.lk21official.wiki" * Update LayarKacaProvider.kt * Update Dubbindo.kt update domain * Update Cgvindo.kt * Update DramaidProvider.kt * Update DutaMovie.kt * Update Ngefilm.kt * Update Pusatfilm.kt * Update LayarKacaProvider.kt * Update build.gradle.kts --- .../src/main/kotlin/com/hexated/DramaidProvider.kt | 2 +- Dubbindo/src/main/kotlin/com/hexated/Dubbindo.kt | 4 ++-- Gomov/src/main/kotlin/com/hexated/DutaMovie.kt | 4 ++-- Gomov/src/main/kotlin/com/hexated/Ngefilm.kt | 4 ++-- Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt | 4 ++-- LayarKacaProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/LayarKacaProvider.kt | 4 ++-- RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt b/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt index dc661de4..a20c8136 100644 --- a/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt +++ b/DramaidProvider/src/main/kotlin/com/hexated/DramaidProvider.kt @@ -11,7 +11,7 @@ import org.jsoup.Jsoup import org.jsoup.nodes.Element open class DramaidProvider : MainAPI() { - override var mainUrl = "https://dramaid.best" + override var mainUrl = "https://dramaid.skin" override var name = "DramaId" override val hasMainPage = true override var lang = "id" diff --git a/Dubbindo/src/main/kotlin/com/hexated/Dubbindo.kt b/Dubbindo/src/main/kotlin/com/hexated/Dubbindo.kt index dc9fd653..8ef0ac76 100644 --- a/Dubbindo/src/main/kotlin/com/hexated/Dubbindo.kt +++ b/Dubbindo/src/main/kotlin/com/hexated/Dubbindo.kt @@ -9,7 +9,7 @@ import com.lagradost.cloudstream3.utils.loadExtractor import org.jsoup.nodes.Element class Dubbindo : MainAPI() { - override var mainUrl = "https://www.dubbindo.xyz" + override var mainUrl = "https://www.dubbindo.site" override var name = "Dubbindo" override val hasMainPage = true override var lang = "id" @@ -133,4 +133,4 @@ class Dubbindo : MainAPI() { val type: String? = null, ) -} \ No newline at end of file +} diff --git a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt index 170f71ba..deb693ed 100644 --- a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt +++ b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt @@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.utils.httpsify import com.lagradost.cloudstream3.utils.loadExtractor class DutaMovie : Gomov() { - override var mainUrl = "https://movie.dutamovie21.club" + override var mainUrl = "https://boxoffice.dutamovie21.club" override var name = "DutaMovie" override val mainPage = mainPageOf( "category/box-office/page/%d/" to "Box Office", @@ -16,4 +16,4 @@ class DutaMovie : Gomov() { "country/indonesia/page/%d/" to "Serial TV Indonesia", ) -} \ No newline at end of file +} diff --git a/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt b/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt index 737d86a8..4e2f44ca 100644 --- a/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt +++ b/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt @@ -3,7 +3,7 @@ package com.hexated import com.lagradost.cloudstream3.mainPageOf class Ngefilm : Gomov() { - override var mainUrl = "https://nge-film.xyz" + override var mainUrl = "https://nge-film21.fun" override var name = "Ngefilm" override val mainPage = mainPageOf( @@ -13,4 +13,4 @@ class Ngefilm : Gomov() { "/page/%d/?s=&search=advanced&post_type=tv&index=&orderby=&genre=&movieyear=&country=indonesia&quality=" to "Series Indonesia", ) -} \ No newline at end of file +} diff --git a/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt b/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt index cbae93ce..ae4f7639 100644 --- a/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt +++ b/Gomov/src/main/kotlin/com/hexated/Pusatfilm.kt @@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.TvSeriesLoadResponse import com.lagradost.cloudstream3.* class Pusatfilm : Gomov() { - override var mainUrl = "https://pusatfilm21.art" + override var mainUrl = "http://185.190.140.116" override var name = "Pusatfilm" override val mainPage = mainPageOf( @@ -38,4 +38,4 @@ class Pusatfilm : Gomov() { } } -} \ No newline at end of file +} diff --git a/LayarKacaProvider/build.gradle.kts b/LayarKacaProvider/build.gradle.kts index fce39c45..5c2f043d 100644 --- a/LayarKacaProvider/build.gradle.kts +++ b/LayarKacaProvider/build.gradle.kts @@ -23,5 +23,5 @@ cloudstream { "Movie", ) - iconUrl = "https://www.google.com/s2/favicons?domain=tv4.lk21official.wiki&sz=%size%" + iconUrl = "https://www.google.com/s2/favicons?domain=tv5.lk21official.wiki&sz=%size%" } diff --git a/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProvider.kt b/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProvider.kt index 7d8ed5f0..328257e9 100644 --- a/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProvider.kt +++ b/LayarKacaProvider/src/main/kotlin/com/hexated/LayarKacaProvider.kt @@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.* import org.jsoup.nodes.Element class LayarKacaProvider : MainAPI() { - override var mainUrl = "https://tv4.lk21official.wiki" - private var seriesUrl = "https://tv5.nontondrama.click" + override var mainUrl = "https://tv5.lk21official.wiki" + private var seriesUrl = "https://tv7.nontondrama.click" override var name = "LayarKaca" override val hasMainPage = true override var lang = "id" diff --git a/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt b/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt index 66ff7cb3..370dda11 100644 --- a/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt +++ b/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt @@ -3,7 +3,7 @@ package com.hexated import com.lagradost.cloudstream3.TvType class Cgvindo : RebahinProvider() { - override var mainUrl = "https://cgvindo.com/amp/" + override var mainUrl = "http://167.86.79.231" override var name = "Cgvindo" } From 4c811724bbdd9b9e6f97a70319dbe1e26381ce6c Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 30 Nov 2023 19:08:55 +0700 Subject: [PATCH 03/47] fixed Kuramanime --- KuramanimeProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/KuramanimeProvider.kt | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index ed7addec..160b749d 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 23 +version = 24 cloudstream { diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index b9805a2d..64166f8d 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -227,14 +227,9 @@ class KuramanimeProvider : MainAPI() { return true } - private fun getAuth() : String { - val key = "kuramanime3:LEcXGYdOGcMCV8jM5fhRdM2mneSj6kaNts:${APIHolder.unixTimeMS};" - return base64Encode(base64Encode(key.toByteArray()).toByteArray()) - } - private suspend fun fetchAuth(url: String) : String? { val found = WebViewResolver( - Regex("$mainUrl/misc/post/EVhcpMNbO77acNZcHr2XVjaG8WAdNC1u") + Regex("$mainUrl/OvBEip5oFwoN00rAl1Ab014feJWmLvhC") ).resolveUsingWebView( requestCreator( "GET", url @@ -247,7 +242,7 @@ class KuramanimeProvider : MainAPI() { private suspend fun getMisc(): String { val misc = app.get( - "$mainUrl/misc/post/EVhcpMNbO77acNZcHr2XVjaG8WAdNC1u", + "$mainUrl/OvBEip5oFwoN00rAl1Ab014feJWmLvhC", headers = headers + mapOf("X-Request-ID" to getRequestId()), cookies = cookies ) From 59f936c2ba1d6fd226a8ad8b7903887481cf2f31 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 30 Nov 2023 20:20:44 +0700 Subject: [PATCH 04/47] fixed again --- .../kotlin/com/hexated/KuramanimeProvider.kt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index 64166f8d..c697a107 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -18,7 +18,7 @@ class KuramanimeProvider : MainAPI() { override val hasMainPage = true override var lang = "id" override val hasDownloadSupport = true - private var auth: String? = null + private var auth: Pair? = null private var headers: Map = mapOf() private var cookies: Map = mapOf() override val supportedTypes = setOf( @@ -200,16 +200,17 @@ class KuramanimeProvider : MainAPI() { val req = app.get(data) val res = req.document val token = res.select("meta[name=csrf-token]").attr("content") + val auth = getAuth(data) headers = mapOf( "Accept" to "application/json, text/javascript, */*; q=0.01", - "Authorization" to "${getAuth(data)}", + "Authorization" to "${auth.second}", "X-Requested-With" to "XMLHttpRequest", "X-CSRF-TOKEN" to token ) cookies = req.cookies res.select("select#changeServer option").apmap { source -> val server = source.attr("value") - val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=${getMisc()}&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server" + val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=${getMisc(auth.first)}&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server" if (server.contains(Regex("(?i)kuramadrive|archive"))) { invokeLocalSource(link, server, data, callback) } else { @@ -227,22 +228,22 @@ class KuramanimeProvider : MainAPI() { return true } - private suspend fun fetchAuth(url: String) : String? { + private suspend fun fetchAuth(url: String) : Pair { val found = WebViewResolver( - Regex("$mainUrl/OvBEip5oFwoN00rAl1Ab014feJWmLvhC") + Regex("""$mainUrl/\w{32}""") ).resolveUsingWebView( requestCreator( "GET", url ) ).first - return found?.headers?.get("Authorization") + return found?.url.toString() to found?.headers?.get("Authorization") } private suspend fun getAuth(url: String) = auth ?: fetchAuth(url) - private suspend fun getMisc(): String { + private suspend fun getMisc(url: String?): String { val misc = app.get( - "$mainUrl/OvBEip5oFwoN00rAl1Ab014feJWmLvhC", + "$url", headers = headers + mapOf("X-Request-ID" to getRequestId()), cookies = cookies ) From 05bf61a9bb351c344f08a78044505cc9c0029113 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 30 Nov 2023 22:05:52 +0700 Subject: [PATCH 05/47] fixed again --- KuramanimeProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/KuramanimeProvider.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index 160b749d..bb673312 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 24 +version = 25 cloudstream { diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index c697a107..b5d958f3 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -230,7 +230,7 @@ class KuramanimeProvider : MainAPI() { private suspend fun fetchAuth(url: String) : Pair { val found = WebViewResolver( - Regex("""$mainUrl/\w{32}""") + Regex("""$mainUrl/\w{24,36}""") ).resolveUsingWebView( requestCreator( "GET", url @@ -239,7 +239,7 @@ class KuramanimeProvider : MainAPI() { return found?.url.toString() to found?.headers?.get("Authorization") } - private suspend fun getAuth(url: String) = auth ?: fetchAuth(url) + private suspend fun getAuth(url: String) = auth ?: fetchAuth(url).also { auth = it } private suspend fun getMisc(url: String?): String { val misc = app.get( From b9fd6d8a021e5a519629fcd12808dfc471d3a735 Mon Sep 17 00:00:00 2001 From: jack Date: Thu, 30 Nov 2023 23:49:59 +0700 Subject: [PATCH 06/47] fu --- KuramanimeProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/KuramanimeProvider.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index bb673312..a2b3e16a 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 25 +version = 26 cloudstream { diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index b5d958f3..a845d299 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -230,7 +230,7 @@ class KuramanimeProvider : MainAPI() { private suspend fun fetchAuth(url: String) : Pair { val found = WebViewResolver( - Regex("""$mainUrl/\w{24,36}""") + Regex("""$mainUrl/(?!anime|assets|images)\w+""") ).resolveUsingWebView( requestCreator( "GET", url From cc2cc118d294d7df521fc21f4d8d9e5525b52377 Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 1 Dec 2023 02:03:08 +0700 Subject: [PATCH 07/47] fix --- KuramanimeProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/KuramanimeProvider.kt | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index a2b3e16a..fb98750a 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 26 +version = 27 cloudstream { diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index a845d299..36eff004 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -229,14 +229,17 @@ class KuramanimeProvider : MainAPI() { } private suspend fun fetchAuth(url: String) : Pair { + val regex = Regex("""$mainUrl/(?!anime|assets|images|misc|cf-fonts)\w+""") val found = WebViewResolver( - Regex("""$mainUrl/(?!anime|assets|images)\w+""") + Regex("""dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb"""), + additionalUrls = listOf(regex) ).resolveUsingWebView( requestCreator( "GET", url ) - ).first - return found?.url.toString() to found?.headers?.get("Authorization") + ) + val foundUrl = found.second.last() + return foundUrl.url.toString() to foundUrl.headers["Authorization"] } private suspend fun getAuth(url: String) = auth ?: fetchAuth(url).also { auth = it } From e644456bc688658fd46ce380569b4c7b7c04173d Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 1 Dec 2023 03:33:25 +0700 Subject: [PATCH 08/47] fix --- KuramanimeProvider/build.gradle.kts | 2 +- .../kotlin/com/hexated/KuramanimeProvider.kt | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index fb98750a..e68b3715 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 27 +version = 28 cloudstream { diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index 36eff004..eb8697ea 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.nicehttp.requestCreator +import okhttp3.HttpUrl import org.jsoup.Jsoup import org.jsoup.nodes.Element @@ -18,7 +19,7 @@ class KuramanimeProvider : MainAPI() { override val hasMainPage = true override var lang = "id" override val hasDownloadSupport = true - private var auth: Pair? = null + private var params: AuthParams? = null private var headers: Map = mapOf() private var cookies: Map = mapOf() override val supportedTypes = setOf( @@ -203,14 +204,15 @@ class KuramanimeProvider : MainAPI() { val auth = getAuth(data) headers = mapOf( "Accept" to "application/json, text/javascript, */*; q=0.01", - "Authorization" to "${auth.second}", + "Authorization" to "${auth.authHeader}", "X-Requested-With" to "XMLHttpRequest", "X-CSRF-TOKEN" to token ) cookies = req.cookies res.select("select#changeServer option").apmap { source -> val server = source.attr("value") - val link = "$data?dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb=${getMisc(auth.first)}&twEvZlbZbYRWBdKKwxkOnwYF0VWoGGVg=$server" + val query = auth.serverUrl?.queryParameterNames + val link = "$data?${query?.first()}=${getMisc(auth.authUrl)}&${query?.last()}=$server" if (server.contains(Regex("(?i)kuramadrive|archive"))) { invokeLocalSource(link, server, data, callback) } else { @@ -228,21 +230,21 @@ class KuramanimeProvider : MainAPI() { return true } - private suspend fun fetchAuth(url: String) : Pair { + private suspend fun fetchAuth(url: String) : AuthParams { val regex = Regex("""$mainUrl/(?!anime|assets|images|misc|cf-fonts)\w+""") val found = WebViewResolver( - Regex("""dfgRr1OagZvvxbzHNpyCy0FqJQ18mCnb"""), + Regex("""$url(?!\?page=)\?"""), additionalUrls = listOf(regex) ).resolveUsingWebView( requestCreator( "GET", url ) ) - val foundUrl = found.second.last() - return foundUrl.url.toString() to foundUrl.headers["Authorization"] + val addition = found.second.last() + return AuthParams(found.first?.url, addition.url.toString(), addition.headers["Authorization"]) } - private suspend fun getAuth(url: String) = auth ?: fetchAuth(url).also { auth = it } + private suspend fun getAuth(url: String) = params ?: fetchAuth(url).also { params = it } private suspend fun getMisc(url: String?): String { val misc = app.get( @@ -261,4 +263,10 @@ class KuramanimeProvider : MainAPI() { .joinToString("") } + data class AuthParams ( + val serverUrl: HttpUrl?, + val authUrl: String?, + val authHeader: String?, + ) + } \ No newline at end of file From 3d6520cdef2db5e860a1a4d91ade21a4a3ae06f7 Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 1 Dec 2023 05:19:52 +0700 Subject: [PATCH 09/47] f up kuramanime --- KuramanimeProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Extractors.kt | 104 ++++++++++++++++++ .../kotlin/com/hexated/KuramanimeProvider.kt | 58 ++++++---- .../com/hexated/KuramanimeProviderPlugin.kt | 2 + 4 files changed, 141 insertions(+), 25 deletions(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index e68b3715..5c147a6a 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 28 +version = 29 cloudstream { diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt index 521502ac..e393fbc0 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt @@ -1,7 +1,14 @@ package com.hexated +import com.fasterxml.jackson.annotation.JsonProperty +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.extractors.Filesim import com.lagradost.cloudstream3.extractors.StreamSB +import com.lagradost.cloudstream3.utils.ExtractorApi +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.Qualities +import com.lagradost.cloudstream3.utils.getQualityFromName class Nyomo : StreamSB() { override var name: String = "Nyomo" @@ -11,4 +18,101 @@ class Nyomo : StreamSB() { class Streamhide : Filesim() { override var name: String = "Streamhide" override var mainUrl: String = "https://streamhide.to" +} + +open class Lbx : ExtractorApi() { + override val name = "Linkbox" + override val mainUrl = "https://lbx.to" + private val realUrl = "https://www.linkbox.to" + override val requiresReferer = true + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val token = Regex("""(?:/f/|/file/|\?id=)(\w+)""").find(url)?.groupValues?.get(1) + val id = app.get("$realUrl/api/file/share_out_list/?sortField=utime&sortAsc=0&pageNo=1&pageSize=50&shareToken=$token").parsedSafe()?.data?.itemId + app.get("$realUrl/api/file/detail?itemId=$id", referer = url) + .parsedSafe()?.data?.itemInfo?.resolutionList?.map { link -> + callback.invoke( + ExtractorLink( + name, + name, + link.url ?: return@map null, + "$realUrl/", + getQualityFromName(link.resolution) + ) + ) + } + } + + data class Resolutions( + @JsonProperty("url") val url: String? = null, + @JsonProperty("resolution") val resolution: String? = null, + ) + + data class ItemInfo( + @JsonProperty("resolutionList") val resolutionList: ArrayList? = arrayListOf(), + ) + + data class Data( + @JsonProperty("itemInfo") val itemInfo: ItemInfo? = null, + @JsonProperty("itemId") val itemId: String? = null, + ) + + data class Responses( + @JsonProperty("data") val data: Data? = null, + ) + +} + +open class Kuramadrive : ExtractorApi() { + override val name = "DriveKurama" + override val mainUrl = "https://kuramadrive.com" + override val requiresReferer = true + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val req = app.get(url, referer = referer) + val doc = req.document + + val title = doc.select("title").text() + val token = doc.select("meta[name=csrf-token]").attr("content") + val routeCheckAvl = doc.select("input#routeCheckAvl").attr("value") + + val json = app.post( + routeCheckAvl, headers = mapOf( + "X-Requested-With" to "XMLHttpRequest", + "X-CSRF-TOKEN" to token + ), + referer = url, + cookies = req.cookies + ).parsedSafe() + + callback.invoke( + ExtractorLink( + name, + name, + json?.url ?: return, + "$mainUrl/", + getIndexQuality(title), + ) + ) + } + + private fun getIndexQuality(str: String?): Int { + return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull() + ?: Qualities.Unknown.value + } + + private data class Source( + @JsonProperty("url") val url: String, + ) + } \ No newline at end of file diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index eb8697ea..93716f94 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -200,32 +200,42 @@ class KuramanimeProvider : MainAPI() { val req = app.get(data) val res = req.document - val token = res.select("meta[name=csrf-token]").attr("content") - val auth = getAuth(data) - headers = mapOf( - "Accept" to "application/json, text/javascript, */*; q=0.01", - "Authorization" to "${auth.authHeader}", - "X-Requested-With" to "XMLHttpRequest", - "X-CSRF-TOKEN" to token - ) - cookies = req.cookies - res.select("select#changeServer option").apmap { source -> - val server = source.attr("value") - val query = auth.serverUrl?.queryParameterNames - val link = "$data?${query?.first()}=${getMisc(auth.authUrl)}&${query?.last()}=$server" - if (server.contains(Regex("(?i)kuramadrive|archive"))) { - invokeLocalSource(link, server, data, callback) - } else { - app.get( - link, - referer = data, - headers = headers, - cookies = cookies - ).document.select("div.iframe-container iframe").attr("src").let { videoUrl -> - loadExtractor(fixUrl(videoUrl), "$mainUrl/", subtitleCallback, callback) + + argamap( + { + val token = res.select("meta[name=csrf-token]").attr("content") + val auth = getAuth(data) + headers = mapOf( + "Accept" to "application/json, text/javascript, */*; q=0.01", + "Authorization" to "${auth.authHeader}", + "X-Requested-With" to "XMLHttpRequest", + "X-CSRF-TOKEN" to token + ) + cookies = req.cookies + res.select("select#changeServer option").apmap { source -> + val server = source.attr("value") + val query = auth.serverUrl?.queryParameterNames + val link = "$data?${query?.first()}=${getMisc(auth.authUrl)}&${query?.last()}=$server" + if (server.contains(Regex("(?i)kuramadrive|archive"))) { + invokeLocalSource(link, server, data, callback) + } else { + app.get( + link, + referer = data, + headers = headers, + cookies = cookies + ).document.select("div.iframe-container iframe").attr("src").let { videoUrl -> + loadExtractor(fixUrl(videoUrl), "$mainUrl/", subtitleCallback, callback) + } + } + } + }, + { + res.select("div#animeDownloadLink a").apmap { + loadExtractor(it.attr("href"), "$mainUrl/", subtitleCallback, callback) } } - } + ) return true } diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProviderPlugin.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProviderPlugin.kt index da4282eb..77db0c6e 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProviderPlugin.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProviderPlugin.kt @@ -12,5 +12,7 @@ class KuramanimeProviderPlugin: Plugin() { registerMainAPI(KuramanimeProvider()) registerExtractorAPI(Nyomo()) registerExtractorAPI(Streamhide()) + registerExtractorAPI(Kuramadrive()) + registerExtractorAPI(Lbx()) } } \ No newline at end of file From d69d3c98936ee8074cf7c7ebda7bda064da5c00d Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 1 Dec 2023 13:55:44 +0700 Subject: [PATCH 10/47] update --- KuramanimeProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/KuramanimeProvider.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index 5c147a6a..2f4bbee6 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 29 +version = 30 cloudstream { diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index 93716f94..06b174e4 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -241,7 +241,7 @@ class KuramanimeProvider : MainAPI() { } private suspend fun fetchAuth(url: String) : AuthParams { - val regex = Regex("""$mainUrl/(?!anime|assets|images|misc|cf-fonts)\w+""") + val regex = Regex("""$mainUrl/(?!anime/|assets/|images/|misc/|cf-fonts/)\w+""") val found = WebViewResolver( Regex("""$url(?!\?page=)\?"""), additionalUrls = listOf(regex) From 9f81efb65281f85fc25bf16cca5204845b67e56c Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 1 Dec 2023 15:06:18 +0700 Subject: [PATCH 11/47] update --- .../src/main/kotlin/com/hexated/KuramanimeProvider.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index 06b174e4..a6ea620e 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -241,7 +241,7 @@ class KuramanimeProvider : MainAPI() { } private suspend fun fetchAuth(url: String) : AuthParams { - val regex = Regex("""$mainUrl/(?!anime/|assets/|images/|misc/|cf-fonts/)\w+""") + val regex = Regex("""$mainUrl/\S+""") val found = WebViewResolver( Regex("""$url(?!\?page=)\?"""), additionalUrls = listOf(regex) @@ -250,8 +250,8 @@ class KuramanimeProvider : MainAPI() { "GET", url ) ) - val addition = found.second.last() - return AuthParams(found.first?.url, addition.url.toString(), addition.headers["Authorization"]) + val addition = found.second.find { !it.headers["Authorization"].isNullOrBlank() } + return AuthParams(found.first?.url, addition?.url.toString(), addition?.headers?.get("Authorization")) } private suspend fun getAuth(url: String) = params ?: fetchAuth(url).also { params = it } From cb0d83a5de3318b1ce272f3d5f34442108ce7782 Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 1 Dec 2023 17:27:44 +0700 Subject: [PATCH 12/47] update --- .../main/kotlin/com/hexated/KuramanimeProvider.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index a6ea620e..0d588554 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -208,14 +208,15 @@ class KuramanimeProvider : MainAPI() { headers = mapOf( "Accept" to "application/json, text/javascript, */*; q=0.01", "Authorization" to "${auth.authHeader}", + "X-Fuck-ID" to "${auth.fidHeader}", "X-Requested-With" to "XMLHttpRequest", "X-CSRF-TOKEN" to token - ) + ).filter { !it.value.isNullOrEmpty() } cookies = req.cookies res.select("select#changeServer option").apmap { source -> val server = source.attr("value") - val query = auth.serverUrl?.queryParameterNames - val link = "$data?${query?.first()}=${getMisc(auth.authUrl)}&${query?.last()}=$server" + val query = auth.serverUrl?.queryParameterNames?.map { it } ?: return@apmap + val link = "$data?${query[0]}=${getMisc(auth.authUrl)}&${query[1]}=$server" if (server.contains(Regex("(?i)kuramadrive|archive"))) { invokeLocalSource(link, server, data, callback) } else { @@ -250,8 +251,8 @@ class KuramanimeProvider : MainAPI() { "GET", url ) ) - val addition = found.second.find { !it.headers["Authorization"].isNullOrBlank() } - return AuthParams(found.first?.url, addition?.url.toString(), addition?.headers?.get("Authorization")) + val addition = found.second.find { !it.headers["Authorization"].isNullOrBlank() || !it.headers["X-Fuck-ID"].isNullOrBlank() } + return AuthParams(found.first?.url, addition?.url.toString(), addition?.headers?.get("Authorization"), addition?.headers?.get("X-Fuck-ID")) } private suspend fun getAuth(url: String) = params ?: fetchAuth(url).also { params = it } @@ -277,6 +278,7 @@ class KuramanimeProvider : MainAPI() { val serverUrl: HttpUrl?, val authUrl: String?, val authHeader: String?, + val fidHeader: String?, ) } \ No newline at end of file From f9b11611c3ac75b82d2bad8a779ef615d6b5327a Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 1 Dec 2023 17:55:59 +0700 Subject: [PATCH 13/47] update --- .../kotlin/com/hexated/KuramanimeProvider.kt | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt index 0d588554..82d488e4 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/KuramanimeProvider.kt @@ -8,6 +8,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.nicehttp.requestCreator +import okhttp3.Headers import okhttp3.HttpUrl import org.jsoup.Jsoup import org.jsoup.nodes.Element @@ -203,15 +204,8 @@ class KuramanimeProvider : MainAPI() { argamap( { - val token = res.select("meta[name=csrf-token]").attr("content") val auth = getAuth(data) - headers = mapOf( - "Accept" to "application/json, text/javascript, */*; q=0.01", - "Authorization" to "${auth.authHeader}", - "X-Fuck-ID" to "${auth.fidHeader}", - "X-Requested-With" to "XMLHttpRequest", - "X-CSRF-TOKEN" to token - ).filter { !it.value.isNullOrEmpty() } + headers = auth.authHeader?.associate { it.first to it.second }?.filter { it.key != "Cookie" }!! cookies = req.cookies res.select("select#changeServer option").apmap { source -> val server = source.attr("value") @@ -251,8 +245,8 @@ class KuramanimeProvider : MainAPI() { "GET", url ) ) - val addition = found.second.find { !it.headers["Authorization"].isNullOrBlank() || !it.headers["X-Fuck-ID"].isNullOrBlank() } - return AuthParams(found.first?.url, addition?.url.toString(), addition?.headers?.get("Authorization"), addition?.headers?.get("X-Fuck-ID")) + val addition = found.second.findLast { it.headers["X-Requested-With"] == "XMLHttpRequest" } + return AuthParams(found.first?.url, addition?.url.toString(), addition?.headers) } private suspend fun getAuth(url: String) = params ?: fetchAuth(url).also { params = it } @@ -260,25 +254,17 @@ class KuramanimeProvider : MainAPI() { private suspend fun getMisc(url: String?): String { val misc = app.get( "$url", - headers = headers + mapOf("X-Request-ID" to getRequestId()), + headers = headers, cookies = cookies ) cookies = misc.cookies return misc.parsed() } - private fun getRequestId(length: Int = 8): String { - val allowedChars = ('a'..'z') + ('0'..'9') - return (1..length) - .map { allowedChars.random() } - .joinToString("") - } - data class AuthParams ( val serverUrl: HttpUrl?, val authUrl: String?, - val authHeader: String?, - val fidHeader: String?, + val authHeader: Headers?, ) } \ No newline at end of file From b6c8cd8ec44201e2b25ef6427c84050a9e2b05af Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 1 Dec 2023 22:40:53 +0700 Subject: [PATCH 14/47] bump --- KuramanimeProvider/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index 2f4bbee6..c357ec95 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 30 +version = 31 cloudstream { From 4519f653d28f076853aad93784d2b3fc9b1775ea Mon Sep 17 00:00:00 2001 From: jack Date: Sat, 2 Dec 2023 03:26:18 +0700 Subject: [PATCH 15/47] update build.yml --- .github/workflows/build.yml | 6 +++--- KuramanimeProvider/build.gradle.kts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03c8efdc..5ce91c3a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,10 +85,10 @@ jobs: cp **/build/*.cs3 $GITHUB_WORKSPACE/builds cp build/plugins.json $GITHUB_WORKSPACE/builds - - name: Move Loklok + - name: Move Kuramanime run: | - rm $GITHUB_WORKSPACE/builds/Loklok.cs3 || true - cp $GITHUB_WORKSPACE/builds/stored/Loklok.cs3 $GITHUB_WORKSPACE/builds + rm $GITHUB_WORKSPACE/builds/KuramanimeProvider.cs3 || true + cp $GITHUB_WORKSPACE/builds/stored/KuramanimeProvider.cs3 $GITHUB_WORKSPACE/builds - name: Push builds run: | diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index c357ec95..ce21f61c 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 31 +version = 32 cloudstream { From 08ad4dd5677a60706d4e1c75e247f1a01aeee84f Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 3 Dec 2023 06:50:52 +0700 Subject: [PATCH 16/47] update Animasu --- Animasu/build.gradle.kts | 2 +- Animasu/src/main/kotlin/com/hexated/Animasu.kt | 2 +- KuramanimeProvider/build.gradle.kts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Animasu/build.gradle.kts b/Animasu/build.gradle.kts index 338aaa8a..7dc626dd 100644 --- a/Animasu/build.gradle.kts +++ b/Animasu/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 6 +version = 7 cloudstream { diff --git a/Animasu/src/main/kotlin/com/hexated/Animasu.kt b/Animasu/src/main/kotlin/com/hexated/Animasu.kt index 25129feb..f5989d85 100644 --- a/Animasu/src/main/kotlin/com/hexated/Animasu.kt +++ b/Animasu/src/main/kotlin/com/hexated/Animasu.kt @@ -157,7 +157,7 @@ class Animasu : MainAPI() { link.name, link.url, link.referer, - if(link.type != ExtractorLinkType.M3U8) getIndexQuality(quality) else link.quality, + if(link.type == ExtractorLinkType.M3U8 || link.name == "Uservideo") link.quality else getIndexQuality(quality), link.type, link.headers, link.extractorData diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index ce21f61c..68bff8a9 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 32 +version = 33 cloudstream { From dba0cf5d27a5365dea1fcb1594227126869a99be Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 3 Dec 2023 07:27:25 +0700 Subject: [PATCH 17/47] fixed #427 --- SoraStream/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/SoraExtractor.kt | 2 +- SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index ec8974cd..cad26cc1 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 198 +version = 199 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index aae6e9f7..9a22d127 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2469,7 +2469,7 @@ object SoraExtractor : SoraStream() { ExtractorLink( "SFMovies", "SFMovies", - fixUrl(video, base64DecodeAPI("cw==bmU=Ym8=Y2s=YmE=dC8=bmU=cy4=b3c=bmQ=d2k=ZS4=b3I=LmM=b2I=Ymw=cy4=bmU=Ym8=Y2s=YmE=Ly8=czo=dHA=aHQ=")), + fixUrl(video, getSfServer() ?: return), "", Qualities.P1080.value, INFER_TYPE diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index e62f5006..6ea13e9c 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -46,6 +46,8 @@ import kotlin.math.min var watchflxCookies: Map? = null var filmxyCookies: Map? = null +var sfServer: String? = null + val encodedIndex = arrayOf( "GamMovies", "JSMovies", @@ -761,6 +763,14 @@ suspend fun getTvMoviesServer(url: String, season: Int?, episode: Int?): Pair>>()?.first()?.get("link") +} + suspend fun getFilmxyCookies(url: String) = filmxyCookies ?: fetchFilmxyCookies(url).also { filmxyCookies = it } suspend fun fetchFilmxyCookies(url: String): Map { From fb73c9eabb3ae76a48db911b7afeb2d18d8485bf Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 3 Dec 2023 21:19:44 +0700 Subject: [PATCH 18/47] =?UTF-8?q?gave=20up=20brother=3F=20=F0=9F=A4=A3?= =?UTF-8?q?=F0=9F=A4=A3=F0=9F=A4=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- KuramanimeProvider/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/KuramanimeProvider/build.gradle.kts b/KuramanimeProvider/build.gradle.kts index 68bff8a9..fac8e2b3 100644 --- a/KuramanimeProvider/build.gradle.kts +++ b/KuramanimeProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 33 +version = 34 cloudstream { From a496f79f05ac75923fd922b84f79a21c8eb21e99 Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 6 Dec 2023 11:15:42 +0700 Subject: [PATCH 19/47] fixed #432 --- Animasu/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Animasu.kt | 10 ++- .../src/main/kotlin/com/hexated/Extractors.kt | 84 ------------------ Gomov/src/main/kotlin/com/hexated/Gomov.kt | 19 +--- .../src/main/kotlin/com/hexated/Extractors.kt | 2 +- Minioppai/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Extractors.kt | 4 +- .../src/main/kotlin/com/hexated/Minioppai.kt | 2 +- SoraStream/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Extractors.kt | 88 ++----------------- .../main/kotlin/com/hexated/SoraExtractor.kt | 18 +--- .../kotlin/com/hexated/SoraStreamPlugin.kt | 1 + .../src/main/kotlin/com/hexated/SoraUtils.kt | 5 +- 13 files changed, 31 insertions(+), 208 deletions(-) diff --git a/Animasu/build.gradle.kts b/Animasu/build.gradle.kts index 7dc626dd..c2504dae 100644 --- a/Animasu/build.gradle.kts +++ b/Animasu/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 7 +version = 8 cloudstream { diff --git a/Animasu/src/main/kotlin/com/hexated/Animasu.kt b/Animasu/src/main/kotlin/com/hexated/Animasu.kt index f5989d85..4e726b6e 100644 --- a/Animasu/src/main/kotlin/com/hexated/Animasu.kt +++ b/Animasu/src/main/kotlin/com/hexated/Animasu.kt @@ -138,7 +138,7 @@ class Animasu : MainAPI() { document.select(".mobius > .mirror > option").mapNotNull { fixUrl(Jsoup.parse(base64Decode(it.attr("value"))).select("iframe").attr("src")) to it.text() }.apmap { (iframe, quality) -> - loadFixedExtractor(iframe, quality, "$mainUrl/", subtitleCallback, callback) + loadFixedExtractor(iframe.fixIframe(), quality, "$mainUrl/", subtitleCallback, callback) } return true } @@ -166,6 +166,14 @@ class Animasu : MainAPI() { } } + private fun String.fixIframe() : String { + return if(this.startsWith("https://dl.berkasdrive.com")) { + base64Decode(this.substringAfter("id=")) + } else { + this + } + } + private fun getIndexQuality(str: String?): Int { return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull() ?: Qualities.Unknown.value diff --git a/Gomov/src/main/kotlin/com/hexated/Extractors.kt b/Gomov/src/main/kotlin/com/hexated/Extractors.kt index 35e1bc5d..8cb8cc50 100644 --- a/Gomov/src/main/kotlin/com/hexated/Extractors.kt +++ b/Gomov/src/main/kotlin/com/hexated/Extractors.kt @@ -1,21 +1,14 @@ package com.hexated -import com.fasterxml.jackson.annotation.JsonProperty -import com.lagradost.cloudstream3.ErrorLoadingException import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.apmap import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode import com.lagradost.cloudstream3.extractors.* -import com.lagradost.cloudstream3.extractors.helper.AesHelper -import com.lagradost.cloudstream3.utils.AppUtils import com.lagradost.cloudstream3.utils.ExtractorApi import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.M3u8Helper import com.lagradost.cloudstream3.utils.loadExtractor -import org.jsoup.nodes.Document -import org.mozilla.javascript.Context -import org.mozilla.javascript.Scriptable open class Uplayer : ExtractorApi() { override val name = "Uplayer" @@ -94,81 +87,4 @@ class Likessb : StreamSB() { class DbGdriveplayer : Gdriveplayer() { override var mainUrl = "https://database.gdriveplayer.us" -} - -object NineTv { - - suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val mainUrl = getBaseUrl(url) - val res = app.get(url, headers = mapOf( - "Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "Accept-Language" to "en-US,en;q=0.5", - "Referer" to (referer ?: ""), - )) - val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1) - val key = "tSIsE8FgpRkv3QQQ" - val decrypt = AesHelper.cryptoAESHandler(master ?: return, key.toByteArray(), false) - ?.replace("\\", "") - ?: throw ErrorLoadingException("failed to decrypt") - - val source = Regex(""""?file"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1) - val tracks = Regex("""tracks:\s*\[(.+)]""").find(decrypt)?.groupValues?.get(1) - val name = url.getHost() - - M3u8Helper.generateM3u8( - name, - source ?: return, - "$mainUrl/", - headers = mapOf( - "Accept" to "*/*", - "Connection" to "keep-alive", - "Sec-Fetch-Dest" to "empty", - "Sec-Fetch-Mode" to "cors", - "Sec-Fetch-Site" to "cross-site", - "Origin" to mainUrl, - ) - ).forEach(callback) - - AppUtils.tryParseJson>("[$tracks]") - ?.filter { it.kind == "captions" }?.map { track -> - subtitleCallback.invoke( - SubtitleFile( - track.label ?: "", - track.file ?: return@map null - ) - ) - } - } - - private fun Document.getKeys(): String? { - val script = (this.selectFirst("script:containsData(eval\\()")?.data() - ?.replace("eval(", "var result=")?.removeSuffix(");") + ";").trimIndent() - val run = script.runJS("result") - return """,\s*'([^']+)""".toRegex().find(run)?.groupValues?.getOrNull(1) - } - - private fun String.runJS(variable: String): String { - val rhino = Context.enter() - rhino.optimizationLevel = -1 - val scope: Scriptable = rhino.initSafeStandardObjects() - val result: String - try { - rhino.evaluateString(scope, this, "JavaScript", 1, null) - result = Context.toString(scope.get(variable, scope)) - } finally { - Context.exit() - } - return result - } - - data class Tracks( - @JsonProperty("file") val file: String? = null, - @JsonProperty("label") val label: String? = null, - @JsonProperty("kind") val kind: String? = null, - ) } \ No newline at end of file diff --git a/Gomov/src/main/kotlin/com/hexated/Gomov.kt b/Gomov/src/main/kotlin/com/hexated/Gomov.kt index 948686b9..d1a8b699 100644 --- a/Gomov/src/main/kotlin/com/hexated/Gomov.kt +++ b/Gomov/src/main/kotlin/com/hexated/Gomov.kt @@ -20,7 +20,6 @@ open class Gomov : MainAPI() { TvType.TvSeries, TvType.AsianDrama ) - private val sources = arrayOf("https://chillx.top", "https://watchx.top", "https://bestx.stream") override val mainPage = mainPageOf( "page/%d/?s&search=advanced&post_type=movie" to "Movies", @@ -159,12 +158,7 @@ open class Gomov : MainAPI() { val iframe = app.get(fixUrl(ele.attr("href"))).document.selectFirst("div.gmr-embed-responsive iframe") .getIframeAttr()?.let { httpsify(it) } ?: return@apmap - when { - sources.any { iframe.startsWith(it) } -> NineTv.getUrl(iframe, "$directUrl/", subtitleCallback, callback) - else -> { - loadExtractor(iframe, "$directUrl/", subtitleCallback, callback) - } - } + loadExtractor(iframe, "$directUrl/", subtitleCallback, callback) } } else { document.select("div.tab-content-ajax").apmap { ele -> @@ -173,12 +167,7 @@ open class Gomov : MainAPI() { data = mapOf("action" to "muvipro_player_content", "tab" to ele.attr("id"), "post_id" to "$id") ).document.select("iframe").attr("src").let { httpsify(it) } - when { - sources.any { server.startsWith(it) } -> NineTv.getUrl(server, "$directUrl/", subtitleCallback, callback) - else -> { - loadExtractor(server, "$directUrl/", subtitleCallback, callback) - } - } + loadExtractor(server, "$directUrl/", subtitleCallback, callback) } } @@ -207,8 +196,4 @@ fun getBaseUrl(url: String): String { return URI(url).let { "${it.scheme}://${it.host}" } -} - -fun String.getHost(): String { - return fixTitle(URI(this).host.substringBeforeLast(".").substringAfterLast(".")) } \ No newline at end of file diff --git a/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt b/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt index e393fbc0..2b55fd0d 100644 --- a/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt +++ b/KuramanimeProvider/src/main/kotlin/com/hexated/Extractors.kt @@ -86,7 +86,7 @@ open class Kuramadrive : ExtractorApi() { val token = doc.select("meta[name=csrf-token]").attr("content") val routeCheckAvl = doc.select("input#routeCheckAvl").attr("value") - val json = app.post( + val json = app.get( routeCheckAvl, headers = mapOf( "X-Requested-With" to "XMLHttpRequest", "X-CSRF-TOKEN" to token diff --git a/Minioppai/build.gradle.kts b/Minioppai/build.gradle.kts index ee49ee06..87203b16 100644 --- a/Minioppai/build.gradle.kts +++ b/Minioppai/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 8 +version = 9 cloudstream { diff --git a/Minioppai/src/main/kotlin/com/hexated/Extractors.kt b/Minioppai/src/main/kotlin/com/hexated/Extractors.kt index 6a82e5d3..3e172453 100644 --- a/Minioppai/src/main/kotlin/com/hexated/Extractors.kt +++ b/Minioppai/src/main/kotlin/com/hexated/Extractors.kt @@ -44,10 +44,12 @@ open class Streampai : ExtractorApi() { this.name, this.name, fixUrl(it.file), - "$mainUrl/", + url, getQualityFromName(it.label), headers = mapOf( "Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5", + "Accept-Language" to "en-US,en;q=0.5", + "DNT" to "1", "Range" to "bytes=0-", "Sec-Fetch-Dest" to "video", "Sec-Fetch-Mode" to "no-cors", diff --git a/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt b/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt index 2dc220a1..7eedfd01 100644 --- a/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt +++ b/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt @@ -127,7 +127,7 @@ class Minioppai : MainAPI() { val name = it.selectFirst("div.epl-num")?.text() val link = fixUrlNull(it.selectFirst("a")?.attr("href")) ?: return@mapNotNull null Episode(link, name = name) - }.reversed() + } return newAnimeLoadResponse(title, url, TvType.NSFW) { engName = title diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index cad26cc1..7d131b74 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 199 +version = 200 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt index 917351ca..84985a8f 100644 --- a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt +++ b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt @@ -6,17 +6,13 @@ import com.lagradost.cloudstream3.extractors.StreamSB import com.lagradost.cloudstream3.extractors.Voe import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.APIHolder.getCaptchaToken -import com.lagradost.cloudstream3.ErrorLoadingException import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.apmap import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode import com.lagradost.cloudstream3.extractors.Pixeldrain -import com.lagradost.cloudstream3.extractors.helper.AesHelper +import com.lagradost.cloudstream3.extractors.ZplayerV2 import com.lagradost.cloudstream3.utils.* -import org.jsoup.nodes.Document -import org.mozilla.javascript.Context -import org.mozilla.javascript.Scriptable import java.math.BigInteger import java.security.MessageDigest @@ -238,83 +234,6 @@ open class VCloud : ExtractorApi() { } -object NineTv { - - suspend fun getUrl( - url: String, - referer: String?, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit - ) { - val mainUrl = getBaseUrl(url) - val res = app.get(url, headers = mapOf( - "Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8", - "Accept-Language" to "en-US,en;q=0.5", - "Referer" to (referer ?: ""), - )) - val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1) - val key = "tSIsE8FgpRkv3QQQ" - val decrypt = AesHelper.cryptoAESHandler(master ?: return, key.toByteArray(), false) - ?.replace("\\", "") - ?: throw ErrorLoadingException("failed to decrypt") - - val source = Regex(""""?file"?:\s*"([^"]+)""").find(decrypt)?.groupValues?.get(1) - val tracks = Regex("""tracks:\s*\[(.+)]""").find(decrypt)?.groupValues?.get(1) - val name = url.getHost() - - M3u8Helper.generateM3u8( - name, - source ?: return, - "$mainUrl/", - headers = mapOf( - "Accept" to "*/*", - "Connection" to "keep-alive", - "Sec-Fetch-Dest" to "empty", - "Sec-Fetch-Mode" to "cors", - "Sec-Fetch-Site" to "cross-site", - "Origin" to mainUrl, - ) - ).forEach(callback) - - AppUtils.tryParseJson>("[$tracks]") - ?.filter { it.kind == "captions" }?.map { track -> - subtitleCallback.invoke( - SubtitleFile( - track.label ?: "", - track.file ?: return@map null - ) - ) - } - } - - private fun Document.getKeys(): String? { - val script = (this.selectFirst("script:containsData(eval\\()")?.data() - ?.replace("eval(", "var result=")?.removeSuffix(");") + ";").trimIndent() - val run = script.runJS("result") - return """,\s*'([^']+)""".toRegex().find(run)?.groupValues?.getOrNull(1) - } - - private fun String.runJS(variable: String): String { - val rhino = Context.enter() - rhino.optimizationLevel = -1 - val scope: Scriptable = rhino.initSafeStandardObjects() - val result: String - try { - rhino.evaluateString(scope, this, "JavaScript", 1, null) - result = Context.toString(scope.get(variable, scope)) - } finally { - Context.exit() - } - return result - } - - data class Tracks( - @JsonProperty("file") val file: String? = null, - @JsonProperty("label") val label: String? = null, - @JsonProperty("kind") val kind: String? = null, - ) -} - open class Streamruby : ExtractorApi() { override val name = "Streamruby" override val mainUrl = "https://streamruby.com" @@ -447,4 +366,9 @@ class Yipsu : Voe() { class Embedwish : Filesim() { override val name = "Embedwish" override var mainUrl = "https://embedwish.com" +} + +class Netembed: ZplayerV2() { + override var name: String = "Netembed" + override var mainUrl: String = "https://play.netembed.xyz" } \ No newline at end of file diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 9a22d127..cca52441 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -246,6 +246,7 @@ object SoraExtractor : SoraStream() { } else { "$multimoviesAPI/episodes/$fixTitle-${season}x${episode}" } + invokeWpmovies(null, url, subtitleCallback, callback) } suspend fun invokeNetmovies( @@ -326,20 +327,7 @@ object SoraExtractor : SoraStream() { else -> it.embed_url } } ?: return@apmap - val sources = arrayOf( - "https://chillx.top", - "https://watchx.top", - "https://bestx.stream", - "https://w1.moviesapi.club" - ) when { - sources.any { source.startsWith(it) } -> NineTv.getUrl( - source, - "$referer/", - subtitleCallback, - callback - ) - !source.contains("youtube") -> { loadCustomExtractor(name, source, "$referer/", subtitleCallback, callback) } @@ -2078,7 +2066,7 @@ object SoraExtractor : SoraStream() { "$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key" } - val data = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 1024).bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") + val data = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 128).bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") val json = tryParseJson(data) json?.sources?.map { source -> @@ -2254,7 +2242,7 @@ object SoraExtractor : SoraStream() { val iframe = app.get(url, referer = "https://pressplay.top/").document.selectFirst("iframe") ?.attr("src") - NineTv.getUrl(iframe ?: return, "$nineTvAPI/", subtitleCallback, callback) + loadExtractor(iframe ?: return, "$nineTvAPI/", subtitleCallback, callback) } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt index d8d2431a..d79cb6dd 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt @@ -28,5 +28,6 @@ class SoraStreamPlugin: Plugin() { registerExtractorAPI(Embedwish()) registerExtractorAPI(Wishfast()) registerExtractorAPI(Uploadever()) + registerExtractorAPI(Netembed()) } } \ No newline at end of file diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 6ea13e9c..5ff06e4b 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -766,9 +766,8 @@ suspend fun getTvMoviesServer(url: String, season: Int?, episode: Int?): Pair>>()?.first()?.get("link") +suspend fun fetchSfServer(): String { + return app.get("https://raw.githubusercontent.com/hexated/cloudstream-resources/main/sfmovies_server").text } suspend fun getFilmxyCookies(url: String) = filmxyCookies ?: fetchFilmxyCookies(url).also { filmxyCookies = it } From 8f287186e5241e6a148a99b532709800bbfc38cd Mon Sep 17 00:00:00 2001 From: jack Date: Sat, 9 Dec 2023 02:59:36 +0700 Subject: [PATCH 20/47] update --- .../src/main/kotlin/com/hexated/Extractors.kt | 40 +++++++++++++++++-- .../main/kotlin/com/hexated/SoraExtractor.kt | 2 +- .../src/main/kotlin/com/hexated/SoraStream.kt | 18 ++++----- .../kotlin/com/hexated/SoraStreamPlugin.kt | 1 + 4 files changed, 48 insertions(+), 13 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt index 84985a8f..1a180240 100644 --- a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt +++ b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt @@ -11,6 +11,7 @@ import com.lagradost.cloudstream3.apmap import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode import com.lagradost.cloudstream3.extractors.Pixeldrain +import com.lagradost.cloudstream3.extractors.Vidplay import com.lagradost.cloudstream3.extractors.ZplayerV2 import com.lagradost.cloudstream3.utils.* import java.math.BigInteger @@ -309,6 +310,40 @@ open class Uploadever : ExtractorApi() { } +open class Netembed : ExtractorApi() { + override var name: String = "Netembed" + override var mainUrl: String = "https://play.netembed.xyz" + override val requiresReferer = true + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val response = app.get(url, referer = referer) + val script = getAndUnpack(response.text) + val m3u8 = Regex("((https:|http:)//.*\\.m3u8)").find(script)?.groupValues?.getOrNull(1) + + callback.invoke( + ExtractorLink( + this.name, + this.name, + m3u8 ?: return, + "$mainUrl/", + getQuality(m3u8), + INFER_TYPE + ) + ) + } + + private suspend fun getQuality(url: String) : Int { + val res = app.get(url, referer = "$mainUrl/").text + val regex = "#quality:\\s*(\\S+)".toRegex().find(res)?.groupValues?.get(1) + return getQualityFromName(regex) + } +} + class Streamwish : Filesim() { override val name = "Streamwish" override var mainUrl = "https://streamwish.to" @@ -368,7 +403,6 @@ class Embedwish : Filesim() { override var mainUrl = "https://embedwish.com" } -class Netembed: ZplayerV2() { - override var name: String = "Netembed" - override var mainUrl: String = "https://play.netembed.xyz" +class Vidplay2 : Vidplay() { + override val mainUrl = "https://vidplay.online" } \ No newline at end of file diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index cca52441..40a77af0 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2066,7 +2066,7 @@ object SoraExtractor : SoraStream() { "$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key" } - val data = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 128).bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") + val data = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 512).bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") val json = tryParseJson(data) json?.sources?.map { source -> diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 24337992..25f7e858 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -351,6 +351,15 @@ open class SoraStream : TmdbProvider() { val res = parseJson(data) argamap( + { + if (!res.isAnime) invokeBlackvid( + res.id, + res.season, + res.episode, + subtitleCallback, + callback + ) + }, { invokeDumpStream( res.title, @@ -672,15 +681,6 @@ open class SoraStream : TmdbProvider() { callback ) }, - { - if (!res.isAnime) invokeBlackvid( - res.id, - res.season, - res.episode, - subtitleCallback, - callback - ) - }, { if (!res.isAnime) invokeShowflix( res.title, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt index d79cb6dd..bc9ad896 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt @@ -29,5 +29,6 @@ class SoraStreamPlugin: Plugin() { registerExtractorAPI(Wishfast()) registerExtractorAPI(Uploadever()) registerExtractorAPI(Netembed()) + registerExtractorAPI(Vidplay2()) } } \ No newline at end of file From 7dfce0f19e0f4a2ed7c93878956a0591f7d89885 Mon Sep 17 00:00:00 2001 From: krishus96 <47269132+krishus96@users.noreply.github.com> Date: Sat, 9 Dec 2023 01:32:15 +0530 Subject: [PATCH 21/47] Update SoraExtractor.kt smashy update (#437) --- .../main/kotlin/com/hexated/SoraExtractor.kt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 40a77af0..eb10fd83 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1619,27 +1619,32 @@ object SoraExtractor : SoraStream() { } suspend fun invokeSmashyStream( - tmdbId: Int? = null, + imdbId: String? = null, season: Int? = null, episode: Int? = null, subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit, ) { val url = if (season == null) { - "$smashyStreamAPI/playere.php?tmdb=$tmdbId" + "$smashyStreamAPI/playere.php?imdb=$imdbId" } else { - "$smashyStreamAPI/playere.php?tmdb=$tmdbId&season=$season&episode=$episode" + "$smashyStreamAPI/playere.php?imdb=$imdbId&season=$season&episode=$episode" } app.get( - url, referer = "https://smashystream.xyz/" + url, referer = "https://smashystream.com/" ).document.select("div#_default-servers a.server").map { - it.attr("data-url") to it.text() + it.attr("data-id") to it.text() }.apmap { when { - it.second.contains(Regex("(Player F|Player FM)\$")) -> { + it.second.contains(Regex("(Player F|Player SE|Player N|Player D)")) -> { invokeSmashyFfix(it.second, it.first, url, callback) } + + it.second.equals("Player FM", true) -> invokeSmashyFm( + it.second, it.first, url, callback + ) + else -> return@apmap } } From bb7e0e41c240d9e037a9a0a59e6697a7168e987f Mon Sep 17 00:00:00 2001 From: krishus96 <47269132+krishus96@users.noreply.github.com> Date: Sat, 9 Dec 2023 01:32:23 +0530 Subject: [PATCH 22/47] Update SoraUtils.kt smashy (#436) --- .../src/main/kotlin/com/hexated/SoraUtils.kt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 5ff06e4b..b9c0f488 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -449,17 +449,20 @@ suspend fun invokeSmashyFfix( ref: String, callback: (ExtractorLink) -> Unit, ) { - val json = app.get(url, referer = ref, headers = mapOf("X-Requested-With" to "XMLHttpRequest")) - .parsedSafe() - json?.sourceUrls?.map { + val res = app.get(url, referer = ref).text + val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return + + source.split(",").map { links -> + val quality = Regex("\\[(\\S+)]").find(links)?.groupValues?.getOrNull(1)?.trim() + val link = links.removePrefix("[$quality]").trim() callback.invoke( ExtractorLink( "Smashy [$name]", "Smashy [$name]", - it, - if(name == "Player FM") "https://vidplay.site/" else "", - Qualities.P1080.value, - INFER_TYPE + decode(link).replace("\\/", "/"), + smashyStreamAPI, + getQualityFromName(quality), + INFER_TYPE, ) ) } @@ -1653,4 +1656,4 @@ object AESGCM { dateFormat.timeZone = TimeZone.getTimeZone("GMT") return dateFormat.format(Date()) } -} \ No newline at end of file +} From 21947a3b1d55ce31d0f37f3744d414bb0053f220 Mon Sep 17 00:00:00 2001 From: IndusAryan <125901294+IndusAryan@users.noreply.github.com> Date: Sat, 9 Dec 2023 01:32:29 +0530 Subject: [PATCH 23/47] update: few domains and kgp (#434) * Update SoraStream.kt * Update build.gradle.kts * Update YomoviesProvider.kt * Update Watchomovies.kt * Update build.gradle.kts * Update Hdmovie2.kt * Update build.gradle.kts * Update kotlin monorepo * fix grammar * Update Moviehab.kt * Update build.gradle.kts --- Moviehab/build.gradle.kts | 4 ++-- Moviehab/src/main/kotlin/com/hexated/Moviehab.kt | 2 +- Movierulzhd/build.gradle.kts | 2 +- Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt | 2 +- SoraStream/build.gradle.kts | 2 +- SoraStream/src/main/kotlin/com/hexated/SoraStream.kt | 4 ++-- YomoviesProvider/build.gradle.kts | 4 ++-- YomoviesProvider/src/main/kotlin/com/hexated/Watchomovies.kt | 2 +- .../src/main/kotlin/com/hexated/YomoviesProvider.kt | 2 +- build.gradle.kts | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Moviehab/build.gradle.kts b/Moviehab/build.gradle.kts index ee715c13..29b7c042 100644 --- a/Moviehab/build.gradle.kts +++ b/Moviehab/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 2 +version = 3 cloudstream { @@ -23,4 +23,4 @@ cloudstream { ) iconUrl = "https://www.google.com/s2/favicons?domain=moviehab.com&sz=%size%" -} \ No newline at end of file +} diff --git a/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt b/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt index 6a34788f..479f980c 100644 --- a/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt +++ b/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt @@ -12,7 +12,7 @@ import com.lagradost.cloudstream3.utils.loadExtractor import org.jsoup.nodes.Element class Moviehab : MainAPI() { - override var mainUrl = "https://vivamax.asia" + override var mainUrl = "https://nowshowing.to" override var name = "Moviehab" override val hasMainPage = true override var lang = "tl" diff --git a/Movierulzhd/build.gradle.kts b/Movierulzhd/build.gradle.kts index 5d09bb3d..70a1d007 100644 --- a/Movierulzhd/build.gradle.kts +++ b/Movierulzhd/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 53 +version = 54 cloudstream { diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt b/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt index fafaebdf..bb1e67ff 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt @@ -12,7 +12,7 @@ import org.jsoup.Jsoup class Hdmovie2 : Movierulzhd() { - override var mainUrl = "https://hdmovie2.boo" + override var mainUrl = "https://hdmovie2.li" override var name = "Hdmovie2" override val mainPage = mainPageOf( "trending" to "Trending", diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 7d131b74..5763a02e 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 200 +version = 201 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 25f7e858..9fe016b9 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -115,8 +115,8 @@ open class SoraStream : TmdbProvider() { const val uhdmoviesAPI = "https://uhdmovies.zip" const val gMoviesAPI = "https://gdrivemovies.xyz" const val hdmovies4uAPI = "https://hdmovies4u.band" - const val vegaMoviesAPI = "https://vegamovies.boo" - const val dotmoviesAPI = "https://dotmovies.im" + const val vegaMoviesAPI = "https://vegamovies.ec" + const val dotmoviesAPI = "https://dotmovies.tokyo" const val tvMoviesAPI = "https://www.tvseriesnmovies.com" const val moviezAddAPI = "https://ww3.moviezaddiction.click" const val bollyMazaAPI = "https://ww3.bollymaza.click" diff --git a/YomoviesProvider/build.gradle.kts b/YomoviesProvider/build.gradle.kts index 9519ad57..7934b290 100644 --- a/YomoviesProvider/build.gradle.kts +++ b/YomoviesProvider/build.gradle.kts @@ -1,12 +1,12 @@ // use an integer for version numbers -version = 24 +version = 25 cloudstream { language = "hi" // All of these properties are optional, you can safely remove them - description = "Include: Watchomovies" + description = "Includes: Watchomovies(NS*W), Max resolution is 720p in both extensions." authors = listOf("Hexated") /** diff --git a/YomoviesProvider/src/main/kotlin/com/hexated/Watchomovies.kt b/YomoviesProvider/src/main/kotlin/com/hexated/Watchomovies.kt index c2f77274..a184b23e 100644 --- a/YomoviesProvider/src/main/kotlin/com/hexated/Watchomovies.kt +++ b/YomoviesProvider/src/main/kotlin/com/hexated/Watchomovies.kt @@ -5,7 +5,7 @@ import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.mainPageOf class Watchomovies : YomoviesProvider() { - override var mainUrl = "https://watchomovies.beauty" + override var mainUrl = "https://watchomovies.lat" override var name = "Watchomovies" override var lang = "en" override val supportedTypes = setOf( diff --git a/YomoviesProvider/src/main/kotlin/com/hexated/YomoviesProvider.kt b/YomoviesProvider/src/main/kotlin/com/hexated/YomoviesProvider.kt index 283389b5..d84867d4 100644 --- a/YomoviesProvider/src/main/kotlin/com/hexated/YomoviesProvider.kt +++ b/YomoviesProvider/src/main/kotlin/com/hexated/YomoviesProvider.kt @@ -10,7 +10,7 @@ import org.jsoup.nodes.Element import java.net.URI open class YomoviesProvider : MainAPI() { - override var mainUrl = "https://yomovies.show" + override var mainUrl = "https://yomovies.media" private var directUrl = "" override var name = "Yomovies" override val hasMainPage = true diff --git a/build.gradle.kts b/build.gradle.kts index b71e2492..c59fbf5d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ buildscript { classpath("com.android.tools.build:gradle:7.0.4") // Cloudstream gradle plugin which makes everything work and builds plugins classpath("com.github.recloudstream:gradle:-SNAPSHOT") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.21") } } From 1922d6dc265684e1c68d850b6ac0f4d0b6f7b7c5 Mon Sep 17 00:00:00 2001 From: jack Date: Sat, 9 Dec 2023 04:10:52 +0700 Subject: [PATCH 24/47] fix --- .../main/kotlin/com/hexated/SoraExtractor.kt | 14 +-- .../src/main/kotlin/com/hexated/SoraParser.kt | 9 ++ .../src/main/kotlin/com/hexated/SoraStream.kt | 2 +- .../main/kotlin/com/hexated/SoraStreamLite.kt | 2 +- .../src/main/kotlin/com/hexated/SoraUtils.kt | 105 +++++++++++------- 5 files changed, 82 insertions(+), 50 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index eb10fd83..96de27d5 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1634,17 +1634,15 @@ object SoraExtractor : SoraStream() { app.get( url, referer = "https://smashystream.com/" ).document.select("div#_default-servers a.server").map { - it.attr("data-id") to it.text() + it.attr("data-url") to it.text() }.apmap { - when { - it.second.contains(Regex("(Player F|Player SE|Player N|Player D)")) -> { + when (it.second) { + "Player F" -> { invokeSmashyFfix(it.second, it.first, url, callback) } - - it.second.equals("Player FM", true) -> invokeSmashyFm( - it.second, it.first, url, callback - ) - + "Player D (Hindi)" -> { + invokeSmashyD(it.first, url, callback) + } else -> return@apmap } } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt b/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt index 980ceb46..811f3d27 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt @@ -424,4 +424,13 @@ data class RidoSearch( data class SmashySources( @JsonProperty("sourceUrls") var sourceUrls: ArrayList? = arrayListOf(), @JsonProperty("subtitleUrls") var subtitleUrls: String? = null, +) + +data class SmashyDSources( + @JsonProperty("sourceUrls") var sourceUrls: ArrayList? = arrayListOf(), +) + +data class SmashyDSourcesUrls( + @JsonProperty("file") var file: String? = null, + @JsonProperty("title") var title: String? = null, ) \ No newline at end of file diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 9fe016b9..68b209e8 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -536,7 +536,7 @@ open class SoraStream : TmdbProvider() { }, { if (!res.isAnime) invokeSmashyStream( - res.id, + res.imdbId, res.season, res.episode, subtitleCallback, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index ecc42e58..ae8deb22 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -144,7 +144,7 @@ class SoraStreamLite : SoraStream() { }, { if (!res.isAnime) invokeSmashyStream( - res.id, + res.imdbId, res.season, res.episode, subtitleCallback, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index b9c0f488..6aba1337 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -45,7 +45,7 @@ import kotlin.collections.ArrayList import kotlin.math.min var watchflxCookies: Map? = null -var filmxyCookies: Map? = null +var filmxyCookies: Map? = null var sfServer: String? = null val encodedIndex = arrayOf( @@ -131,6 +131,7 @@ fun String.filterMedia(title: String?, yearNum: Int?, seasonNum: Int?): Boolean seasonNum > 1 -> this.contains(Regex("(?i)(Season\\s0?1-0?$seasonNum)|(S0?1-S?0?$seasonNum)")) && this.contains( Regex("(?i)($fixTitle)|($title)") ) + else -> this.contains(Regex("(?i)(Season\\s0?1)|(S0?1)")) && this.contains( Regex("(?i)($fixTitle)|($title)") ) && this.contains("$yearNum") @@ -449,22 +450,31 @@ suspend fun invokeSmashyFfix( ref: String, callback: (ExtractorLink) -> Unit, ) { - val res = app.get(url, referer = ref).text - val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return + val json = app.get(url, referer = ref, headers = mapOf("X-Requested-With" to "XMLHttpRequest")) + .parsedSafe() + json?.sourceUrls?.map { + M3u8Helper.generateM3u8( + "Smashy [$name]", + it, + "" + ).forEach(callback) + } - source.split(",").map { links -> - val quality = Regex("\\[(\\S+)]").find(links)?.groupValues?.getOrNull(1)?.trim() - val link = links.removePrefix("[$quality]").trim() - callback.invoke( - ExtractorLink( - "Smashy [$name]", - "Smashy [$name]", - decode(link).replace("\\/", "/"), - smashyStreamAPI, - getQualityFromName(quality), - INFER_TYPE, - ) - ) +} + +suspend fun invokeSmashyD( + url: String, + ref: String, + callback: (ExtractorLink) -> Unit, +) { + val json = app.get(url, referer = ref, headers = mapOf("X-Requested-With" to "XMLHttpRequest")) + .parsedSafe() + json?.sourceUrls?.apmap { + M3u8Helper.generateM3u8( + "Smashy [Player D ${it.title}]", + it.file ?: return@apmap, + "" + ).forEach(callback) } } @@ -492,6 +502,7 @@ suspend fun getDumpIdAndType(title: String?, year: Int?, season: Int?): Pair { it.name?.contains( "$title", @@ -501,6 +512,7 @@ suspend fun getDumpIdAndType(title: String?, year: Int?, season: Int?): Pair { it.name?.contains(Regex("(?i)$title\\s?($season|${season.toRomanNumeral()}|Season\\s$season)")) == true && it.releaseTime == "$year" && it.domainType == 1 } @@ -536,25 +548,26 @@ suspend fun invokeDrivetot( ) { val res = app.get(url) val data = res.document.select("form input").associate { it.attr("name") to it.attr("value") } - app.post(res.url, data = data, cookies = res.cookies).document.select("div.card-body a").apmap { ele -> - val href = base64Decode(ele.attr("href").substringAfterLast("/")).let { - if(it.contains("hubcloud.lol")) it.replace("hubcloud.lol", "hubcloud.in") else it - } - loadExtractor(href, "$hdmovies4uAPI/", subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - link.source, - "${link.name} $tags [$size]", - link.url, - link.referer, - link.quality, - link.type, - link.headers, - link.extractorData + app.post(res.url, data = data, cookies = res.cookies).document.select("div.card-body a") + .apmap { ele -> + val href = base64Decode(ele.attr("href").substringAfterLast("/")).let { + if (it.contains("hubcloud.lol")) it.replace("hubcloud.lol", "hubcloud.in") else it + } + loadExtractor(href, "$hdmovies4uAPI/", subtitleCallback) { link -> + callback.invoke( + ExtractorLink( + link.source, + "${link.name} $tags [$size]", + link.url, + link.referer, + link.quality, + link.type, + link.headers, + link.extractorData + ) ) - ) + } } - } } suspend fun bypassBqrecipes(url: String): String? { @@ -773,10 +786,13 @@ suspend fun fetchSfServer(): String { return app.get("https://raw.githubusercontent.com/hexated/cloudstream-resources/main/sfmovies_server").text } -suspend fun getFilmxyCookies(url: String) = filmxyCookies ?: fetchFilmxyCookies(url).also { filmxyCookies = it } +suspend fun getFilmxyCookies(url: String) = + filmxyCookies ?: fetchFilmxyCookies(url).also { filmxyCookies = it } + suspend fun fetchFilmxyCookies(url: String): Map { - val defaultCookies = mutableMapOf("G_ENABLED_IDPS" to "google", "true_checker" to "1", "XID" to "1") + val defaultCookies = + mutableMapOf("G_ENABLED_IDPS" to "google", "true_checker" to "1", "XID" to "1") session.get( url, headers = mapOf( @@ -789,7 +805,10 @@ suspend fun fetchFilmxyCookies(url: String): Map { defaultCookies["PHPSESSID"] = phpsessid val userNonce = - app.get("$filmxyAPI/login/?redirect_to=$filmxyAPI/", cookies = defaultCookies).document.select("script") + app.get( + "$filmxyAPI/login/?redirect_to=$filmxyAPI/", + cookies = defaultCookies + ).document.select("script") .find { it.data().contains("var userNonce") }?.data()?.let { Regex("var\\suserNonce.*?\"(\\S+?)\";").find(it)?.groupValues?.get(1) } @@ -813,7 +832,8 @@ suspend fun fetchFilmxyCookies(url: String): Map { return cookieJar.plus(defaultCookies) } -suspend fun getWatchflxCookies() = watchflxCookies ?: fetchWatchflxCookies().also { watchflxCookies = it } +suspend fun getWatchflxCookies() = + watchflxCookies ?: fetchWatchflxCookies().also { watchflxCookies = it } suspend fun fetchWatchflxCookies(): Map { session.get(watchflxAPI) @@ -825,7 +845,8 @@ suspend fun fetchWatchflxCookies(): Map { "continue_as_temp" to "true" ), cookies = cookies, headers = mapOf("X-Requested-With" to "XMLHttpRequest") ) - return session.baseClient.cookieJar.loadForRequest(loginUrl.toHttpUrl()).associate { it.name to it.value } + return session.baseClient.cookieJar.loadForRequest(loginUrl.toHttpUrl()) + .associate { it.name to it.value } } fun Document.findTvMoviesIframe(): String? { @@ -1160,7 +1181,11 @@ fun String.decodePrimewireXor(key: String): String { fun vidsrctoDecrypt(text: String): String { val parse = Base64.decode(text.toByteArray(), Base64.URL_SAFE) val cipher = Cipher.getInstance("RC4") - cipher.init(Cipher.DECRYPT_MODE, SecretKeySpec("8z5Ag5wgagfsOuhz".toByteArray(), "RC4"), cipher.parameters) + cipher.init( + Cipher.DECRYPT_MODE, + SecretKeySpec("8z5Ag5wgagfsOuhz".toByteArray(), "RC4"), + cipher.parameters + ) return decode(cipher.doFinal(parse).toString(Charsets.UTF_8)) } @@ -1300,7 +1325,7 @@ fun isUpcoming(dateString: String?): Boolean { } } -fun getDate() : TmdbDate { +fun getDate(): TmdbDate { val formatter = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()) val calender = Calendar.getInstance() val today = formatter.format(calender.time) From d90b38f12cc1ccc24dfbac58fea0a1a4de8a0125 Mon Sep 17 00:00:00 2001 From: Peigie <150321365+Peigie@users.noreply.github.com> Date: Sat, 9 Dec 2023 18:45:50 +0800 Subject: [PATCH 25/47] Update Interface Moviehab.kt (#439) Inteface --- Moviehab/src/main/kotlin/com/hexated/Moviehab.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt b/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt index 479f980c..21f27395 100644 --- a/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt +++ b/Moviehab/src/main/kotlin/com/hexated/Moviehab.kt @@ -23,16 +23,13 @@ class Moviehab : MainAPI() { ) companion object { - private const val mainServer = "https://vivamax.asia" + private const val mainServer = "https://nowshowing.to" } override val mainPage = mainPageOf( - "$mainUrl/library/movies?sort_by=imdb_rate&page=" to "Movies by IMDB Rating", - "$mainUrl/library/shows?&sort_by=imdb_rate&page=" to "TV Shows by IMDB Rating", - "$mainUrl/library/movies?&sort_by=year&page=" to "New Movies", - "$mainUrl/library/shows?&sort_by=year&page=" to "New TV Shows", - "$mainUrl/library/movies?country=Philippines&sort_by=year&page=" to "New Philippines Movies", - "$mainUrl/library/shows?&country=Philippines&sort_by=year&page=" to "New Philippines TV Shows", + "$mainUrl/category/movies/" to "New Movies", + "$mainUrl/category/tv-series/" to "New TV Shows", + "$mainUrl/category/coming-soon/" to "Coming Soon", ) override suspend fun getMainPage( From 8cf21ba442ac5f1135cf6a2568bebc5b788a96ed Mon Sep 17 00:00:00 2001 From: jack Date: Sat, 9 Dec 2023 18:23:48 +0700 Subject: [PATCH 26/47] fix --- SoraStream/src/main/kotlin/com/hexated/Extractors.kt | 1 - SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt index 1a180240..8187406f 100644 --- a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt +++ b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt @@ -12,7 +12,6 @@ import com.lagradost.cloudstream3.app import com.lagradost.cloudstream3.base64Decode import com.lagradost.cloudstream3.extractors.Pixeldrain import com.lagradost.cloudstream3.extractors.Vidplay -import com.lagradost.cloudstream3.extractors.ZplayerV2 import com.lagradost.cloudstream3.utils.* import java.math.BigInteger import java.security.MessageDigest diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 96de27d5..93386186 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2069,7 +2069,9 @@ object SoraExtractor : SoraStream() { "$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key" } - val data = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 512).bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") + val res = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 512) + delay(2000) + val data = res.bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") val json = tryParseJson(data) json?.sources?.map { source -> @@ -2460,7 +2462,7 @@ object SoraExtractor : SoraStream() { ExtractorLink( "SFMovies", "SFMovies", - fixUrl(video, getSfServer() ?: return), + fixUrl(video, getSfServer()), "", Qualities.P1080.value, INFER_TYPE From 9b05f65f2ca8211b18df8b222a260af8f2231b29 Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 10 Dec 2023 02:06:33 +0700 Subject: [PATCH 27/47] added Animesaga --- Movierulzhd/build.gradle.kts | 4 +- .../src/main/kotlin/com/hexated/Animesaga.kt | 17 +++ .../src/main/kotlin/com/hexated/Extractors.kt | 8 +- .../main/kotlin/com/hexated/Movierulzhd.kt | 55 +++----- .../kotlin/com/hexated/MovierulzhdPlugin.kt | 2 + .../main/kotlin/com/hexated/SoraExtractor.kt | 118 ++++++++++++------ 6 files changed, 123 insertions(+), 81 deletions(-) create mode 100644 Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt diff --git a/Movierulzhd/build.gradle.kts b/Movierulzhd/build.gradle.kts index 70a1d007..08c2a426 100644 --- a/Movierulzhd/build.gradle.kts +++ b/Movierulzhd/build.gradle.kts @@ -1,12 +1,12 @@ // use an integer for version numbers -version = 54 +version = 55 cloudstream { language = "hi" // All of these properties are optional, you can safely remove them - description = "Include: Hdmovie2" + description = "Includes: Hdmovie2, Animesaga" authors = listOf("Hexated") /** diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt b/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt new file mode 100644 index 00000000..e4bd115b --- /dev/null +++ b/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt @@ -0,0 +1,17 @@ +package com.hexated + +import com.lagradost.cloudstream3.mainPageOf + +class Animesaga : Movierulzhd() { + + override var mainUrl = "https://www.animesaga.in" + override var name = "Animesaga" + + override val mainPage = mainPageOf( + "movies" to "Movies", + "tvshows" to "TV-Shows", + "genre/hindi-dub" to "Hindi Dub", + ) + + +} \ No newline at end of file diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Extractors.kt b/Movierulzhd/src/main/kotlin/com/hexated/Extractors.kt index 37772c96..c3a84b83 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Extractors.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Extractors.kt @@ -2,10 +2,9 @@ package com.hexated import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.app +import com.lagradost.cloudstream3.extractors.Chillx import com.lagradost.cloudstream3.utils.* -const val twoEmbedAPI = "https://www.2embed.to" - class Sbnmp : ExtractorApi() { override val name = "Sbnmp" override var mainUrl = "https://sbnmp.bar" @@ -66,3 +65,8 @@ open class Akamaicdn : ExtractorApi() { ) } } + +class AnimesagaStream : Chillx() { + override val name = "AnimesagaStream" + override val mainUrl = "https://stream.animesaga.in" +} diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt index b66bf0a2..a7b03d3a 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt @@ -45,7 +45,7 @@ open class Movierulzhd : MainAPI() { document = app.get(request.data + page, interceptor = interceptor).document } val home = - document.select("div.items.normal article, div#archive-content article").mapNotNull { + document.select("div.items.normal article, div#archive-content article, div.items.full article").mapNotNull { it.toSearchResult() } return newHomePageResponse(request.name, home) @@ -74,7 +74,7 @@ open class Movierulzhd : MainAPI() { private fun Element.toSearchResult(): SearchResponse? { val title = this.selectFirst("h3 > a")?.text() ?: return null val href = getProperLink(fixUrl(this.selectFirst("h3 > a")!!.attr("href"))) - val posterUrl = fixUrlNull(this.select("div.poster img").last()?.attr("src")) + val posterUrl = fixUrlNull(this.select("div.poster img").last()?.imageFromElement()) val quality = getQualityFromString(this.select("span.quality").text()) return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl @@ -112,7 +112,7 @@ open class Movierulzhd : MainAPI() { directUrl = getBaseUrl(request.url) val title = document.selectFirst("div.data > h1")?.text()?.trim().toString() - val poster = fixUrlNull(document.select("div.poster img:last-child").attr("src")) + val poster = fixUrlNull(document.selectFirst("div.poster img:last-child")?.imageFromElement()) val tags = document.select("div.sgeneros > a").map { it.text() } val year = Regex(",\\s?(\\d+)").find( @@ -139,7 +139,7 @@ open class Movierulzhd : MainAPI() { val recName = it.selectFirst("a")!!.attr("href").toString().removeSuffix("/").split("/").last() val recHref = it.selectFirst("a")!!.attr("href") - val recPosterUrl = it.selectFirst("img")?.attr("src").toString() + val recPosterUrl = it.selectFirst("img")?.imageFromElement() newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { this.posterUrl = recPosterUrl posterHeaders = interceptor.getCookieHeaders(url).toMap() @@ -151,7 +151,7 @@ open class Movierulzhd : MainAPI() { document.select("ul.episodios > li").map { val href = it.select("a").attr("href") val name = fixTitle(it.select("div.episodiotitle > a").text().trim()) - val image = it.select("div.imagen > img").attr("src") + val image = it.selectFirst("div.imagen > img")?.imageFromElement() val episode = it.select("div.numerando").text().replace(" ", "").split("-").last() .toIntOrNull() @@ -230,18 +230,20 @@ open class Movierulzhd : MainAPI() { referer = data, headers = mapOf("X-Requested-With" to "XMLHttpRequest") ).parsed().embed_url - if (!source.contains("youtube")) loadCustomExtractor(loadData?.tag, source, "$directUrl/", subtitleCallback, callback) + if (!source.contains("youtube")) loadExtractor(source, "$directUrl/", subtitleCallback, callback) } else { var document = app.get(data).document if (document.select("title").text() == "Just a moment...") { document = app.get(data, interceptor = interceptor).document } - val id = document.select("meta#dooplay-ajax-counter").attr("data-postid") - val type = if (data.contains("/movies/")) "movie" else "tv" document.select("ul#playeroptionsul > li").map { - it.attr("data-nume") to it.select("span.title").text() - }.apmap { (nume, tag) -> + Triple( + it.attr("data-post"), + it.attr("data-nume"), + it.attr("data-type") + ) + }.apmap { (id, nume, type) -> val source = app.post( url = "$directUrl/wp-admin/admin-ajax.php", data = mapOf( @@ -255,8 +257,7 @@ open class Movierulzhd : MainAPI() { ).parsed().embed_url when { - !source.contains("youtube") -> loadCustomExtractor( - tag, + !source.contains("youtube") -> loadExtractor( source, "$directUrl/", subtitleCallback, @@ -269,30 +270,12 @@ open class Movierulzhd : MainAPI() { return true } - private suspend fun loadCustomExtractor( - name: String? = null, - url: String, - referer: String? = null, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit, - quality: Int? = null, - ) { - loadExtractor(url, referer, subtitleCallback) { link -> - callback.invoke( - ExtractorLink( - name ?: link.source, - name ?: link.name, - link.url, - link.referer, - when (link.type) { - ExtractorLinkType.M3U8 -> link.quality - else -> quality ?: link.quality - }, - link.type, - link.headers, - link.extractorData - ) - ) + private fun Element.imageFromElement(): String? { + return when { + this.hasAttr("data-src") -> this.attr("abs:data-src") + this.hasAttr("data-lazy-src") -> this.attr("abs:data-lazy-src") + this.hasAttr("srcset") -> this.attr("abs:srcset").substringBefore(" ") + else -> this.attr("abs:src") } } diff --git a/Movierulzhd/src/main/kotlin/com/hexated/MovierulzhdPlugin.kt b/Movierulzhd/src/main/kotlin/com/hexated/MovierulzhdPlugin.kt index 9ef951a8..680b49a0 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/MovierulzhdPlugin.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/MovierulzhdPlugin.kt @@ -11,7 +11,9 @@ class MovierulzhdPlugin: Plugin() { // All providers should be added in this manner. Please don't edit the providers list directly. registerMainAPI(Movierulzhd()) registerMainAPI(Hdmovie2()) + registerMainAPI(Animesaga()) registerExtractorAPI(Sbnmp()) registerExtractorAPI(Akamaicdn()) + registerExtractorAPI(AnimesagaStream()) } } \ No newline at end of file diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 93386186..fd03beee 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -8,9 +8,11 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.nicehttp.Requests import com.lagradost.nicehttp.Session import com.lagradost.cloudstream3.extractors.helper.AesHelper.cryptoAESHandler +import com.lagradost.cloudstream3.mvvm.suspendSafeApiCall import com.lagradost.cloudstream3.network.CloudflareKiller import com.lagradost.nicehttp.RequestBodyTypes import kotlinx.coroutines.delay +import kotlinx.coroutines.runBlocking import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody import org.jsoup.Jsoup @@ -110,7 +112,8 @@ object SoraExtractor : SoraStream() { "$vidSrcAPI/embed/tv?tmdb=$id&season=$season&episode=$episode" } - val iframedoc = app.get(url).document.select("iframe#player_iframe").attr("src").let { httpsify(it) } + val iframedoc = + app.get(url).document.select("iframe#player_iframe").attr("src").let { httpsify(it) } val doc = app.get(iframedoc, referer = url).document val index = doc.select("body").attr("data-i") @@ -680,12 +683,20 @@ object SoraExtractor : SoraStream() { "$vidsrctoAPI/embed/tv/$imdbId/$season/$episode" } - val mediaId = app.get(url).document.selectFirst("ul.episodes li a")?.attr("data-id") ?: return + val mediaId = + app.get(url).document.selectFirst("ul.episodes li a")?.attr("data-id") ?: return - app.get("$vidsrctoAPI/ajax/embed/episode/$mediaId/sources").parsedSafe()?.result?.apmap { - val encUrl = app.get("$vidsrctoAPI/ajax/embed/source/${it.id}").parsedSafe()?.result?.url - loadExtractor(vidsrctoDecrypt(encUrl ?: return@apmap), "$vidsrctoAPI/", subtitleCallback, callback) - } + app.get("$vidsrctoAPI/ajax/embed/episode/$mediaId/sources") + .parsedSafe()?.result?.apmap { + val encUrl = app.get("$vidsrctoAPI/ajax/embed/source/${it.id}") + .parsedSafe()?.result?.url + loadExtractor( + vidsrctoDecrypt(encUrl ?: return@apmap), + "$vidsrctoAPI/", + subtitleCallback, + callback + ) + } val subtitles = app.get("$vidsrctoAPI/ajax/embed/episode/$mediaId/subtitles").text tryParseJson>(subtitles)?.map { @@ -1107,30 +1118,32 @@ object SoraExtractor : SoraStream() { val sTag = if (season == null) "" else "(Season $season|S$seasonSlug)" res.select("div.entry-content > $hTag:matches((?i)$sTag.*(1080p|2160p))") .filter { element -> !element.text().contains("Download", true) }.apmap { - val tags = - """(?:1080p|2160p)(.*)""".toRegex().find(it.text())?.groupValues?.get(1)?.trim() - val href = - it.nextElementSibling()?.select("a:contains($aTag)")?.attr("href")?.let { url -> - app.post( - "${getBaseUrl(url)}/red.php", - data = mapOf("link" to url), - referer = "$api/" - ).text.substringAfter("location.href = \"").substringBefore("\"") - } - val selector = - if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)" - val server = - app.get(href ?: return@apmap).document.selectFirst("div.entry-content > $selector") - ?.attr("href") - loadCustomTagExtractor( - tags, - server ?: return@apmap, - "$api/", - subtitleCallback, - callback, - getIndexQuality(it.text()) - ) - } + val tags = + """(?:1080p|2160p)(.*)""".toRegex().find(it.text())?.groupValues?.get(1)?.trim() + val href = + it.nextElementSibling()?.select("a:contains($aTag)")?.attr("href")?.let { url -> + app.post( + "${getBaseUrl(url)}/red.php", + data = mapOf("link" to url), + referer = "$api/" + ).text.substringAfter("location.href = \"").substringBefore("\"") + } + val selector = + if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)" + val server = + app.get( + href ?: return@apmap + ).document.selectFirst("div.entry-content > $selector") + ?.attr("href") + loadCustomTagExtractor( + tags, + server ?: return@apmap, + "$api/", + subtitleCallback, + callback, + getIndexQuality(it.text()) + ) + } } suspend fun invokeHdmovies4u( @@ -1207,7 +1220,14 @@ object SoraExtractor : SoraStream() { iframe.apmap { (iframeLink, title) -> val size = Regex("(?i)\\s(\\S+gb|mb)").find(title)?.groupValues?.getOrNull(1) - loadCustomTagExtractor("[$size]",iframeLink, "$gMoviesAPI/", subtitleCallback, callback, getIndexQuality(title)) + loadCustomTagExtractor( + "[$size]", + iframeLink, + "$gMoviesAPI/", + subtitleCallback, + callback, + getIndexQuality(title) + ) } } @@ -1298,7 +1318,9 @@ object SoraExtractor : SoraStream() { scriptData.firstOrNull() } else { scriptData.find { - it.first.contains(Regex("(?i)$title \\($year\\s?\\)")) && if(season!=null) it.third?.contains("-tvshow-") == true else it.third?.contains("-movie-") == true + it.first.contains(Regex("(?i)$title \\($year\\s?\\)")) && if (season != null) it.third?.contains( + "-tvshow-" + ) == true else it.third?.contains("-movie-") == true } } @@ -1521,10 +1543,16 @@ object SoraExtractor : SoraStream() { iframe?.apmap { val iframeDoc = app.get(it?.first ?: return@apmap).document val formUrl = iframeDoc.select("form").attr("action") - val formData = iframeDoc.select("form button").associate { v -> v.attr("name") to v.attr("value") } + val formData = + iframeDoc.select("form button").associate { v -> v.attr("name") to v.attr("value") } - val videoUrl = app.post(formUrl, data = formData, referer = it.first).document.selectFirst("div.d-flex.justify-content-center.flex-wrap a")?.attr("href") - val quality = Regex("(\\d{3,4})p").find(it.second)?.groupValues?.getOrNull(1)?.toIntOrNull() + val videoUrl = app.post( + formUrl, + data = formData, + referer = it.first + ).document.selectFirst("div.d-flex.justify-content-center.flex-wrap a")?.attr("href") + val quality = + Regex("(\\d{3,4})p").find(it.second)?.groupValues?.getOrNull(1)?.toIntOrNull() val qualityName = it.second.replace("${quality}p", "").trim() callback.invoke( @@ -1640,9 +1668,11 @@ object SoraExtractor : SoraStream() { "Player F" -> { invokeSmashyFfix(it.second, it.first, url, callback) } + "Player D (Hindi)" -> { invokeSmashyD(it.first, url, callback) } + else -> return@apmap } } @@ -1917,7 +1947,8 @@ object SoraExtractor : SoraStream() { "$twoEmbedAPI/embedtv/$imdbId&s=$season&e=$episode" } - val framesrc = app.get(url).document.selectFirst("iframe#iframesrc")?.attr("data-src") ?: return + val framesrc = + app.get(url).document.selectFirst("iframe#iframesrc")?.attr("data-src") ?: return val ref = getBaseUrl(framesrc) val id = framesrc.substringAfter("id=").substringBefore("&") loadExtractor("https://wishfast.top/e/$id", "$ref/", subtitleCallback, callback) @@ -2069,9 +2100,12 @@ object SoraExtractor : SoraStream() { "$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key" } - val res = app.get(url, timeout = 120L, referer = ref).okhttpResponse.peekBody(1024 * 512) - delay(2000) - val data = res.bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") + val data = app.get( + url, + timeout = 120L, + referer = ref + ).okhttpResponse.peekBody(1024 * 512).source().buffer.readByteArray() + .decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") val json = tryParseJson(data) json?.sources?.map { source -> @@ -2260,9 +2294,11 @@ object SoraExtractor : SoraStream() { ) { val referer = "https://bflix.gs/" val slug = getEpisodeSlug(season, episode) - var url = if (season == null) "$nowTvAPI/$tmdbId.mp4" else "$nowTvAPI/tv/$tmdbId/s${season}e${slug.second}.mp4" + var url = + if (season == null) "$nowTvAPI/$tmdbId.mp4" else "$nowTvAPI/tv/$tmdbId/s${season}e${slug.second}.mp4" if (!app.get(url, referer = referer).isSuccessful) { - url = if (season == null) "$nowTvAPI/$imdbId.mp4" else "$nowTvAPI/tv/$imdbId/s${season}e${slug.second}.mp4" + url = + if (season == null) "$nowTvAPI/$imdbId.mp4" else "$nowTvAPI/tv/$imdbId/s${season}e${slug.second}.mp4" if (!app.get(url, referer = referer).isSuccessful) return } callback.invoke( From 4af99964f0c39b320af41da984f9d127acb63cf9 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sat, 9 Dec 2023 13:01:24 -0700 Subject: [PATCH 28/47] sora: support content ratings (#442) #441 --- SoraStream/src/main/kotlin/com/hexated/SoraStream.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 68b209e8..2167135f 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -300,6 +300,7 @@ open class SoraStream : TmdbProvider() { this.showStatus = getStatus(res.status) this.recommendations = recommendations this.actors = actors + this.contentRating = fetchContentRating(data.id, "US") addTrailer(trailer) addTMDbId(data.id.toString()) addImdbId(res.external_ids?.imdb_id) @@ -334,6 +335,7 @@ open class SoraStream : TmdbProvider() { this.rating = rating this.recommendations = recommendations this.actors = actors + this.contentRating = fetchContentRating(data.id, "US") addTrailer(trailer) addTMDbId(data.id.toString()) addImdbId(res.external_ids?.imdb_id) From d89a7cfe2d2b3d690cd29d6b5cb187c853349def Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 10 Dec 2023 03:28:40 +0700 Subject: [PATCH 29/47] small fix --- .../main/kotlin/com/hexated/Movierulzhd.kt | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt index a7b03d3a..9f609764 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt @@ -230,7 +230,7 @@ open class Movierulzhd : MainAPI() { referer = data, headers = mapOf("X-Requested-With" to "XMLHttpRequest") ).parsed().embed_url - if (!source.contains("youtube")) loadExtractor(source, "$directUrl/", subtitleCallback, callback) + if (!source.contains("youtube")) loadCustomExtractor(source, "$directUrl/", subtitleCallback, callback) } else { var document = app.get(data).document if (document.select("title").text() == "Just a moment...") { @@ -257,7 +257,7 @@ open class Movierulzhd : MainAPI() { ).parsed().embed_url when { - !source.contains("youtube") -> loadExtractor( + !source.contains("youtube") -> loadCustomExtractor( source, "$directUrl/", subtitleCallback, @@ -279,6 +279,34 @@ open class Movierulzhd : MainAPI() { } } + private suspend fun loadCustomExtractor( + url: String, + referer: String? = null, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit, + quality: Int? = null, + ) { + loadExtractor(url, referer, subtitleCallback) { link -> + if(link.quality == Qualities.Unknown.value) { + callback.invoke( + ExtractorLink( + link.source, + link.name, + link.url, + link.referer, + when (link.type) { + ExtractorLinkType.M3U8 -> link.quality + else -> quality ?: link.quality + }, + link.type, + link.headers, + link.extractorData + ) + ) + } + } + } + data class LinkData( val tag: String? = null, val type: String? = null, From 4e3678a0468c2b0c4236f1441e3d2a984b93a4fd Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 10 Dec 2023 06:04:53 +0700 Subject: [PATCH 30/47] sora: bump --- SoraStream/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/SoraExtractor.kt | 13 +++++++------ .../src/main/kotlin/com/hexated/SoraStream.kt | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 5763a02e..ef279db3 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 201 +version = 202 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index fd03beee..dd8978fb 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2213,12 +2213,13 @@ object SoraExtractor : SoraStream() { "$watchOnlineAPI/shows/play/$id-$slug-$year" } - val doc = app.get( - url.replace( - watchOnlineAPI, - "https://ditairridgeleg.monster" - ) + "?mid=1&sid=9k9iupt5sebbnfajrc6ti3ht7l&sec=1974bc4a902c4d69fcbab261dcec69094a9b8164&t=1694986826984" - ).document + val headers = mapOf( + "Cookie" to "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.1702130869.2.0.1702130869.0.0.0", + "Connection" to "keep-alive", + "x-requested-with" to "com.wwcinematv", + ) + + val doc = app.get(url, headers = headers).document val script = doc.selectFirst("script:containsData(hash:)")?.data() val hash = Regex("hash:\\s*['\"](\\S+)['\"]").find(script ?: return)?.groupValues?.get(1) val expires = Regex("expires:\\s*(\\d+)").find(script)?.groupValues?.get(1) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 2167135f..df4da91e 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -93,7 +93,7 @@ open class SoraStream : TmdbProvider() { const val flixonAPI = "https://flixon.lol" const val smashyStreamAPI = "https://embed.smashystream.com" const val watchSomuchAPI = "https://watchsomuch.tv" // sub only - const val watchOnlineAPI = "https://lookmovie.foundation" + const val watchOnlineAPI = "https://www.lookmovie2.to" const val nineTvAPI = "https://moviesapi.club" const val nowTvAPI = "https://myfilestorage.xyz" const val gokuAPI = "https://goku.sx" From d5d15afc2faaf8eff118882a012a95c6c6772818 Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 10 Dec 2023 06:38:31 +0700 Subject: [PATCH 31/47] fix --- .../main/kotlin/com/hexated/SoraExtractor.kt | 20 +++++++++---------- .../src/main/kotlin/com/hexated/SoraStream.kt | 6 +++--- .../main/kotlin/com/hexated/SoraStreamLite.kt | 4 ++-- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index dd8978fb..1d956df4 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -8,11 +8,9 @@ import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.nicehttp.Requests import com.lagradost.nicehttp.Session import com.lagradost.cloudstream3.extractors.helper.AesHelper.cryptoAESHandler -import com.lagradost.cloudstream3.mvvm.suspendSafeApiCall import com.lagradost.cloudstream3.network.CloudflareKiller import com.lagradost.nicehttp.RequestBodyTypes import kotlinx.coroutines.delay -import kotlinx.coroutines.runBlocking import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody import org.jsoup.Jsoup @@ -2196,7 +2194,7 @@ object SoraExtractor : SoraStream() { } - suspend fun invokeWatchOnline( + suspend fun invokeCinemaTv( imdbId: String? = null, title: String? = null, year: Int? = null, @@ -2208,9 +2206,9 @@ object SoraExtractor : SoraStream() { val id = imdbId?.removePrefix("tt") val slug = title.createSlug() val url = if (season == null) { - "$watchOnlineAPI/movies/play/$id-$slug-$year" + "$cinemaTvAPI/movies/play/$id-$slug-$year" } else { - "$watchOnlineAPI/shows/play/$id-$slug-$year" + "$cinemaTvAPI/shows/play/$id-$slug-$year" } val headers = mapOf( @@ -2230,9 +2228,9 @@ object SoraExtractor : SoraStream() { }).let { it.toRegex().find(script)?.groupValues?.get(1) } val videoUrl = if (season == null) { - "$watchOnlineAPI/api/v1/security/movie-access?id_movie=$episodeId&hash=$hash&expires=$expires" + "$cinemaTvAPI/api/v1/security/movie-access?id_movie=$episodeId&hash=$hash&expires=$expires" } else { - "$watchOnlineAPI/api/v1/security/episode-access?id_episode=$episodeId&hash=$hash&expires=$expires" + "$cinemaTvAPI/api/v1/security/episode-access?id_episode=$episodeId&hash=$hash&expires=$expires" } val sources = app.get( @@ -2244,10 +2242,10 @@ object SoraExtractor : SoraStream() { sources?.streams?.mapKeys { source -> callback.invoke( ExtractorLink( - "WatchOnline", - "WatchOnline", + "CinemaTv", + "CinemaTv", source.value, - "$watchOnlineAPI/", + "$cinemaTvAPI/", getQualityFromName(source.key), true ) @@ -2259,7 +2257,7 @@ object SoraExtractor : SoraStream() { subtitleCallback.invoke( SubtitleFile( sub.language ?: return@map, - if (file.startsWith("[")) return@map else fixUrl(file, watchOnlineAPI), + if (file.startsWith("[")) return@map else fixUrl(file, cinemaTvAPI), ) ) } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index df4da91e..bf2ea286 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -43,7 +43,7 @@ import com.hexated.SoraExtractor.invokeTvMovies import com.hexated.SoraExtractor.invokeUhdmovies import com.hexated.SoraExtractor.invokeVegamovies import com.hexated.SoraExtractor.invokeVidsrcto -import com.hexated.SoraExtractor.invokeWatchOnline +import com.hexated.SoraExtractor.invokeCinemaTv import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZshow import com.lagradost.cloudstream3.LoadResponse.Companion.addImdbId @@ -93,7 +93,7 @@ open class SoraStream : TmdbProvider() { const val flixonAPI = "https://flixon.lol" const val smashyStreamAPI = "https://embed.smashystream.com" const val watchSomuchAPI = "https://watchsomuch.tv" // sub only - const val watchOnlineAPI = "https://www.lookmovie2.to" + var cinemaTvAPI = base64DecodeAPI("bw==LnQ=ZTI=dmk=bW8=b2s=bG8=dy4=d3c=Ly8=czo=dHA=aHQ=") const val nineTvAPI = "https://moviesapi.club" const val nowTvAPI = "https://myfilestorage.xyz" const val gokuAPI = "https://goku.sx" @@ -572,7 +572,7 @@ open class SoraStream : TmdbProvider() { ) }, { - invokeWatchOnline( + invokeCinemaTv( res.imdbId, res.title, res.airedYear ?: res.year, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index ae8deb22..30fa36dc 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -29,7 +29,7 @@ import com.hexated.SoraExtractor.invokeSFMovies import com.hexated.SoraExtractor.invokeShowflix import com.hexated.SoraExtractor.invokeVidSrc import com.hexated.SoraExtractor.invokeVidsrcto -import com.hexated.SoraExtractor.invokeWatchOnline +import com.hexated.SoraExtractor.invokeCinemaTv import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZshow import com.lagradost.cloudstream3.SubtitleFile @@ -198,7 +198,7 @@ class SoraStreamLite : SoraStream() { if (!res.isAnime) invokeFlixon(res.id, res.imdbId, res.season, res.episode, callback) }, { - invokeWatchOnline( + invokeCinemaTv( res.imdbId, res.title, res.airedYear ?: res.year, From ddcee477a96631dd7ca34f91aacf0cf1b8a16296 Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 10 Dec 2023 07:21:35 +0700 Subject: [PATCH 32/47] fix --- SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 1d956df4..c1434777 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2212,7 +2212,7 @@ object SoraExtractor : SoraStream() { } val headers = mapOf( - "Cookie" to "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.1702130869.2.0.1702130869.0.0.0", + "Cookie" to "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTimeMS.2.0.$unixTimeMS.0.0.0", "Connection" to "keep-alive", "x-requested-with" to "com.wwcinematv", ) From 82d48559606bc117a97796fee7ad4a80e73d2ba0 Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 10 Dec 2023 10:12:41 +0700 Subject: [PATCH 33/47] update --- .github/workflows/build.yml | 2 ++ SoraStream/build.gradle.kts | 1 + SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 5 ++--- SoraStream/src/main/kotlin/com/hexated/SoraStream.kt | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ce91c3a..66da7bca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,6 +58,7 @@ jobs: PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }} ZSHOW_API: ${{ secrets.ZSHOW_API }} SFMOVIES_API: ${{ secrets.SFMOVIES_API }} + CINEMATV_API: ${{ secrets.CINEMATV_API }} run: | cd $GITHUB_WORKSPACE/src echo SORA_API=$SORA_API >> local.properties @@ -76,6 +77,7 @@ jobs: echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> local.properties echo ZSHOW_API=$ZSHOW_API >> local.properties echo SFMOVIES_API=$SFMOVIES_API >> local.properties + echo CINEMATV_API=$CINEMATV_API >> local.properties - name: Build Plugins run: | diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index ef279db3..b02a10d6 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -9,6 +9,7 @@ android { properties.load(project.rootProject.file("local.properties").inputStream()) buildConfigField("String", "TMDB_API", "\"${properties.getProperty("TMDB_API")}\"") + buildConfigField("String", "CINEMATV_API", "\"${properties.getProperty("CINEMATV_API")}\"") buildConfigField("String", "SFMOVIES_API", "\"${properties.getProperty("SFMOVIES_API")}\"") buildConfigField("String", "ZSHOW_API", "\"${properties.getProperty("ZSHOW_API")}\"") buildConfigField("String", "SORA_API", "\"${properties.getProperty("SORA_API")}\"") diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index c1434777..49a837c8 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -275,12 +275,11 @@ object SoraExtractor : SoraStream() { subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit ) { - val api = BuildConfig.ZSHOW_API val fixTitle = title.createSlug() val url = if (season == null) { - "$api/movie/$fixTitle-$year" + "$zshowAPI/movie/$fixTitle-$year" } else { - "$api/episode/$fixTitle-season-$season-episode-$episode" + "$zshowAPI/episode/$fixTitle-season-$season-episode-$episode" } invokeWpmovies("ZShow", url, subtitleCallback, callback, encrypt = true) } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index bf2ea286..23198212 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -93,10 +93,11 @@ open class SoraStream : TmdbProvider() { const val flixonAPI = "https://flixon.lol" const val smashyStreamAPI = "https://embed.smashystream.com" const val watchSomuchAPI = "https://watchsomuch.tv" // sub only - var cinemaTvAPI = base64DecodeAPI("bw==LnQ=ZTI=dmk=bW8=b2s=bG8=dy4=d3c=Ly8=czo=dHA=aHQ=") + var cinemaTvAPI = BuildConfig.CINEMATV_API const val nineTvAPI = "https://moviesapi.club" const val nowTvAPI = "https://myfilestorage.xyz" const val gokuAPI = "https://goku.sx" + const val zshowAPI = BuildConfig.ZSHOW_API const val ridomoviesAPI = "https://ridomovies.pw" const val navyAPI = "https://navy-issue-i-239.site" const val emoviesAPI = "https://emovies.si" From e008764fd1dd9ad143084ebc5f47dd74a2f840d7 Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 10 Dec 2023 10:24:44 +0700 Subject: [PATCH 34/47] update --- SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 2 +- SoraStream/src/main/kotlin/com/hexated/SoraParser.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 49a837c8..d30e0819 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2236,7 +2236,7 @@ object SoraExtractor : SoraStream() { videoUrl, referer = url, headers = mapOf("X-Requested-With" to "XMLHttpRequest") - ).parsedSafe() + ).parsedSafe() sources?.streams?.mapKeys { source -> callback.invoke( diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt b/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt index 811f3d27..229baa2f 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraParser.kt @@ -152,14 +152,14 @@ data class JikanResponse( @JsonProperty("data") val data: JikanData? = null, ) -data class WatchOnlineSubtitles( +data class CinemaTvSubtitles( @JsonProperty("language") val language: String? = null, @JsonProperty("file") val file: Any? = null, ) -data class WatchOnlineResponse( +data class CinemaTvResponse( @JsonProperty("streams") val streams: HashMap? = null, - @JsonProperty("subtitles") val subtitles: ArrayList? = arrayListOf(), + @JsonProperty("subtitles") val subtitles: ArrayList? = arrayListOf(), ) data class VidsrctoResult( From 4cdfa5802dd2df2effc1cd41c261e09b8ffe25b2 Mon Sep 17 00:00:00 2001 From: jack Date: Sun, 10 Dec 2023 12:27:51 +0700 Subject: [PATCH 35/47] update stremiox --- Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt | 6 ++++++ SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 2 +- StremioX/build.gradle.kts | 2 +- StremioX/src/main/kotlin/com/hexated/StremioX.kt | 5 ++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt b/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt index e4bd115b..524ac176 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt @@ -1,11 +1,17 @@ package com.hexated +import com.lagradost.cloudstream3.TvType import com.lagradost.cloudstream3.mainPageOf class Animesaga : Movierulzhd() { override var mainUrl = "https://www.animesaga.in" override var name = "Animesaga" + override val supportedTypes = setOf( + TvType.Anime, + TvType.AnimeMovie, + TvType.OVA + ) override val mainPage = mainPageOf( "movies" to "Movies", diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index d30e0819..c6651523 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2211,7 +2211,7 @@ object SoraExtractor : SoraStream() { } val headers = mapOf( - "Cookie" to "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTimeMS.2.0.$unixTimeMS.0.0.0", + "Cookie" to "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTimeMS.4.0.1.$unixTimeMS.0.0.0", "Connection" to "keep-alive", "x-requested-with" to "com.wwcinematv", ) diff --git a/StremioX/build.gradle.kts b/StremioX/build.gradle.kts index fb6333b2..c08ea2b1 100644 --- a/StremioX/build.gradle.kts +++ b/StremioX/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 11 +version = 12 cloudstream { diff --git a/StremioX/src/main/kotlin/com/hexated/StremioX.kt b/StremioX/src/main/kotlin/com/hexated/StremioX.kt index 7f2419fe..314e124f 100644 --- a/StremioX/src/main/kotlin/com/hexated/StremioX.kt +++ b/StremioX/src/main/kotlin/com/hexated/StremioX.kt @@ -13,8 +13,9 @@ import com.lagradost.cloudstream3.utils.AppUtils.toJson import java.net.URI import java.util.ArrayList import kotlin.math.roundToInt +import com.lagradost.cloudstream3.metaproviders.TmdbProvider -open class StremioX : MainAPI() { +open class StremioX : TmdbProvider() { override var mainUrl = "https://torrentio.strem.fun" override var name = "StremioX" override val hasMainPage = true @@ -181,6 +182,7 @@ open class StremioX : MainAPI() { this.showStatus = getStatus(res.status) this.recommendations = recommendations this.actors = actors + this.contentRating = fetchContentRating(data.id, "US") addTrailer(trailer) addTMDbId(data.id.toString()) addImdbId(res.external_ids?.imdb_id) @@ -202,6 +204,7 @@ open class StremioX : MainAPI() { this.rating = rating this.recommendations = recommendations this.actors = actors + this.contentRating = fetchContentRating(data.id, "US") addTrailer(trailer) addTMDbId(data.id.toString()) addImdbId(res.external_ids?.imdb_id) From 7f966fac1024fd2920a046f13abf7a1aeb92cb5b Mon Sep 17 00:00:00 2001 From: jack Date: Mon, 11 Dec 2023 11:24:12 +0700 Subject: [PATCH 36/47] fix #425 ?? --- .../kotlin/com/hexated/AnimeIndoProvider.kt | 33 +--- Gomov/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/DutaMovie.kt | 2 +- Gomov/src/main/kotlin/com/hexated/Ngefilm.kt | 2 +- .../src/main/kotlin/com/hexated/Nodrakorid.kt | 2 +- .../src/main/kotlin/com/hexated/Minioppai.kt | 27 +-- .../main/kotlin/com/hexated/Movierulzhd.kt | 30 +-- .../src/main/kotlin/com/hexated/Samehadaku.kt | 34 +--- SoraStream/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Extractors.kt | 9 +- .../main/kotlin/com/hexated/SoraExtractor.kt | 120 +++++------- .../src/main/kotlin/com/hexated/SoraStream.kt | 5 +- .../src/main/kotlin/com/hexated/SoraUtils.kt | 185 +++--------------- 13 files changed, 112 insertions(+), 341 deletions(-) diff --git a/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt b/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt index af29b007..fcf6489c 100644 --- a/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt +++ b/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt @@ -4,12 +4,9 @@ import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.network.CloudflareKiller import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.httpsify import com.lagradost.cloudstream3.utils.loadExtractor -import okhttp3.Interceptor -import okhttp3.Response import org.jsoup.Jsoup import org.jsoup.nodes.Element @@ -18,26 +15,12 @@ class AnimeIndoProvider : MainAPI() { override var name = "AnimeIndo" override val hasMainPage = true override var lang = "id" - private val cloudflareKiller by lazy { CloudflareKiller() } - private val interceptor by lazy { CloudflareInterceptor(cloudflareKiller) } override val supportedTypes = setOf( TvType.Anime, TvType.AnimeMovie, TvType.OVA ) - class CloudflareInterceptor(private val cloudflareKiller: CloudflareKiller): Interceptor { - override fun intercept(chain: Interceptor.Chain): Response { - val request = chain.request() - val response = chain.proceed(request) - val doc = Jsoup.parse(response.peekBody(1024 * 1024).string()) - if (doc.select("title").text() == "Just a moment...") { - return cloudflareKiller.intercept(chain) - } - return response - } - } - companion object { fun getType(t: String): TvType { return if (t.contains("OVA", true) || t.contains("Special")) TvType.OVA @@ -66,8 +49,7 @@ class AnimeIndoProvider : MainAPI() { page: Int, request: MainPageRequest ): HomePageResponse { - val url = "$mainUrl/${request.data}/page/$page" - val document = app.get(url, interceptor = interceptor).document + val document = app.get("$mainUrl/${request.data}/page/$page").document val home = document.select("main#main div.animposx").mapNotNull { it.toSearchResult() } @@ -101,7 +83,6 @@ class AnimeIndoProvider : MainAPI() { return newAnimeSearchResponse(title, href, TvType.Anime) { this.posterUrl = posterUrl addSub(epNum) - posterHeaders = cloudflareKiller.getCookieHeaders(mainUrl).toMap() } } @@ -109,8 +90,7 @@ class AnimeIndoProvider : MainAPI() { override suspend fun search(query: String): List { val anime = mutableListOf() (1..2).forEach { page -> - val link = "$mainUrl/page/$page/?s=$query" - val document = app.get(link, interceptor = interceptor).document + val document = app.get("$mainUrl/page/$page/?s=$query").document val media = document.select(".site-main.relat > article").mapNotNull { val title = it.selectFirst("div.title > h2")!!.ownText().trim() val href = it.selectFirst("a")!!.attr("href") @@ -118,7 +98,6 @@ class AnimeIndoProvider : MainAPI() { val type = getType(it.select("div.type").text().trim()) newAnimeSearchResponse(title, href, type) { this.posterUrl = posterUrl - posterHeaders = cloudflareKiller.getCookieHeaders(mainUrl).toMap() } } if(media.isNotEmpty()) anime.addAll(media) @@ -127,8 +106,7 @@ class AnimeIndoProvider : MainAPI() { } override suspend fun load(url: String): LoadResponse? { - val document = app.get(url, interceptor = interceptor).document - + val document = app.get(url).document val title = document.selectFirst("h1.entry-title")?.text()?.replace("Subtitle Indonesia", "") ?.trim() ?: return null val poster = document.selectFirst("div.thumb > img[itemprop=image]")?.attr("src") @@ -168,7 +146,6 @@ class AnimeIndoProvider : MainAPI() { addTrailer(trailer) addMalId(tracker?.malId) addAniListId(tracker?.aniId?.toIntOrNull()) - posterHeaders = cloudflareKiller.getCookieHeaders(mainUrl).toMap() } } @@ -179,12 +156,12 @@ class AnimeIndoProvider : MainAPI() { callback: (ExtractorLink) -> Unit ): Boolean { - val document = app.get(data, interceptor = interceptor).document + val document = app.get(data).document document.select("div.itemleft > .mirror > option").mapNotNull { fixUrl(Jsoup.parse(base64Decode(it.attr("value"))).select("iframe").attr("src")) }.apmap { if (it.startsWith(mainUrl)) { - app.get(it, referer = "$mainUrl/", interceptor = interceptor).document.select("iframe").attr("src") + app.get(it, referer = "$mainUrl/").document.select("iframe").attr("src") } else { it } diff --git a/Gomov/build.gradle.kts b/Gomov/build.gradle.kts index a19bfe05..dd797cdd 100644 --- a/Gomov/build.gradle.kts +++ b/Gomov/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 28 +version = 29 android { defaultConfig { diff --git a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt index deb693ed..bdd0eb19 100644 --- a/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt +++ b/Gomov/src/main/kotlin/com/hexated/DutaMovie.kt @@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.utils.httpsify import com.lagradost.cloudstream3.utils.loadExtractor class DutaMovie : Gomov() { - override var mainUrl = "https://boxoffice.dutamovie21.club" + override var mainUrl = "https://bioskop.dutamovie21.vip" override var name = "DutaMovie" override val mainPage = mainPageOf( "category/box-office/page/%d/" to "Box Office", diff --git a/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt b/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt index 4e2f44ca..5cce0654 100644 --- a/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt +++ b/Gomov/src/main/kotlin/com/hexated/Ngefilm.kt @@ -3,7 +3,7 @@ package com.hexated import com.lagradost.cloudstream3.mainPageOf class Ngefilm : Gomov() { - override var mainUrl = "https://nge-film21.fun" + override var mainUrl = "https://nge-film21.pics" override var name = "Ngefilm" override val mainPage = mainPageOf( diff --git a/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt b/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt index db3a7845..0597c5c1 100644 --- a/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt +++ b/Gomov/src/main/kotlin/com/hexated/Nodrakorid.kt @@ -9,7 +9,7 @@ import org.jsoup.nodes.Element import java.net.URI class Nodrakorid : Gomov() { - override var mainUrl = "https://no-drakor.xyz" + override var mainUrl = "https://nodra-kor.xyz" override var name = "Nodrakorid" override val mainPage = mainPageOf( diff --git a/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt b/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt index 7eedfd01..b7a2a906 100644 --- a/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt +++ b/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt @@ -2,10 +2,7 @@ package com.hexated import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.* -import com.lagradost.cloudstream3.network.CloudflareKiller import com.lagradost.cloudstream3.utils.* -import okhttp3.Interceptor -import okhttp3.Response import org.jsoup.Jsoup import org.jsoup.nodes.Element import java.net.URLDecoder @@ -17,24 +14,10 @@ class Minioppai : MainAPI() { override var lang = "id" override val hasDownloadSupport = true override val hasQuickSearch = true - private val cloudflareKiller by lazy { CloudflareKiller() } - private val interceptor by lazy { CloudflareInterceptor(cloudflareKiller) } override val supportedTypes = setOf( TvType.NSFW, ) - class CloudflareInterceptor(private val cloudflareKiller: CloudflareKiller): Interceptor { - override fun intercept(chain: Interceptor.Chain): Response { - val request = chain.request() - val response = chain.proceed(request) - val doc = Jsoup.parse(response.peekBody(1024 * 1024).string()) - if (doc.select("title").text() == "Just a moment...") { - return cloudflareKiller.intercept(chain) - } - return response - } - } - companion object { fun getStatus(t: String?): ShowStatus { return when (t) { @@ -54,7 +37,7 @@ class Minioppai : MainAPI() { page: Int, request: MainPageRequest ): HomePageResponse { - val document = app.get("${request.data}/page/$page", interceptor = interceptor).document + val document = app.get("${request.data}/page/$page").document val home = document.select("div.latest a").mapNotNull { it.toSearchResult() } @@ -84,7 +67,6 @@ class Minioppai : MainAPI() { return newAnimeSearchResponse(title, href, TvType.NSFW) { this.posterUrl = posterUrl addSub(epNum) - posterHeaders = cloudflareKiller.getCookieHeaders(mainUrl).toMap() } } @@ -97,7 +79,6 @@ class Minioppai : MainAPI() { "action" to "ts_ac_do_search", "ts_ac_query" to query, ), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), - interceptor = interceptor ).parsedSafe()?.post?.firstOrNull()?.all?.mapNotNull { item -> newAnimeSearchResponse( item.postTitle ?: "", @@ -105,13 +86,12 @@ class Minioppai : MainAPI() { TvType.NSFW ) { this.posterUrl = item.postImage - posterHeaders = cloudflareKiller.getCookieHeaders(mainUrl).toMap() } } } override suspend fun load(url: String): LoadResponse? { - val document = app.get(url, interceptor = interceptor).document + val document = app.get(url).document val title = document.selectFirst("h1.entry-title")?.text()?.trim() ?: return null val poster = fixUrlNull(document.selectFirst("div.limage img")?.attr("src")) @@ -137,7 +117,6 @@ class Minioppai : MainAPI() { showStatus = status plot = description this.tags = tags - posterHeaders = cloudflareKiller.getCookieHeaders(mainUrl).toMap() } } @@ -147,7 +126,7 @@ class Minioppai : MainAPI() { subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit ): Boolean { - val document = app.get(data, interceptor = interceptor).document + val document = app.get(data).document document.select("div.server ul.mirror li a").mapNotNull { Jsoup.parse(base64Decode(it.attr("data-em"))).select("iframe").attr("src") }.apmap { link -> diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt index 9f609764..30919b4e 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt @@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addActors import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.network.CloudflareKiller import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.AppUtils.toJson import org.jsoup.nodes.Element @@ -34,16 +33,11 @@ open class Movierulzhd : MainAPI() { "episodes" to "Episode", ) - val interceptor = CloudflareKiller() - override suspend fun getMainPage( page: Int, request: MainPageRequest ): HomePageResponse { - var document = app.get("$mainUrl/${request.data}/page/$page").document - if (document.select("title").text() == "Just a moment...") { - document = app.get(request.data + page, interceptor = interceptor).document - } + val document = app.get("$mainUrl/${request.data}/page/$page").document val home = document.select("div.items.normal article, div#archive-content article, div.items.full article").mapNotNull { it.toSearchResult() @@ -79,18 +73,12 @@ open class Movierulzhd : MainAPI() { return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl this.quality = quality - posterHeaders = interceptor.getCookieHeaders(mainUrl).toMap() } } override suspend fun search(query: String): List { - val link = "$mainUrl/search/$query" - var document = app.get(link).document - if (document.select("title").text() == "Just a moment...") { - document = app.get(link, interceptor = interceptor).document - } - + val document = app.get("$mainUrl/search/$query").document return document.select("div.result-item").map { val title = it.selectFirst("div.title > a")!!.text().replace(Regex("\\(\\d{4}\\)"), "").trim() @@ -98,17 +86,13 @@ open class Movierulzhd : MainAPI() { val posterUrl = it.selectFirst("img")!!.attr("src").toString() newMovieSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl - posterHeaders = interceptor.getCookieHeaders(mainUrl).toMap() } } } override suspend fun load(url: String): LoadResponse { val request = app.get(url) - var document = request.document - if (document.select("title").text() == "Just a moment...") { - document = app.get(url, interceptor = interceptor).document - } + val document = request.document directUrl = getBaseUrl(request.url) val title = document.selectFirst("div.data > h1")?.text()?.trim().toString() @@ -142,7 +126,6 @@ open class Movierulzhd : MainAPI() { val recPosterUrl = it.selectFirst("img")?.imageFromElement() newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { this.posterUrl = recPosterUrl - posterHeaders = interceptor.getCookieHeaders(url).toMap() } } @@ -187,7 +170,6 @@ open class Movierulzhd : MainAPI() { addActors(actors) this.recommendations = recommendations addTrailer(trailer) - posterHeaders = interceptor.getCookieHeaders(url).toMap() } } else { newMovieLoadResponse(title, url, TvType.Movie, url) { @@ -199,7 +181,6 @@ open class Movierulzhd : MainAPI() { addActors(actors) this.recommendations = recommendations addTrailer(trailer) - posterHeaders = interceptor.getCookieHeaders(url).toMap() } } } @@ -232,10 +213,7 @@ open class Movierulzhd : MainAPI() { ).parsed().embed_url if (!source.contains("youtube")) loadCustomExtractor(source, "$directUrl/", subtitleCallback, callback) } else { - var document = app.get(data).document - if (document.select("title").text() == "Just a moment...") { - document = app.get(data, interceptor = interceptor).document - } + val document = app.get(data).document document.select("ul#playeroptionsul > li").map { Triple( diff --git a/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt b/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt index eb5f1dd8..51404e62 100644 --- a/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt +++ b/Samehadaku/src/main/kotlin/com/hexated/Samehadaku.kt @@ -4,13 +4,9 @@ import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer -import com.lagradost.cloudstream3.network.CloudflareKiller import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.loadExtractor -import okhttp3.Interceptor -import okhttp3.Response -import org.jsoup.Jsoup import org.jsoup.nodes.Element class Samehadaku : MainAPI() { @@ -19,26 +15,12 @@ class Samehadaku : MainAPI() { override val hasMainPage = true override var lang = "id" override val hasDownloadSupport = true - private val cloudflareKiller by lazy { CloudflareKiller() } - private val interceptor by lazy { CloudflareInterceptor(cloudflareKiller) } override val supportedTypes = setOf( TvType.Anime, TvType.AnimeMovie, TvType.OVA ) - class CloudflareInterceptor(private val cloudflareKiller: CloudflareKiller): Interceptor { - override fun intercept(chain: Interceptor.Chain): Response { - val request = chain.request() - val response = chain.proceed(request) - val doc = Jsoup.parse(response.peekBody(1024 * 1024).string()) - if (doc.select("title").text() == "Just a moment...") { - return cloudflareKiller.intercept(chain) - } - return response - } - } - companion object { const val acefile = "https://acefile.co" @@ -69,7 +51,7 @@ class Samehadaku : MainAPI() { val items = mutableListOf() if (request.name != "Episode Terbaru" && page <= 1) { - val doc = app.get(request.data, interceptor = interceptor).document + val doc = app.get(request.data).document doc.select("div.widget_senction:not(:contains(Baca Komik))").forEach { block -> val header = block.selectFirst("div.widget-title h3")?.ownText() ?: return@forEach val home = block.select("div.animepost").mapNotNull { @@ -80,8 +62,7 @@ class Samehadaku : MainAPI() { } if (request.name == "Episode Terbaru") { - val home = - app.get(request.data + page, interceptor = interceptor).document.selectFirst("div.post-show")?.select("ul li") + val home = app.get(request.data + page).document.selectFirst("div.post-show")?.select("ul li") ?.mapNotNull { it.toSearchResult() } ?: throw ErrorLoadingException("No Media Found") @@ -101,13 +82,12 @@ class Samehadaku : MainAPI() { return newAnimeSearchResponse(title, href ?: return null, TvType.Anime) { this.posterUrl = posterUrl addSub(epNum) - posterHeaders = cloudflareKiller.getCookieHeaders(mainUrl).toMap() } } override suspend fun search(query: String): List { - val document = app.get("$mainUrl/?s=$query", interceptor = interceptor).document + val document = app.get("$mainUrl/?s=$query").document return document.select("main#main div.animepost").mapNotNull { it.toSearchResult() } @@ -117,10 +97,10 @@ class Samehadaku : MainAPI() { val fixUrl = if (url.contains("/anime/")) { url } else { - app.get(url, interceptor = interceptor).document.selectFirst("div.nvs.nvsc a")?.attr("href") + app.get(url).document.selectFirst("div.nvs.nvsc a")?.attr("href") } - val document = app.get(fixUrl ?: return null, interceptor = interceptor).document + val document = app.get(fixUrl ?: return null).document val title = document.selectFirst("h1.entry-title")?.text()?.removeBloat() ?: return null val poster = document.selectFirst("div.thumb > img")?.attr("src") val tags = document.select("div.genre-info > a").map { it.text() } @@ -165,7 +145,6 @@ class Samehadaku : MainAPI() { this.recommendations = recommendations addMalId(tracker?.malId) addAniListId(tracker?.aniId?.toIntOrNull()) - posterHeaders = cloudflareKiller.getCookieHeaders(mainUrl).toMap() } } @@ -177,7 +156,7 @@ class Samehadaku : MainAPI() { callback: (ExtractorLink) -> Unit ): Boolean { - val document = app.get(data, interceptor = interceptor).document + val document = app.get(data).document argamap( { @@ -196,7 +175,6 @@ class Samehadaku : MainAPI() { ), referer = data, headers = mapOf("X-Requested-With" to "XMLHttpRequest"), - interceptor = interceptor ).document.select("iframe").attr("src") loadFixedExtractor(fixedIframe(iframe), it.text(), "$mainUrl/", subtitleCallback, callback) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index b02a10d6..94b314ce 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 202 +version = 203 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt index 8187406f..f2e2739d 100644 --- a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt +++ b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt @@ -198,9 +198,10 @@ open class VCloud : ExtractorApi() { val res = app.get(url) val doc = res.document val changedLink = doc.selectFirst("script:containsData(url =)")?.data()?.let { - """url\s*=\s*['"](.*)['"];""".toRegex().find(it)?.groupValues?.get(1) - ?.substringAfter("r=") - } ?: doc.selectFirst("div.div.vd.d-none a")?.attr("href") + val regex = """url\s*=\s*['"](.*)['"];""".toRegex() + val doc2 = app.get(regex.find(it)?.groupValues?.get(1) ?: return).text + regex.find(doc2)?.groupValues?.get(1)?.substringAfter("r=") + } val header = doc.selectFirst("div.card-header")?.text() app.get( base64Decode(changedLink ?: return), cookies = res.cookies, headers = mapOf( @@ -208,7 +209,7 @@ open class VCloud : ExtractorApi() { ) ).document.select("p.text-success ~ a").apmap { val link = it.attr("href") - if (link.contains("workers.dev")) { + if (link.contains("workers.dev") || it.text().contains("[Server : 1]")) { callback.invoke( ExtractorLink( this.name, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index c6651523..86a8bf09 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2,6 +2,7 @@ package com.hexated import com.hexated.AESGCM.decrypt import com.lagradost.cloudstream3.* +import com.lagradost.cloudstream3.APIHolder.unixTime import com.lagradost.cloudstream3.APIHolder.unixTimeMS import com.lagradost.cloudstream3.utils.* import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson @@ -967,62 +968,50 @@ object SoraExtractor : SoraStream() { title: String? = null, year: Int? = null, season: Int? = null, - lastSeason: Int? = null, episode: Int? = null, callback: (ExtractorLink) -> Unit ) { - val slug = title.createSlug()?.replace("-", " ") - val url = "$uhdmoviesAPI/?s=$slug" - var doc = app.get(url).document - if (doc.select("title").text() == "Just a moment...") { - doc = app.get(url, interceptor = CloudflareKiller()).document - } - val scriptData = doc.select("div.row.gridlove-posts article").map { - it.selectFirst("a")?.attr("href") to it.selectFirst("h1")?.text() - } + val fixTitle = title.createSlug() + val (seasonSlug, episodeSlug) = getEpisodeSlug(season, episode) - val detailUrl = (if (scriptData.size == 1) { - scriptData.first() + val url = if(season == null) { + "$uhdmoviesAPI/download-$fixTitle-$year" } else { - scriptData.find { it.second?.filterMedia(title, year, lastSeason) == true } - })?.first + "$uhdmoviesAPI/download-$fixTitle" + } - val detailDoc = app.get(detailUrl ?: return).document + val detailDoc = app.get(url, interceptor = CloudflareKiller()).document - val iframeList = detailDoc.select("div.entry-content p").map { it } - .filter { it.text().filterIframe(season, lastSeason, year, title) }.mapNotNull { - if (season == null) { - it.text() to it.nextElementSibling()?.select("a")?.attr("href") - } else { - it.text() to it.nextElementSibling()?.select("a")?.find { child -> - child.select("span").text().equals("Episode $episode", true) - }?.attr("href") - } - }.filter { it.second?.contains(Regex("(https:)|(http:)")) == true } + val iSelector = if(season == null) { + "div.entry-content p:has(:matches($year))" + } else { + "div.entry-content p:has(:matches((?i)(?:S\\s*$seasonSlug|Season\\s*$seasonSlug)))" + } + val iframeList = detailDoc.select(iSelector).mapNotNull { + if (season == null) { + it.text() to it.nextElementSibling()?.select("a")?.attr("href") + } else { + it.text() to it.nextElementSibling()?.select("a")?.find { child -> + child.select("span").text().equals("Episode $episode", true) + }?.attr("href") + } + }.filter { it.first.contains(Regex("(2160p)|(1080p)")) } iframeList.apmap { (quality, link) -> - val driveLink = - when { - link?.contains("oddfirm") == true -> bypassHrefli(link) - link?.contains("driveleech") == true -> bypassDriveleech(link) - else -> bypassTechmny(link ?: return@apmap) - } + val driveLink = bypassHrefli(link ?: return@apmap) val base = getBaseUrl(driveLink ?: return@apmap) val driveReq = app.get(driveLink) val driveRes = driveReq.document val bitLink = driveRes.select("a.btn.btn-outline-success").attr("href") - val insLink = - driveRes.select("a.btn.btn-danger:contains(Instant Download)").attr("href") + val insLink = driveRes.select("a.btn.btn-danger:contains(Instant Download)").attr("href") val downloadLink = when { insLink.isNotEmpty() -> extractInstantUHD(insLink) driveRes.select("button.btn.btn-success").text() .contains("Direct Download", true) -> extractDirectUHD(driveLink, driveReq) - bitLink.isNullOrEmpty() -> { val backupIframe = driveRes.select("a.btn.btn-outline-warning").attr("href") extractBackupUHD(backupIframe ?: return@apmap) } - else -> { extractMirrorUHD(bitLink, base) } @@ -1040,10 +1029,7 @@ object SoraExtractor : SoraStream() { qualities ) ) - } - - } suspend fun invokeDotmovies( @@ -1113,34 +1099,32 @@ object SoraExtractor : SoraStream() { val hTag = if (season == null) "h5" else "h3" val aTag = if (season == null) "Download Now" else "V-Cloud" val sTag = if (season == null) "" else "(Season $season|S$seasonSlug)" - res.select("div.entry-content > $hTag:matches((?i)$sTag.*(1080p|2160p))") - .filter { element -> !element.text().contains("Download", true) }.apmap { - val tags = - """(?:1080p|2160p)(.*)""".toRegex().find(it.text())?.groupValues?.get(1)?.trim() - val href = - it.nextElementSibling()?.select("a:contains($aTag)")?.attr("href")?.let { url -> - app.post( - "${getBaseUrl(url)}/red.php", - data = mapOf("link" to url), - referer = "$api/" - ).text.substringAfter("location.href = \"").substringBefore("\"") - } - val selector = - if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)" - val server = - app.get( - href ?: return@apmap - ).document.selectFirst("div.entry-content > $selector") - ?.attr("href") - loadCustomTagExtractor( - tags, - server ?: return@apmap, - "$api/", - subtitleCallback, - callback, - getIndexQuality(it.text()) + val entry = res.select("div.entry-content > $hTag:matches((?i)$sTag.*(1080p|2160p))") + .findLast { element -> !element.text().contains("Download", true) } ?: return + val tags = + """(?:1080p|2160p)(.*)""".toRegex().find(entry.text())?.groupValues?.get(1)?.trim() + val href = + entry.nextElementSibling()?.select("a:contains($aTag)")?.attr("href") + val selector = + if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)" + val serverRes = app.get( + href ?: return, interceptor = CloudflareKiller() + ).document + val server = serverRes.selectFirst("div.entry-content > $selector") + ?.attr("href") + loadExtractor(server ?: return, "$api/", subtitleCallback) { link -> + callback.invoke( + ExtractorLink( + link.name, + "${link.name} $tags", + link.url, + link.referer, + getIndexQuality(entry.text()), + link.type, + link.headers, ) - } + ) + } } suspend fun invokeHdmovies4u( @@ -2210,10 +2194,12 @@ object SoraExtractor : SoraStream() { "$cinemaTvAPI/shows/play/$id-$slug-$year" } + val specialCookies = "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTime.4.0.1.$unixTime.0.0.0" + getCinemaChecker(specialCookies) val headers = mapOf( - "Cookie" to "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTimeMS.4.0.1.$unixTimeMS.0.0.0", + "Cookie" to specialCookies, "Connection" to "keep-alive", - "x-requested-with" to "com.wwcinematv", + "x-requested-with" to "XMLHttpRequest", ) val doc = app.get(url, headers = headers).document diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 23198212..ab1908bf 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -116,8 +116,8 @@ open class SoraStream : TmdbProvider() { const val uhdmoviesAPI = "https://uhdmovies.zip" const val gMoviesAPI = "https://gdrivemovies.xyz" const val hdmovies4uAPI = "https://hdmovies4u.band" - const val vegaMoviesAPI = "https://vegamovies.ec" - const val dotmoviesAPI = "https://dotmovies.tokyo" + const val vegaMoviesAPI = "https://vegamovies.dad" + const val dotmoviesAPI = "https://dotmovies.bet" const val tvMoviesAPI = "https://www.tvseriesnmovies.com" const val moviezAddAPI = "https://ww3.moviezaddiction.click" const val bollyMazaAPI = "https://ww3.bollymaza.click" @@ -467,7 +467,6 @@ open class SoraStream : TmdbProvider() { res.title, res.year, res.season, - res.lastSeason, res.episode, callback ) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 6aba1337..728bd527 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -8,7 +8,6 @@ import com.hexated.SoraStream.Companion.filmxyAPI import com.hexated.SoraStream.Companion.gdbot import com.hexated.SoraStream.Companion.hdmovies4uAPI import com.hexated.SoraStream.Companion.malsyncAPI -import com.hexated.SoraStream.Companion.smashyStreamAPI import com.hexated.SoraStream.Companion.tvMoviesAPI import com.hexated.SoraStream.Companion.watchflxAPI import com.lagradost.cloudstream3.* @@ -34,8 +33,6 @@ import java.security.* import java.security.spec.PKCS8EncodedKeySpec import java.security.spec.X509EncodedKeySpec import java.text.SimpleDateFormat -import java.time.LocalDate -import java.time.format.DateTimeFormatter import java.util.* import javax.crypto.Cipher import javax.crypto.spec.GCMParameterSpec @@ -47,6 +44,7 @@ import kotlin.math.min var watchflxCookies: Map? = null var filmxyCookies: Map? = null var sfServer: String? = null +var cinemaTvChecker: Boolean? = null val encodedIndex = arrayOf( "GamMovies", @@ -95,52 +93,6 @@ val mimeType = arrayOf( "video/x-msvideo" ) -fun String.filterIframe( - seasonNum: Int? = null, - lastSeason: Int? = null, - year: Int?, - title: String? -): Boolean { - val slug = title.createSlug() - val dotSlug = slug?.replace("-", ".") - val spaceSlug = slug?.replace("-", " ") - return if (seasonNum != null) { - if (lastSeason == 1) { - this.contains(Regex("(?i)(S0?$seasonNum)|(Season\\s0?$seasonNum)|(\\d{3,4}p)")) && !this.contains( - "Download", - true - ) - } else { - this.contains(Regex("(?i)(S0?$seasonNum)|(Season\\s0?$seasonNum)")) && !this.contains( - "Download", - true - ) - } - } else { - this.contains(Regex("(?i)($year)|($dotSlug)|($spaceSlug)")) && !this.contains( - "Download", - true - ) - } -} - -fun String.filterMedia(title: String?, yearNum: Int?, seasonNum: Int?): Boolean { - val fixTitle = title.createSlug()?.replace("-", " ") - return if (seasonNum != null) { - when { - seasonNum > 1 -> this.contains(Regex("(?i)(Season\\s0?1-0?$seasonNum)|(S0?1-S?0?$seasonNum)")) && this.contains( - Regex("(?i)($fixTitle)|($title)") - ) - - else -> this.contains(Regex("(?i)(Season\\s0?1)|(S0?1)")) && this.contains( - Regex("(?i)($fixTitle)|($title)") - ) && this.contains("$yearNum") - } - } else { - this.contains(Regex("(?i)($fixTitle)|($title)")) && this.contains("$yearNum") - } -} - fun Document.getMirrorLink(): String? { return this.select("div.mb-4 a").randomOrNull() ?.attr("href") @@ -632,28 +584,27 @@ suspend fun bypassFdAds(url: String?): String? { } suspend fun bypassHrefli(url: String): String? { - val postUrl = url.substringBefore("?id=").substringAfter("/?") - val res = app.post( - postUrl, data = mapOf( - "_wp_http" to url.substringAfter("?id=") - ) - ).document + fun Document.getFormUrl() : String { + return this.select("form#landing").attr("action") + } + fun Document.getFormData() : Map { + return this.select("form#landing input").associate { it.attr("name") to it.attr("value") } + } - val link = res.select("form#landing").attr("action") - val wpHttp = res.select("input[name=_wp_http2]").attr("value") - val token = res.select("input[name=token]").attr("value") + val host = getBaseUrl(url) + var res = app.get(url).document + var formUrl = res.getFormUrl() + var formData = res.getFormData() - val blogRes = app.post( - link, data = mapOf( - "_wp_http2" to wpHttp, - "token" to token - ) - ).text + res = app.post(formUrl, data = formData).document + formUrl = res.getFormUrl() + formData = res.getFormData() - val skToken = blogRes.substringAfter("?go=").substringBefore("\"") + res = app.post(formUrl, data = formData).document + val skToken = res.selectFirst("script:containsData(?go=)")?.data()?.substringAfter("?go=")?.substringBefore("\"") ?: return null val driveUrl = app.get( - "$postUrl?go=$skToken", cookies = mapOf( - skToken to wpHttp + "$host?go=$skToken", cookies = mapOf( + skToken to "${formData["_wp_http2"]}" ) ).document.selectFirst("meta[http-equiv=refresh]")?.attr("content")?.substringAfter("url=") val path = app.get(driveUrl ?: return null).text.substringAfter("replace(\"") @@ -662,94 +613,6 @@ suspend fun bypassHrefli(url: String): String? { return fixUrl(path, getBaseUrl(driveUrl)) } -suspend fun bypassTechmny(url: String): String? { - val techRes = app.get(url).document - val postUrl = url.substringBefore("?id=").substringAfter("/?") - val (goUrl, goHeader) = if (techRes.selectFirst("form#landing input[name=_wp_http_c]") != null) { - var res = app.post( - postUrl, data = mapOf( - "_wp_http_c" to url.substringAfter("?id=") - ) - ) - val (longC, catC, _) = getTechmnyCookies(res.text) - var headers = mapOf("Cookie" to "$longC; $catC") - var formLink = res.document.selectFirst("center a")?.attr("href") - res = app.get(formLink ?: return null, headers = headers) - val (longC2, _, postC) = getTechmnyCookies(res.text) - headers = mapOf("Cookie" to "$catC; $longC2; $postC") - formLink = res.document.selectFirst("center a")?.attr("href") - - res = app.get(formLink ?: return null, headers = headers) - val goToken = res.text.substringAfter("?go=").substringBefore("\"") - val tokenUrl = "$postUrl?go=$goToken" - val newLongC = "$goToken=" + longC2.substringAfter("=") - headers = mapOf("Cookie" to "$catC; rdst_post=; $newLongC") - Pair(tokenUrl, headers) - } else { - val secondPage = techRes.getNextTechPage().document - val thirdPage = secondPage.getNextTechPage().text - val goToken = thirdPage.substringAfter("?go=").substringBefore("\"") - val tokenUrl = "$postUrl?go=$goToken" - val headers = mapOf( - "Cookie" to "$goToken=${ - secondPage.select("form#landing input[name=_wp_http2]").attr("value") - }" - ) - Pair(tokenUrl, headers) - } - val driveUrl = - app.get(goUrl, headers = goHeader).document.selectFirst("meta[http-equiv=refresh]") - ?.attr("content")?.substringAfter("url=") - val path = app.get(driveUrl ?: return null).text.substringAfter("replace(\"") - .substringBefore("\")") - if (path == "/404") return null - return fixUrl(path, getBaseUrl(driveUrl)) -} - -private suspend fun Document.getNextTechPage(): NiceResponse { - return app.post( - this.select("form").attr("action"), - data = this.select("form input").mapNotNull { - it.attr("name") to it.attr("value") - }.toMap().toMutableMap() - ) -} - -suspend fun bypassDriveleech(url: String): String? { - val path = app.get(url).text.substringAfter("replace(\"") - .substringBefore("\")") - if (path == "/404") return null - return fixUrl(path, getBaseUrl(url)) -} - -private fun getTechmnyCookies(page: String): Triple { - val cat = "rdst_cat" - val post = "rdst_post" - val longC = page.substringAfter(".setTime") - .substringAfter("document.cookie = \"") - .substringBefore("\"") - .substringBefore(";") - val catC = if (page.contains("$cat=")) { - page.substringAfterLast("$cat=") - .substringBefore(";").let { - "$cat=$it" - } - } else { - "" - } - - val postC = if (page.contains("$post=")) { - page.substringAfterLast("$post=") - .substringBefore(";").let { - "$post=$it" - } - } else { - "" - } - - return Triple(longC, catC, postC) -} - suspend fun getTvMoviesServer(url: String, season: Int?, episode: Int?): Pair? { val req = app.get(url) @@ -780,6 +643,16 @@ suspend fun getTvMoviesServer(url: String, season: Int?, episode: Int?): Pair= it.decimalValue } } From a9660b7763ada79c4ea66afbed7f5aa17535ca2d Mon Sep 17 00:00:00 2001 From: jack Date: Mon, 11 Dec 2023 11:33:36 +0700 Subject: [PATCH 37/47] fix build --- Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt b/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt index bb1e67ff..5af01bf1 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt @@ -44,7 +44,7 @@ class Hdmovie2 : Movierulzhd() { } else { var document = app.get(data).document if (document.select("title").text() == "Just a moment...") { - document = app.get(data, interceptor = interceptor).document + document = app.get(data).document } val id = document.select("meta#dooplay-ajax-counter").attr("data-postid") val type = if (data.contains("/movies/")) "movie" else "tv" From 6891ca91bc2341fe4f14cc5c7985295951251173 Mon Sep 17 00:00:00 2001 From: jack Date: Mon, 11 Dec 2023 20:19:39 +0700 Subject: [PATCH 38/47] #444 --- SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 86a8bf09..ca10cc71 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -980,7 +980,7 @@ object SoraExtractor : SoraStream() { "$uhdmoviesAPI/download-$fixTitle" } - val detailDoc = app.get(url, interceptor = CloudflareKiller()).document + val detailDoc = app.get(url).document val iSelector = if(season == null) { "div.entry-content p:has(:matches($year))" From 9fdc2cc50851843023a9905a94dae1866c47ff39 Mon Sep 17 00:00:00 2001 From: jack Date: Mon, 11 Dec 2023 20:54:29 +0700 Subject: [PATCH 39/47] real fix #444 --- SoraStream/build.gradle.kts | 2 +- .../main/kotlin/com/hexated/SoraExtractor.kt | 37 ++++++++++++------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 94b314ce..e671978d 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 203 +version = 204 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index ca10cc71..03dbcfe2 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1091,8 +1091,7 @@ object SoraExtractor : SoraStream() { 1 -> "Season 1" else -> "Season 1 – $lastSeason" } - val media = - res.selectFirst("div.blog-items article:has(h3.entry-title:matches((?i)$title.*$match)) a") + val media = res.selectFirst("div.blog-items article:has(h3.entry-title:matches((?i)$title.*$match)) a") ?.attr("href") res = app.get(media ?: return).document @@ -1107,23 +1106,33 @@ object SoraExtractor : SoraStream() { entry.nextElementSibling()?.select("a:contains($aTag)")?.attr("href") val selector = if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)" - val serverRes = app.get( + val server = app.get( href ?: return, interceptor = CloudflareKiller() - ).document - val server = serverRes.selectFirst("div.entry-content > $selector") - ?.attr("href") - loadExtractor(server ?: return, "$api/", subtitleCallback) { link -> + ).document.selectFirst("div.entry-content > $selector") + ?.attr("href") ?: return + + val quality = getIndexQuality(entry.text()) + + if(server.contains("/dl.php?")) { callback.invoke( ExtractorLink( - link.name, - "${link.name} $tags", - link.url, - link.referer, - getIndexQuality(entry.text()), - link.type, - link.headers, + "Vegamovies", + "Vegamovies", + server, + "", + quality, + INFER_TYPE ) ) + } else { + loadCustomTagExtractor( + tags, + server, + "$api/", + subtitleCallback, + callback, + quality + ) } } From e871756846e78260a6969931dca088840ee7b0ad Mon Sep 17 00:00:00 2001 From: jack Date: Mon, 11 Dec 2023 20:58:14 +0700 Subject: [PATCH 40/47] fix --- SoraStream/src/main/kotlin/com/hexated/Extractors.kt | 5 ----- SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt | 1 - 2 files changed, 6 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt index f2e2739d..87271aed 100644 --- a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt +++ b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt @@ -359,11 +359,6 @@ class FilelionsTo : Filesim() { override var mainUrl = "https://filelions.to" } -class Hubcloud : VCloud() { - override val name = "Hubcloud" - override val mainUrl = "https://hubcloud.in" -} - class Pixeldra : Pixeldrain() { override val mainUrl = "https://pixeldra.in" } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt index bc9ad896..4cfd8ef0 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt @@ -20,7 +20,6 @@ class SoraStreamPlugin: Plugin() { registerExtractorAPI(Playm4u()) registerExtractorAPI(VCloud()) registerExtractorAPI(Pixeldra()) - registerExtractorAPI(Hubcloud()) registerExtractorAPI(M4ufree()) registerExtractorAPI(Streamruby()) registerExtractorAPI(Streamwish()) From b5d459ee0b803fcced54cf698912b5f114035926 Mon Sep 17 00:00:00 2001 From: jack Date: Mon, 11 Dec 2023 21:04:28 +0700 Subject: [PATCH 41/47] fix --- .../src/main/kotlin/com/hexated/Extractors.kt | 2 +- .../main/kotlin/com/hexated/SoraExtractor.kt | 31 +++++-------------- 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt index 87271aed..5fb910af 100644 --- a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt +++ b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt @@ -209,7 +209,7 @@ open class VCloud : ExtractorApi() { ) ).document.select("p.text-success ~ a").apmap { val link = it.attr("href") - if (link.contains("workers.dev") || it.text().contains("[Server : 1]")) { + if (link.contains("workers.dev") || it.text().contains("[Server : 1]") || link.contains("/dl.php?")) { callback.invoke( ExtractorLink( this.name, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 03dbcfe2..3a43cdb5 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1111,29 +1111,14 @@ object SoraExtractor : SoraStream() { ).document.selectFirst("div.entry-content > $selector") ?.attr("href") ?: return - val quality = getIndexQuality(entry.text()) - - if(server.contains("/dl.php?")) { - callback.invoke( - ExtractorLink( - "Vegamovies", - "Vegamovies", - server, - "", - quality, - INFER_TYPE - ) - ) - } else { - loadCustomTagExtractor( - tags, - server, - "$api/", - subtitleCallback, - callback, - quality - ) - } + loadCustomTagExtractor( + tags, + server, + "$api/", + subtitleCallback, + callback, + getIndexQuality(entry.text()) + ) } suspend fun invokeHdmovies4u( From 408d91f5a5a0a7254fe99e260d74d684e0c58a17 Mon Sep 17 00:00:00 2001 From: jack Date: Mon, 11 Dec 2023 21:45:22 +0700 Subject: [PATCH 42/47] update --- .../src/main/kotlin/com/hexated/SoraExtractor.kt | 1 - SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 3a43cdb5..48d690c0 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2189,7 +2189,6 @@ object SoraExtractor : SoraStream() { } val specialCookies = "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTime.4.0.1.$unixTime.0.0.0" - getCinemaChecker(specialCookies) val headers = mapOf( "Cookie" to specialCookies, "Connection" to "keep-alive", diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 728bd527..114c31f8 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -44,7 +44,6 @@ import kotlin.math.min var watchflxCookies: Map? = null var filmxyCookies: Map? = null var sfServer: String? = null -var cinemaTvChecker: Boolean? = null val encodedIndex = arrayOf( "GamMovies", @@ -643,16 +642,6 @@ suspend fun getTvMoviesServer(url: String, season: Int?, episode: Int?): Pair Date: Tue, 12 Dec 2023 02:08:18 +0700 Subject: [PATCH 43/47] update --- Gomov/src/main/kotlin/com/hexated/Gomov.kt | 37 +++++++++++-------- .../main/kotlin/com/hexated/Movierulzhd.kt | 10 ++--- .../main/kotlin/com/hexated/SoraExtractor.kt | 15 ++++---- .../src/main/kotlin/com/hexated/SoraStream.kt | 10 +++++ .../main/kotlin/com/hexated/SoraStreamLite.kt | 10 +++++ 5 files changed, 53 insertions(+), 29 deletions(-) diff --git a/Gomov/src/main/kotlin/com/hexated/Gomov.kt b/Gomov/src/main/kotlin/com/hexated/Gomov.kt index d1a8b699..b3eadaf1 100644 --- a/Gomov/src/main/kotlin/com/hexated/Gomov.kt +++ b/Gomov/src/main/kotlin/com/hexated/Gomov.kt @@ -45,7 +45,7 @@ open class Gomov : MainAPI() { private fun Element.toSearchResult(): SearchResponse? { val title = this.selectFirst("h2.entry-title > a")?.text()?.trim() ?: return null val href = fixUrl(this.selectFirst("a")!!.attr("href")) - val posterUrl = fixUrlNull(this.selectFirst("a > img").getImgAttr()).fixImageQuality() + val posterUrl = fixUrlNull(this.selectFirst("a > img")?.getImageAttr()).fixImageQuality() val quality = this.select("div.gmr-qual, div.gmr-quality-item > a").text().trim().replace("-", "") return if (quality.isEmpty()) { val episode = @@ -66,7 +66,7 @@ open class Gomov : MainAPI() { private fun Element.toRecommendResult(): SearchResponse? { val title = this.selectFirst("a > span.idmuvi-rp-title")?.text()?.trim() ?: return null val href = this.selectFirst("a")!!.attr("href") - val posterUrl = fixUrlNull(this.selectFirst("a > img").getImgAttr().fixImageQuality()) + val posterUrl = fixUrlNull(this.selectFirst("a > img")?.getImageAttr().fixImageQuality()) return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl } @@ -88,7 +88,7 @@ open class Gomov : MainAPI() { document.selectFirst("h1.entry-title")?.text()?.substringBefore("Season")?.substringBefore("Episode")?.trim() .toString() val poster = - fixUrlNull(document.selectFirst("figure.pull-left > img").getImgAttr())?.fixImageQuality() + fixUrlNull(document.selectFirst("figure.pull-left > img")?.getImageAttr())?.fixImageQuality() val tags = document.select("span.gmr-movie-genre:contains(Genre:) > a").map { it.text() } val year = @@ -176,24 +176,29 @@ open class Gomov : MainAPI() { } - private fun Element?.getImgAttr() : String? { - return this?.attr("data-src").takeIf { it?.isNotEmpty() == true } ?: this?.attr("src") + private fun Element.getImageAttr(): String? { + return when { + this.hasAttr("data-src") -> this.attr("abs:data-src") + this.hasAttr("data-lazy-src") -> this.attr("abs:data-lazy-src") + this.hasAttr("srcset") -> this.attr("abs:srcset").substringBefore(" ") + else -> this.attr("abs:src") + } } private fun Element?.getIframeAttr() : String? { return this?.attr("data-litespeed-src").takeIf { it?.isNotEmpty() == true } ?: this?.attr("src") } -} - -fun String?.fixImageQuality(): String? { - if (this == null) return null - val regex = Regex("(-\\d*x\\d*)").find(this)?.groupValues?.get(0) ?: return this - return this.replace(regex, "") -} - -fun getBaseUrl(url: String): String { - return URI(url).let { - "${it.scheme}://${it.host}" + private fun String?.fixImageQuality(): String? { + if (this == null) return null + val regex = Regex("(-\\d*x\\d*)").find(this)?.groupValues?.get(0) ?: return this + return this.replace(regex, "") } + + private fun getBaseUrl(url: String): String { + return URI(url).let { + "${it.scheme}://${it.host}" + } + } + } \ No newline at end of file diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt index 30919b4e..77260037 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt @@ -68,7 +68,7 @@ open class Movierulzhd : MainAPI() { private fun Element.toSearchResult(): SearchResponse? { val title = this.selectFirst("h3 > a")?.text() ?: return null val href = getProperLink(fixUrl(this.selectFirst("h3 > a")!!.attr("href"))) - val posterUrl = fixUrlNull(this.select("div.poster img").last()?.imageFromElement()) + val posterUrl = fixUrlNull(this.select("div.poster img").last()?.getImageAttr()) val quality = getQualityFromString(this.select("span.quality").text()) return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl @@ -96,7 +96,7 @@ open class Movierulzhd : MainAPI() { directUrl = getBaseUrl(request.url) val title = document.selectFirst("div.data > h1")?.text()?.trim().toString() - val poster = fixUrlNull(document.selectFirst("div.poster img:last-child")?.imageFromElement()) + val poster = fixUrlNull(document.selectFirst("div.poster img:last-child")?.getImageAttr()) val tags = document.select("div.sgeneros > a").map { it.text() } val year = Regex(",\\s?(\\d+)").find( @@ -123,7 +123,7 @@ open class Movierulzhd : MainAPI() { val recName = it.selectFirst("a")!!.attr("href").toString().removeSuffix("/").split("/").last() val recHref = it.selectFirst("a")!!.attr("href") - val recPosterUrl = it.selectFirst("img")?.imageFromElement() + val recPosterUrl = it.selectFirst("img")?.getImageAttr() newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { this.posterUrl = recPosterUrl } @@ -134,7 +134,7 @@ open class Movierulzhd : MainAPI() { document.select("ul.episodios > li").map { val href = it.select("a").attr("href") val name = fixTitle(it.select("div.episodiotitle > a").text().trim()) - val image = it.selectFirst("div.imagen > img")?.imageFromElement() + val image = it.selectFirst("div.imagen > img")?.getImageAttr() val episode = it.select("div.numerando").text().replace(" ", "").split("-").last() .toIntOrNull() @@ -248,7 +248,7 @@ open class Movierulzhd : MainAPI() { return true } - private fun Element.imageFromElement(): String? { + private fun Element.getImageAttr(): String? { return when { this.hasAttr("data-src") -> this.attr("abs:data-src") this.hasAttr("data-lazy-src") -> this.attr("abs:data-lazy-src") diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 48d690c0..e382dbf6 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1971,14 +1971,14 @@ object SoraExtractor : SoraStream() { } else { "$title Season $season" } - val idCookies = + val savedCookies = mapOf( - "advanced-frontendgomovies7" to "bjd4n0nnv4hlt4fj5cdjgbrne2", - "_identitygomovies7" to "52fdc70b008c0b1d881dac0f01cca819edd512de01cc8bbc1224ed4aafb78b52a:2:{i:0;s:18:\"_identitygomovies7\";i:1;s:52:\"[2050366,\"HnVRRAObTASOJEr45YyCM8wiHol0V1ko\",2592000]\";}" + "_identitygomovies7" to """52fdc70b008c0b1d881dac0f01cca819edd512de01cc8bbc1224ed4aafb78b52a:2:{i:0;s:18:"_identitygomovies7";i:1;s:52:"[2050366,"HnVRRAObTASOJEr45YyCM8wiHol0V1ko",2592000]";}""", + "_on_page" to "a7ae14b5ed54124bac8a10a84da3cc57f3eb1737692db730ebf8f8d17e091bcca%3A2%3A%7Bi%3A0%3Bs%3A8%3A%22_on_page%22%3Bi%3A1%3Bs%3A8%3A%22onpage_1%22%3B%7D", + "_pops2" to "9fcbd414a7444076e7431ef4db4cd0a011b4429c0397f23d17b709f43b432610a%3A2%3A%7Bi%3A0%3Bs%3A6%3A%22_pops2%22%3Bi%3A1%3Bs%3A8%3A%22pop_up_1%22%3B%7D", ) val req = app.get("$api/search/$query") val doc = req.document - var cookies = req.cookies + idCookies val media = doc.select("div.$mediaSelector").map { Triple( it.attr("data-filmName"), it.attr("data-year"), it.select("a").attr("href") @@ -2006,9 +2006,8 @@ object SoraExtractor : SoraStream() { fixUrl( media.third, api - ), cookies = cookies + ) ) - cookies = cookies + res.cookies res.document.selectFirst("div#$episodeSelector a:contains(Episode ${slug.second})") ?.attr("href") } ?: return @@ -2019,11 +2018,11 @@ object SoraExtractor : SoraStream() { media.third.substringAfterLast("/") to iframe.substringAfterLast("/") .substringBefore("-") } - val res = app.get(fixUrl(iframe ?: return, api), cookies = cookies, verify = false) + val res = app.get(fixUrl(iframe, api), verify = false) val serverUrl = res.document.selectFirst("script:containsData(pushState)")?.data()?.let { """,\s*'([^']+)""".toRegex().find(it)?.groupValues?.get(1) } ?: return - cookies = cookies + res.cookies + val cookies = savedCookies + res.cookies val url = res.document.select("meta[property=og:url]").attr("content") val headers = mapOf("X-Requested-With" to "XMLHttpRequest") val qualities = intArrayOf(2160, 1440, 1080, 720, 480, 360) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index ab1908bf..15004f0f 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -44,6 +44,7 @@ import com.hexated.SoraExtractor.invokeUhdmovies import com.hexated.SoraExtractor.invokeVegamovies import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeCinemaTv +import com.hexated.SoraExtractor.invokeGomovies import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZshow import com.lagradost.cloudstream3.LoadResponse.Companion.addImdbId @@ -452,6 +453,15 @@ open class SoraStream : TmdbProvider() { callback ) }, + { + if (!res.isAnime) invokeGomovies ( + res.title, + res.year, + res.season, + res.episode, + callback + ) + }, { if (!res.isAnime) invokeLing( res.title, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index 30fa36dc..bfd571ff 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -30,6 +30,7 @@ import com.hexated.SoraExtractor.invokeShowflix import com.hexated.SoraExtractor.invokeVidSrc import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeCinemaTv +import com.hexated.SoraExtractor.invokeGomovies import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZshow import com.lagradost.cloudstream3.SubtitleFile @@ -133,6 +134,15 @@ class SoraStreamLite : SoraStream() { callback ) }, + { + if (!res.isAnime) invokeGomovies( + res.title, + res.year, + res.season, + res.episode, + callback + ) + }, { if (!res.isAnime) invokeKimcartoon( res.title, From 40245f9acb4c5e53c04170b764127bcea7a4eed4 Mon Sep 17 00:00:00 2001 From: jack Date: Tue, 12 Dec 2023 02:13:59 +0700 Subject: [PATCH 44/47] update --- SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index e382dbf6..f8aa2238 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1973,7 +1973,7 @@ object SoraExtractor : SoraStream() { } val savedCookies = mapOf( - "_identitygomovies7" to """52fdc70b008c0b1d881dac0f01cca819edd512de01cc8bbc1224ed4aafb78b52a:2:{i:0;s:18:"_identitygomovies7";i:1;s:52:"[2050366,"HnVRRAObTASOJEr45YyCM8wiHol0V1ko",2592000]";}""", + "_identitygomovies7" to "52fdc70b008c0b1d881dac0f01cca819edd512de01cc8bbc1224ed4aafb78b52a%3A2%3A%7Bi%3A0%3Bs%3A18%3A%22_identitygomovies7%22%3Bi%3A1%3Bs%3A52%3A%22%5B2050366%2C%22HnVRRAObTASOJEr45YyCM8wiHol0V1ko%22%2C2592000%5D%22%3B%7D", "_on_page" to "a7ae14b5ed54124bac8a10a84da3cc57f3eb1737692db730ebf8f8d17e091bcca%3A2%3A%7Bi%3A0%3Bs%3A8%3A%22_on_page%22%3Bi%3A1%3Bs%3A8%3A%22onpage_1%22%3B%7D", "_pops2" to "9fcbd414a7444076e7431ef4db4cd0a011b4429c0397f23d17b709f43b432610a%3A2%3A%7Bi%3A0%3Bs%3A6%3A%22_pops2%22%3Bi%3A1%3Bs%3A8%3A%22pop_up_1%22%3B%7D", ) From 8bbeb6696ffd3a94060d8f22db7a88e60e7f9d55 Mon Sep 17 00:00:00 2001 From: jack Date: Tue, 12 Dec 2023 02:16:23 +0700 Subject: [PATCH 45/47] update --- SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index f8aa2238..f64efe08 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1971,11 +1971,8 @@ object SoraExtractor : SoraStream() { } else { "$title Season $season" } - val savedCookies = - mapOf( + val savedCookies = mapOf( "_identitygomovies7" to "52fdc70b008c0b1d881dac0f01cca819edd512de01cc8bbc1224ed4aafb78b52a%3A2%3A%7Bi%3A0%3Bs%3A18%3A%22_identitygomovies7%22%3Bi%3A1%3Bs%3A52%3A%22%5B2050366%2C%22HnVRRAObTASOJEr45YyCM8wiHol0V1ko%22%2C2592000%5D%22%3B%7D", - "_on_page" to "a7ae14b5ed54124bac8a10a84da3cc57f3eb1737692db730ebf8f8d17e091bcca%3A2%3A%7Bi%3A0%3Bs%3A8%3A%22_on_page%22%3Bi%3A1%3Bs%3A8%3A%22onpage_1%22%3B%7D", - "_pops2" to "9fcbd414a7444076e7431ef4db4cd0a011b4429c0397f23d17b709f43b432610a%3A2%3A%7Bi%3A0%3Bs%3A6%3A%22_pops2%22%3Bi%3A1%3Bs%3A8%3A%22pop_up_1%22%3B%7D", ) val req = app.get("$api/search/$query") val doc = req.document From e6c491fc164fa1eaf32265ba16d6d4b1354d0e30 Mon Sep 17 00:00:00 2001 From: jack Date: Tue, 12 Dec 2023 02:28:42 +0700 Subject: [PATCH 46/47] update build.yml --- .github/workflows/build.yml | 12 ++---------- SoraStream/build.gradle.kts | 6 +----- .../src/main/kotlin/com/hexated/SoraExtractor.kt | 10 +++++----- SoraStream/src/main/kotlin/com/hexated/SoraStream.kt | 4 ++-- .../src/main/kotlin/com/hexated/SoraStreamLite.kt | 4 ++-- 5 files changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66da7bca..b5e17d0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,10 +43,6 @@ jobs: - name: Access Secrets env: TMDB_API: ${{ secrets.TMDB_API }} - SORA_API: ${{ secrets.SORA_API }} - SORAHE: ${{ secrets.SORAHE }} - SORAXA: ${{ secrets.SORAXA }} - SORATED: ${{ secrets.SORATED }} DUMP_API: ${{ secrets.DUMP_API }} DUMP_KEY: ${{ secrets.DUMP_KEY }} CRUNCHYROLL_BASIC_TOKEN: ${{ secrets.CRUNCHYROLL_BASIC_TOKEN }} @@ -55,17 +51,13 @@ jobs: ANICHI_SERVER: ${{ secrets.ANICHI_SERVER }} ANICHI_ENDPOINT: ${{ secrets.ANICHI_ENDPOINT }} ANICHI_APP: ${{ secrets.ANICHI_APP }} - PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }} ZSHOW_API: ${{ secrets.ZSHOW_API }} SFMOVIES_API: ${{ secrets.SFMOVIES_API }} CINEMATV_API: ${{ secrets.CINEMATV_API }} + OMOVIES_API: ${{ secrets.OMOVIES_API }} run: | cd $GITHUB_WORKSPACE/src - echo SORA_API=$SORA_API >> local.properties echo TMDB_API=$TMDB_API >> local.properties - echo SORAHE=$SORAHE >> local.properties - echo SORAXA=$SORAXA >> local.properties - echo SORATED=$SORATED >> local.properties echo DUMP_API=$DUMP_API >> local.properties echo DUMP_KEY=$DUMP_KEY >> local.properties echo CRUNCHYROLL_BASIC_TOKEN=$CRUNCHYROLL_BASIC_TOKEN >> local.properties @@ -74,10 +66,10 @@ jobs: echo ANICHI_SERVER=$ANICHI_SERVER >> local.properties echo ANICHI_ENDPOINT=$ANICHI_ENDPOINT >> local.properties echo ANICHI_APP=$ANICHI_APP >> local.properties - echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> local.properties echo ZSHOW_API=$ZSHOW_API >> local.properties echo SFMOVIES_API=$SFMOVIES_API >> local.properties echo CINEMATV_API=$CINEMATV_API >> local.properties + echo OMOVIES_API=$OMOVIES_API >> local.properties - name: Build Plugins run: | diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index e671978d..c924f475 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -9,16 +9,12 @@ android { properties.load(project.rootProject.file("local.properties").inputStream()) buildConfigField("String", "TMDB_API", "\"${properties.getProperty("TMDB_API")}\"") + buildConfigField("String", "OMOVIES_API", "\"${properties.getProperty("OMOVIES_API")}\"") buildConfigField("String", "CINEMATV_API", "\"${properties.getProperty("CINEMATV_API")}\"") buildConfigField("String", "SFMOVIES_API", "\"${properties.getProperty("SFMOVIES_API")}\"") buildConfigField("String", "ZSHOW_API", "\"${properties.getProperty("ZSHOW_API")}\"") - buildConfigField("String", "SORA_API", "\"${properties.getProperty("SORA_API")}\"") - buildConfigField("String", "SORAHE", "\"${properties.getProperty("SORAHE")}\"") - buildConfigField("String", "SORAXA", "\"${properties.getProperty("SORAXA")}\"") - buildConfigField("String", "SORATED", "\"${properties.getProperty("SORATED")}\"") buildConfigField("String", "DUMP_API", "\"${properties.getProperty("DUMP_API")}\"") buildConfigField("String", "DUMP_KEY", "\"${properties.getProperty("DUMP_KEY")}\"") - buildConfigField("String", "PRIMEWIRE_KEY", "\"${properties.getProperty("PRIMEWIRE_KEY")}\"") buildConfigField("String", "CRUNCHYROLL_BASIC_TOKEN", "\"${properties.getProperty("CRUNCHYROLL_BASIC_TOKEN")}\"") buildConfigField("String", "CRUNCHYROLL_REFRESH_TOKEN", "\"${properties.getProperty("CRUNCHYROLL_REFRESH_TOKEN")}\"") } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index f64efe08..e15cd2b6 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1930,7 +1930,7 @@ object SoraExtractor : SoraStream() { } - suspend fun invokeGomovies( + suspend fun invokeOmovies( title: String? = null, year: Int? = null, season: Int? = null, @@ -1943,10 +1943,10 @@ object SoraExtractor : SoraStream() { season, episode, callback, - "https://gomovies-online.cam", - "Gomovies", - "_smQamBQsETb", - "_sBWcqbTBMaT" + BuildConfig.OMOVIES_API, + "Omovies", + base64Decode("X3NtUWFtQlFzRVRi"), + base64Decode("X3NCV2NxYlRCTWFU") ) } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 15004f0f..65ce22f8 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -44,7 +44,7 @@ import com.hexated.SoraExtractor.invokeUhdmovies import com.hexated.SoraExtractor.invokeVegamovies import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeCinemaTv -import com.hexated.SoraExtractor.invokeGomovies +import com.hexated.SoraExtractor.invokeOmovies import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZshow import com.lagradost.cloudstream3.LoadResponse.Companion.addImdbId @@ -454,7 +454,7 @@ open class SoraStream : TmdbProvider() { ) }, { - if (!res.isAnime) invokeGomovies ( + if (!res.isAnime) invokeOmovies ( res.title, res.year, res.season, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index bfd571ff..94832969 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -30,7 +30,7 @@ import com.hexated.SoraExtractor.invokeShowflix import com.hexated.SoraExtractor.invokeVidSrc import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeCinemaTv -import com.hexated.SoraExtractor.invokeGomovies +import com.hexated.SoraExtractor.invokeOmovies import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZshow import com.lagradost.cloudstream3.SubtitleFile @@ -135,7 +135,7 @@ class SoraStreamLite : SoraStream() { ) }, { - if (!res.isAnime) invokeGomovies( + if (!res.isAnime) invokeOmovies( res.title, res.year, res.season, From a90648fa79693d0ac972ff767c59585672cc50dc Mon Sep 17 00:00:00 2001 From: jack Date: Tue, 12 Dec 2023 05:56:19 +0700 Subject: [PATCH 47/47] update --- .../main/kotlin/com/hexated/SoraExtractor.kt | 9 ++----- .../src/main/kotlin/com/hexated/SoraStream.kt | 2 +- .../main/kotlin/com/hexated/SoraStreamLite.kt | 2 +- .../src/main/kotlin/com/hexated/SoraUtils.kt | 24 +++++++++++++++++++ 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index e15cd2b6..c14b6ec4 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -2063,7 +2063,6 @@ object SoraExtractor : SoraStream() { subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit, ) { - val ref = "https://blackvid.space/" val key = "b6055c533c19131a638c3d2299d525d5ec08a814" val url = if (season == null) { "$blackvidAPI/v3/movie/sources/$tmdbId?key=$key" @@ -2071,11 +2070,7 @@ object SoraExtractor : SoraStream() { "$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key" } - val data = app.get( - url, - timeout = 120L, - referer = ref - ).okhttpResponse.peekBody(1024 * 512).source().buffer.readByteArray() + val data = request(url,).peekBody(1024 * 512).source().buffer.readByteArray() .decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401") val json = tryParseJson(data) @@ -2086,7 +2081,7 @@ object SoraExtractor : SoraStream() { "Blackvid", "Blackvid${source.label}", s.url ?: return@s, - ref, + "https://blackvid.space/", if (s.quality.equals("4k")) Qualities.P2160.value else s.quality?.toIntOrNull() ?: Qualities.P1080.value, INFER_TYPE diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 65ce22f8..73b74d0b 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -443,7 +443,7 @@ open class SoraStream : TmdbProvider() { ) }, { - invokeKisskh( + if (res.isAsian || res.isAnime) invokeKisskh( res.title, res.season, res.episode, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index 94832969..c3b4a827 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -171,7 +171,7 @@ class SoraStreamLite : SoraStream() { ) }, { - invokeKisskh( + if (res.isAsian || res.isAnime) invokeKisskh( res.title, res.season, res.episode, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 114c31f8..f5895a6e 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -19,12 +19,16 @@ import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.nicehttp.NiceResponse import com.lagradost.nicehttp.RequestBodyTypes +import com.lagradost.nicehttp.Requests.Companion.await import com.lagradost.nicehttp.requestCreator import kotlinx.coroutines.delay import okhttp3.FormBody import okhttp3.HttpUrl.Companion.toHttpUrl import okhttp3.MediaType.Companion.toMediaTypeOrNull +import okhttp3.OkHttpClient +import okhttp3.Request import okhttp3.RequestBody.Companion.toRequestBody +import okhttp3.Response import org.jsoup.nodes.Document import java.math.BigInteger import java.net.* @@ -34,6 +38,7 @@ import java.security.spec.PKCS8EncodedKeySpec import java.security.spec.X509EncodedKeySpec import java.text.SimpleDateFormat import java.util.* +import java.util.concurrent.TimeUnit import javax.crypto.Cipher import javax.crypto.spec.GCMParameterSpec import javax.crypto.spec.IvParameterSpec @@ -1278,6 +1283,25 @@ private enum class Symbol(val decimalValue: Int) { } } +suspend fun request( + url: String, + allowRedirects: Boolean = true, + timeout: Long = 60L +): Response { + val client = OkHttpClient().newBuilder() + .connectTimeout(timeout, TimeUnit.SECONDS) + .readTimeout(timeout, TimeUnit.SECONDS) + .writeTimeout(timeout, TimeUnit.SECONDS) + .followRedirects(allowRedirects) + .followSslRedirects(allowRedirects) + .build() + + val request: Request = Request.Builder() + .url(url) + .build() + return client.newCall(request).await() +} + object DumpUtils { private val deviceId = getDeviceId()