From bb6ca9648943652744e85b20659bca4e84fe87fd Mon Sep 17 00:00:00 2001 From: IndusAryan <125901294+IndusAryan@users.noreply.github.com> Date: Sun, 14 Jan 2024 17:48:06 +0530 Subject: [PATCH] update and refactor stuff (#516) --- AnimeDekhoProvider/build.gradle.kts | 7 +-- .../main/kotlin/com/anon/AnimeDekhoPlugin.kt | 10 +--- .../kotlin/com/anon/AnimeDekhoProvider.kt | 51 +++++++------------ Movierulzhd/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/Animesaga.kt | 2 - .../src/main/kotlin/com/hexated/Hdmovie2.kt | 6 +-- .../main/kotlin/com/hexated/Movierulzhd.kt | 2 +- SoraStream/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/SoraStream.kt | 2 +- 9 files changed, 27 insertions(+), 57 deletions(-) diff --git a/AnimeDekhoProvider/build.gradle.kts b/AnimeDekhoProvider/build.gradle.kts index d50f2b6d..224fc347 100644 --- a/AnimeDekhoProvider/build.gradle.kts +++ b/AnimeDekhoProvider/build.gradle.kts @@ -1,11 +1,8 @@ -version = 1 - +version = 2 cloudstream { language = "hi" - // All of these properties are optional, you can safely remove them - - description = "YOU HAVE SKIP ADS on the SITE each 24 hours, Hindi dubbed cartoons" + description = "SKIP ADS on the SITE every 24 hours to Play, has Hindi Dubbed Cartoons" authors = listOf("anon") /** diff --git a/AnimeDekhoProvider/src/main/kotlin/com/anon/AnimeDekhoPlugin.kt b/AnimeDekhoProvider/src/main/kotlin/com/anon/AnimeDekhoPlugin.kt index 4e71f19a..78711060 100644 --- a/AnimeDekhoProvider/src/main/kotlin/com/anon/AnimeDekhoPlugin.kt +++ b/AnimeDekhoProvider/src/main/kotlin/com/anon/AnimeDekhoPlugin.kt @@ -3,19 +3,11 @@ package com.anon import com.lagradost.cloudstream3.plugins.CloudstreamPlugin import com.lagradost.cloudstream3.plugins.Plugin import android.content.Context -// import com.lagradost.cloudstream3.utils.ExtractorApi -// import com.lagradost.cloudstream3.utils.extractorApis @CloudstreamPlugin class AnimeDekhoPlugin: Plugin() { override fun load(context: Context) { - // All providers should be added in this manner. Please don't edit the providers list directly. registerMainAPI(AnimeDekhoProvider()) //addExtractor(MultiQualityXYZ()) } - - // private fun addExtractor(element: ExtractorApi) { - // element.sourcePlugin = __filename - // extractorApis.add(0, element) - // } -} +} \ No newline at end of file diff --git a/AnimeDekhoProvider/src/main/kotlin/com/anon/AnimeDekhoProvider.kt b/AnimeDekhoProvider/src/main/kotlin/com/anon/AnimeDekhoProvider.kt index cecd5719..995329ba 100644 --- a/AnimeDekhoProvider/src/main/kotlin/com/anon/AnimeDekhoProvider.kt +++ b/AnimeDekhoProvider/src/main/kotlin/com/anon/AnimeDekhoProvider.kt @@ -28,18 +28,17 @@ import okhttp3.RequestBody.Companion.toRequestBody import com.lagradost.cloudstream3.extractors.helper.AesHelper.cryptoAESHandler - -class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of MainAPI - override var mainUrl = "https://animedekho.com/" +class AnimeDekhoProvider : MainAPI() { + override var mainUrl = "https://animedekho.com" override var name = "Anime Dekho" - override val hasMainPage = true - override var lang = "hi" override val hasDownloadSupport = true override val supportedTypes = setOf( - TvType.TvSeries, + TvType.Cartoon, + TvType.Anime, + TvType.AnimeMovie, TvType.Movie ) @@ -53,15 +52,12 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse { val link = "$mainUrl${request.data}" val document = app.get(link).document - //Log.d("TAGNAME", "$document") val home = document.select("article").mapNotNull { it.toSearchResult() } return newHomePageResponse(request.name, home) } - - private fun Element.toSearchResult(): AnimeSearchResponse? { //val href = fixUrl(this.selectFirst("a")?.attr("href") ?: return null) val href = this.selectFirst("a.lnk-blk")?.attr("href") ?: "null" @@ -128,7 +124,6 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M callback: (ExtractorLink) -> Unit ): Boolean { - var vidlink = "" if(data.contains("https://vidxstream.xyz")){ @@ -142,7 +137,6 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M var term = Regex("""\bterm-(\d+)\b""").find(name)?.value!!?.replace("term-","") - vidlink = app.get("https://animedekho.com/?trembed=0&trid="+term) .document?.selectFirst("iframe")?.attr("src") ?: "null" } @@ -151,7 +145,6 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M val body = app.get(vidlink).text - val master = Regex("""JScript[\w+]?\s*=\s*'([^']+)""").find(body)!!.groupValues?.get(1) val decrypt = cryptoAESHandler(master ?: return false, "4MmH9EsZrq0WEekn".toByteArray(), false)?.replace("\\", "") ?: "ERROR" @@ -172,27 +165,17 @@ class AnimeDekhoProvider : MainAPI() { // all providers must be an instance of M "user-agent" to "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0", ) - callback.invoke( - ExtractorLink( - source = "Toon", - name = "Toon", - url = vidfinal!!, - referer = "https://vidxstream.xyz/", - quality = Qualities.Unknown.value, - isM3u8 = true, - headers = headers, - - ) - ) - - - - + callback.invoke(ExtractorLink + ( + source = "Toon", + name = "Toon", + url = vidfinal!!, + referer = "https://vidxstream.xyz/", + quality = Qualities.Unknown.value, + isM3u8 = true, + headers = headers, + ) + ) return true - - } - - -} - +} \ No newline at end of file diff --git a/Movierulzhd/build.gradle.kts b/Movierulzhd/build.gradle.kts index f12a9845..a53635d6 100644 --- a/Movierulzhd/build.gradle.kts +++ b/Movierulzhd/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 56 +version = 57 cloudstream { diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt b/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt index 524ac176..9baa9220 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Animesaga.kt @@ -18,6 +18,4 @@ class Animesaga : Movierulzhd() { "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/Hdmovie2.kt b/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt index 5ed281c4..8bad009b 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Hdmovie2.kt @@ -12,14 +12,14 @@ import org.jsoup.Jsoup class Hdmovie2 : Movierulzhd() { - override var mainUrl = "https://hdmovie2.foo" + override var mainUrl = "https://hdmovie2.ist" override var name = "Hdmovie2" override val mainPage = mainPageOf( "trending" to "Trending", "movies" to "Movies", - "genre/tv-series" to "TV-Series", + "genre/tv-series" to "TV Shows", "genre/netflix" to "Netflix", - "genre/zee5-tv-series" to "Zee5 TV Series", + "genre/zee5-tv-series" to "Zee5", ) override suspend fun loadLinks( diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt index 85624375..d2e786e2 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt @@ -11,7 +11,7 @@ import java.net.URI open class Movierulzhd : MainAPI() { - override var mainUrl = "https://movierulzhd.host" + override var mainUrl = "https://movierulzhd.fit" var directUrl = "" override var name = "Movierulzhd" override val hasMainPage = true diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index ccfdee88..cbd92fca 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 = 216 +version = 217 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt index 75171175..122fdce8 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraStream.kt @@ -125,7 +125,7 @@ open class SoraStream : TmdbProvider() { const val gMoviesAPI = "https://gdrivemovies.xyz" const val hdmovies4uAPI = "https://hdmovies4u.dad" const val vegaMoviesAPI = "https://vegamovies.dad" - const val dotmoviesAPI = "https://dotmovies.bet" + const val dotmoviesAPI = "https://dotmovies.rsvp" const val tvMoviesAPI = "https://www.tvseriesnmovies.com" const val moviezAddAPI = "https://ww3.moviezaddiction.click" const val bollyMazaAPI = "https://ww3.bollymaza.click"