From f08894d2aa328236d0ec4192a77bb1f15cb41e86 Mon Sep 17 00:00:00 2001 From: irfannajmudinsidik <50092754+irfannajmudinsidik@users.noreply.github.com> Date: Sun, 24 Dec 2023 00:27:54 +0700 Subject: [PATCH 1/4] Update Cgvindo.kt (#466) * Update Cgvindo.kt * Update Ngefilm.kt * Update Ngefilm.kt --- RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt b/RebahinProvider/src/main/kotlin/com/hexated/Cgvindo.kt index 370dda11..da0cb643 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 = "http://167.86.79.231" + override var mainUrl = "http://198.54.124.245" override var name = "Cgvindo" } From ae93b677e18a49d8670e4951253a677b0074ed8a Mon Sep 17 00:00:00 2001 From: monica Date: Sun, 24 Dec 2023 07:57:10 +0700 Subject: [PATCH 2/4] update --- .../main/kotlin/com/hexated/SoraExtractor.kt | 42 ++++++++------ .../src/main/kotlin/com/hexated/SoraStream.kt | 2 +- .../src/main/kotlin/com/hexated/SoraUtils.kt | 58 +++---------------- 3 files changed, 33 insertions(+), 69 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 1bde5716..387e19ea 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -252,9 +252,9 @@ object SoraExtractor : SoraStream() { val req = app.get(url) val directUrl = getBaseUrl(req.url) val iframe = req.document.selectFirst("div.pframe iframe")?.attr("src") ?: return - if(!iframe.contains("youtube")) { + if (!iframe.contains("youtube")) { loadExtractor(iframe, "$directUrl/", subtitleCallback) { link -> - if(link.quality == Qualities.Unknown.value) { + if (link.quality == Qualities.Unknown.value) { callback.invoke( ExtractorLink( link.source, @@ -1319,7 +1319,7 @@ object SoraExtractor : SoraStream() { } type.contains("oiya") || type.contains("rarbgx") -> { - val oiyaLink = extractOiya(fdLink ?: return@apmap null, qualities) + val oiyaLink = extractOiya(fdLink ?: return@apmap null) if (oiyaLink?.contains("gdtot") == true) { val gdBotLink = extractGdbot(oiyaLink) extractGdflix(gdBotLink ?: return@apmap null) @@ -2211,7 +2211,8 @@ object SoraExtractor : SoraStream() { "$cinemaTvAPI/shows/play/$id-$slug-$year" } - val session = "PHPSESSID=ngr4cudjrimdnhkth30ssohs0n; _csrf=a6ffd7bb7654083fce6df528225a238d0e85aa1fb885dc7638c1259ec1ba0d5ca%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22mTTLiDLjxohs-CpKk0bjRH3HdYMB9uBV%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTime.4.0.1.$unixTime.0.0.0" + val session = + "PHPSESSID=ngr4cudjrimdnhkth30ssohs0n; _csrf=a6ffd7bb7654083fce6df528225a238d0e85aa1fb885dc7638c1259ec1ba0d5ca%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22mTTLiDLjxohs-CpKk0bjRH3HdYMB9uBV%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTime.4.0.1.$unixTime.0.0.0" val headers = mapOf( "Cookie" to session, @@ -2288,16 +2289,16 @@ object SoraExtractor : SoraStream() { ) } - val media = mediaRes.find { - it.title.equals( - title, - true - ) && it.infor.equals(if (season == null) "$year" else "SS $lastSeason") && it.type == if (season == null) "Movie" else "TV" - } ?: mediaRes.find { - it.title.equals( - title, - true - ) && it.infor.contains(if (season == null) "$year" else "SS") && it.type == if (season == null) "Movie" else "TV" + val filter = mediaRes.filter { + it.title.equals(title, true) && it.type == if (season == null) "Movie" else "TV" + } + + val media = if (season == null) { + filter.find { it.infor == "$year" } + } else { + filter.find { it.infor == "SS $lastSeason" } + ?: filter.find { it.infor == "SS ${lastSeason?.minus(1)}" } + ?: filter.find { it.infor == "SS 1" } } val shareId = media?.url?.substringAfterLast("/") ?: return @@ -2307,14 +2308,21 @@ object SoraExtractor : SoraStream() { .parsedSafe()?.data?.link?.substringAfterLast("/") val headers = mapOf("Accept-Language" to "en") - val shareRes = app.get("$febboxAPI/file/file_share_list?share_key=${shareKey ?: return}", headers = headers) + val shareRes = app.get( + "$febboxAPI/file/file_share_list?share_key=${shareKey ?: return}", + headers = headers + ) .parsedSafe()?.data val fids = if (season == null) { shareRes?.file_list } else { - val parentId = shareRes?.file_list?.find { it.file_name.equals("season $season", true) }?.fid - app.get("$febboxAPI/file/file_share_list?share_key=${shareKey}&parent_id=$parentId&page=1", headers = headers) + val parentId = + shareRes?.file_list?.find { it.file_name.equals("season $season", true) }?.fid + app.get( + "$febboxAPI/file/file_share_list?share_key=${shareKey}&parent_id=$parentId&page=1", + headers = headers + ) .parsedSafe()?.data?.file_list?.filter { it.file_name?.contains( "s${seasonSlug}e${episodeSlug}", diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 379a47e0..ca283c99 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -116,7 +116,7 @@ open class SoraStream : TmdbProvider() { const val aoneroomAPI = "https://api3.aoneroom.com" const val febboxAPI = "https://www.febbox.com" - const val fdMoviesAPI = "https://freedrivemovie.lol" + const val fdMoviesAPI = "https://freedrivemovie.com" const val uhdmoviesAPI = "https://uhdmovies.zip" const val gMoviesAPI = "https://gdrivemovies.xyz" const val hdmovies4uAPI = "https://hdmovies4u.band" diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index 5b98eeeb..0d349112 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -49,7 +49,6 @@ import kotlin.math.min var watchflxCookies: Map? = null var filmxyCookies: Map? = null var sfServer: String? = null -var cinemaCookiesChecker: Boolean? = null val encodedIndex = arrayOf( "GamMovies", @@ -331,10 +330,8 @@ suspend fun getDrivebotLink(url: String?): String? { ?.data()?.substringAfter("window.open('")?.substringBefore("')") } -suspend fun extractOiya(url: String, quality: String): String? { - val doc = app.get(url).document - return doc.selectFirst("div.wp-block-button a:matches((?i)$quality)")?.attr("href") - ?: doc.selectFirst("div.wp-block-button a")?.attr("href") +suspend fun extractOiya(url: String): String? { + return app.get(url).document.selectFirst("div.wp-block-button a")?.attr("href") } fun deobfstr(hash: String, index: String): String { @@ -589,10 +586,11 @@ suspend fun bypassFdAds(url: String?): String? { } suspend fun bypassHrefli(url: String): String? { - fun Document.getFormUrl() : String { + fun Document.getFormUrl(): String { return this.select("form#landing").attr("action") } - fun Document.getFormData() : Map { + + fun Document.getFormData(): Map { return this.select("form#landing input").associate { it.attr("name") to it.attr("value") } } @@ -606,7 +604,8 @@ suspend fun bypassHrefli(url: String): String? { formData = res.getFormData() res = app.post(formUrl, data = formData).document - val skToken = res.selectFirst("script:containsData(?go=)")?.data()?.substringAfter("?go=")?.substringBefore("\"") ?: return null + val skToken = res.selectFirst("script:containsData(?go=)")?.data()?.substringAfter("?go=") + ?.substringBefore("\"") ?: return null val driveUrl = app.get( "$host?go=$skToken", cookies = mapOf( skToken to "${formData["_wp_http2"]}" @@ -648,49 +647,6 @@ suspend fun getTvMoviesServer(url: String, season: Int?, episode: Int?): Pair) { - app.get( - "$wiwiApi/api/v1/app-config", - headers = headers - ).text - } - suspend fun checkCookies(session: String, headers: Map) { - app.post( - "$wiwiApi/api/v1/cookie", - data = mapOf("cookie" to session), - headers = headers - ).text - } - val configHeaders = mapOf( - "App-version" to "3.4", - "Authorization" to "Basic d2l3aTpXaXdpQDIwMjA=", - "Country" to "Indonesia", - "Device-id" to getDeviceId(), - "User-id" to "user-6694327", - ) - listOf(1..2).apmap { createConfig(configHeaders) } - val unityData = """ - { - "platform": "android", - "idfi": "d1ec7051-f58f-4ddb-9da8-8debb82cfbea", - "sdkVersionName": "4.3.0", - "gdpr.consent": true, - "user.nonbehavioral": false, - "unity.privacy.permissions.all": false, - "unity.privacy.permissions.gameExp": false, - "unity.privacy.permissions.ads": false, - "unity.privacy.permissions.external": false - } - """.trimIndent().toJson().toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull()) - app.post("https://configv2.unityads.unity3d.com/privacy/4519473/state", requestBody = unityData).text - listOf(1..4).map {checkCookies(session, configHeaders)} - return true -} - suspend fun getSfServer() = sfServer ?: fetchSfServer().also { sfServer = it } suspend fun fetchSfServer(): String { From d3bd6f16098cb5c9cae41488cde8f5fe8d9b6815 Mon Sep 17 00:00:00 2001 From: Saksham Kushwaha <92094239+LiReNa00@users.noreply.github.com> Date: Sun, 24 Dec 2023 06:28:43 +0530 Subject: [PATCH 3/4] Update YugenAnime.kt (#462) * Update YugenAnime.kt Updated the mainurl (it's .sx now) and search function (/discover instead of /search) * Update YugenAnime.kt --- YugenAnime/src/main/kotlin/com/hexated/YugenAnime.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/YugenAnime/src/main/kotlin/com/hexated/YugenAnime.kt b/YugenAnime/src/main/kotlin/com/hexated/YugenAnime.kt index d8c6c982..af605a82 100644 --- a/YugenAnime/src/main/kotlin/com/hexated/YugenAnime.kt +++ b/YugenAnime/src/main/kotlin/com/hexated/YugenAnime.kt @@ -13,7 +13,7 @@ import org.jsoup.nodes.Element import java.net.URI class YugenAnime : MainAPI() { - override var mainUrl = "https://yugenanime.tv" + override var mainUrl = "https://yugenanime.sx" override var name = "YugenAnime" override val hasMainPage = true override var lang = "en" @@ -84,7 +84,7 @@ class YugenAnime : MainAPI() { } override suspend fun search(query: String): List { - val document = app.get("$mainUrl/search/?q=$query").document + val document = app.get("$mainUrl/discover/?q=$query").document return document.select("div.cards-grid a.anime-meta").mapNotNull { it.toSearchResult() } @@ -231,4 +231,4 @@ class YugenAnime : MainAPI() { @JsonProperty("season") val season: String? = null, ) -} \ No newline at end of file +} From eb128bf97a272be3d6c731f667ea322d22da33fc Mon Sep 17 00:00:00 2001 From: monica Date: Sun, 24 Dec 2023 16:09:45 +0700 Subject: [PATCH 4/4] sora: added WatchCartoon --- SoraStream/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Extractors.kt | 6 +++ .../main/kotlin/com/hexated/SoraExtractor.kt | 50 ++++++++++++++++++- .../src/main/kotlin/com/hexated/SoraStream.kt | 13 +++++ .../main/kotlin/com/hexated/SoraStreamLite.kt | 12 +++++ .../kotlin/com/hexated/SoraStreamPlugin.kt | 1 + .../src/main/kotlin/com/hexated/SoraUtils.kt | 12 +++++ 7 files changed, 93 insertions(+), 3 deletions(-) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 327754b2..8ce610c3 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 = 208 +version = 209 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt index 0e5ae558..a2e33744 100644 --- a/SoraStream/src/main/kotlin/com/hexated/Extractors.kt +++ b/SoraStream/src/main/kotlin/com/hexated/Extractors.kt @@ -10,6 +10,7 @@ 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.Jeniusplay import com.lagradost.cloudstream3.extractors.Pixeldrain import com.lagradost.cloudstream3.extractors.Vidplay import com.lagradost.cloudstream3.utils.* @@ -409,4 +410,9 @@ class Vidplay2 : Vidplay() { class Flaswish : Filesim() { override val name = "Flaswish" override var mainUrl = "https://flaswish.com" +} + +class Comedyshow : Jeniusplay() { + override val mainUrl = "https://comedyshow.to" + override val name = "Comedyshow" } \ 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 387e19ea..ab1e1441 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -14,7 +14,6 @@ import com.lagradost.nicehttp.RequestBodyTypes import kotlinx.coroutines.delay import okhttp3.MediaType.Companion.toMediaTypeOrNull import okhttp3.RequestBody.Companion.toRequestBody -import okhttp3.internal.closeQuietly import org.jsoup.Jsoup import org.jsoup.nodes.Document import org.jsoup.select.Elements @@ -323,6 +322,52 @@ object SoraExtractor : SoraStream() { } + suspend fun invokeWatchCartoon( + title: String? = null, + year: Int? = null, + season: Int? = null, + episode: Int? = null, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val fixTitle = title.createSlug() + val url = if (season == null) { + "$watchCartoonAPI/movies/$fixTitle-$year" + } else { + "$watchCartoonAPI/episode/$fixTitle-season-$season-episode-$episode" + } + + val req = app.get(url) + val host = getBaseUrl(req.url) + val doc = req.document + + val id = doc.select("link[rel=shortlink]").attr("href").substringAfterLast("=") + doc.select("div.form-group.list-server option").apmap { + val server = app.get( + "$host/ajax-get-link-stream/?server=${it.attr("value")}&filmId=$id", + headers = mapOf( + "X-Requested-With" to "XMLHttpRequest" + ) + ).text + loadExtractor(server, "$host/", subtitleCallback) { link -> + if (link.quality == Qualities.Unknown.value) { + callback.invoke( + ExtractorLink( + "WatchCartoon", + "WatchCartoon", + link.url, + link.referer, + Qualities.P720.value, + link.type, + link.headers, + link.extractorData + ) + ) + } + } + } + } + suspend fun invokeNetmovies( title: String? = null, year: Int? = null, @@ -1702,6 +1747,7 @@ object SoraExtractor : SoraStream() { imdbId: String? = null, season: Int? = null, episode: Int? = null, + subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit, ) { val url = if (season == null) { @@ -1717,7 +1763,7 @@ object SoraExtractor : SoraStream() { }.apmap { when (it.second) { "Player F" -> { - invokeSmashyFfix(it.second, it.first, url, callback) + invokeSmashyFfix(it.second, it.first, url, subtitleCallback, callback) } "Player D (Hindi)" -> { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index ca283c99..0ce3233c 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -46,6 +46,7 @@ import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeCinemaTv import com.hexated.SoraExtractor.invokeFebbox import com.hexated.SoraExtractor.invokeOmovies +import com.hexated.SoraExtractor.invokeWatchCartoon import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZshow import com.lagradost.cloudstream3.LoadResponse.Companion.addImdbId @@ -115,6 +116,7 @@ open class SoraStream : TmdbProvider() { const val showflixAPI = "https://showflix.space" const val aoneroomAPI = "https://api3.aoneroom.com" const val febboxAPI = "https://www.febbox.com" + const val watchCartoonAPI = "https://www1.watchcartoononline.bz" const val fdMoviesAPI = "https://freedrivemovie.com" const val uhdmoviesAPI = "https://uhdmovies.zip" @@ -450,6 +452,16 @@ open class SoraStream : TmdbProvider() { callback ) }, + { + if (!res.isAnime && res.isCartoon) invokeWatchCartoon( + res.title, + res.year, + res.season, + res.episode, + subtitleCallback, + callback + ) + }, { if (!res.isAnime) invokeVidsrcto( res.imdbId, @@ -568,6 +580,7 @@ open class SoraStream : TmdbProvider() { res.imdbId, res.season, res.episode, + subtitleCallback, callback ) }, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt index 22f27b3a..90ad38d5 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamLite.kt @@ -32,6 +32,7 @@ import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeCinemaTv import com.hexated.SoraExtractor.invokeFebbox import com.hexated.SoraExtractor.invokeOmovies +import com.hexated.SoraExtractor.invokeWatchCartoon import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeZshow import com.lagradost.cloudstream3.SubtitleFile @@ -106,6 +107,16 @@ class SoraStreamLite : SoraStream() { { invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback) }, + { + if (!res.isAnime && res.isCartoon) invokeWatchCartoon( + res.title, + res.year, + res.season, + res.episode, + subtitleCallback, + callback + ) + }, { if (res.isAnime) invokeAnimes( res.title, @@ -159,6 +170,7 @@ class SoraStreamLite : SoraStream() { res.imdbId, res.season, res.episode, + subtitleCallback, callback ) }, diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt index 23cc44f2..c6cd296e 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt @@ -30,5 +30,6 @@ class SoraStreamPlugin: Plugin() { registerExtractorAPI(Netembed()) registerExtractorAPI(Vidplay2()) registerExtractorAPI(Flaswish()) + registerExtractorAPI(Comedyshow()) } } \ 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 0d349112..89593955 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -402,6 +402,7 @@ suspend fun invokeSmashyFfix( name: String, url: String, ref: String, + subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit, ) { val json = app.get(url, referer = ref, headers = mapOf("X-Requested-With" to "XMLHttpRequest")) @@ -414,6 +415,17 @@ suspend fun invokeSmashyFfix( ).forEach(callback) } + json?.subtitleUrls?.split(",")?.map { sub -> + val lang = "\\[(.*)]".toRegex().find(sub)?.groupValues?.get(1) + val subUrl = sub.replace("[$lang]", "").trim() + subtitleCallback.invoke( + SubtitleFile( + lang ?: return@map, + subUrl + ) + ) + } + } suspend fun invokeSmashyD(