From 4f2c622f82ce8d39f4a5cf04302c0c868f352d76 Mon Sep 17 00:00:00 2001 From: hexated Date: Fri, 16 Sep 2022 16:01:12 +0700 Subject: [PATCH] fixed Movierulzhd --- Movierulzhd/build.gradle.kts | 4 ++-- .../main/kotlin/com/hexated/Movierulzhd.kt | 24 ++++++++++++------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Movierulzhd/build.gradle.kts b/Movierulzhd/build.gradle.kts index 72b5433f..daa02dd5 100644 --- a/Movierulzhd/build.gradle.kts +++ b/Movierulzhd/build.gradle.kts @@ -1,12 +1,12 @@ // use an integer for version numbers -version = 9 +version = 10 cloudstream { language = "hi" // All of these properties are optional, you can safely remove them - // description = "Lorem Ipsum" +// description = "Movierulzhd recently have prank feature that the enable and disable cloudflare a " authors = listOf("Hexated") /** diff --git a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt index 5c47d7ab..1d1af6fe 100644 --- a/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt +++ b/Movierulzhd/src/main/kotlin/com/hexated/Movierulzhd.kt @@ -28,13 +28,15 @@ class Movierulzhd : MainAPI() { "$mainUrl/episodes/page/" to "Episode", ) - private val interceptor = CloudflareKiller() +// private val interceptor = CloudflareKiller() override suspend fun getMainPage( page: Int, request: MainPageRequest ): HomePageResponse { - val document = app.get(request.data + page, interceptor = interceptor).document + val document = app.get(request.data + page, +// interceptor = interceptor + ).document val home = document.select("div.items.normal article, div#archive-content article").mapNotNull { it.toSearchResult() @@ -68,14 +70,16 @@ class Movierulzhd : MainAPI() { return newMovieSearchResponse(title, href, TvType.Movie) { this.posterUrl = posterUrl this.quality = quality - posterHeaders = interceptor.getCookieHeaders(url).toMap() +// posterHeaders = interceptor.getCookieHeaders(url).toMap() } } override suspend fun search(query: String): List { val link = "$mainUrl/search/$query" - val document = app.get(link, interceptor = interceptor).document + val document = app.get(link +// , interceptor = interceptor + ).document return document.select("div.result-item").map { val title = @@ -84,13 +88,15 @@ class Movierulzhd : MainAPI() { val posterUrl = it.selectFirst("img")!!.attr("src").toString() newMovieSearchResponse(title, href, TvType.TvSeries) { this.posterUrl = posterUrl - posterHeaders = interceptor.getCookieHeaders(url).toMap() +// posterHeaders = interceptor.getCookieHeaders(url).toMap() } } } override suspend fun load(url: String): LoadResponse { - val document = app.get(url, interceptor = interceptor).document + val document = app.get(url +// , interceptor = interceptor + ).document val title = document.selectFirst("div.data > h1")?.text()?.trim().toString() @@ -117,7 +123,7 @@ class Movierulzhd : MainAPI() { val recPosterUrl = it.selectFirst("img")?.attr("src").toString() newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { this.posterUrl = recPosterUrl - posterHeaders = interceptor.getCookieHeaders(url).toMap() +// posterHeaders = interceptor.getCookieHeaders(url).toMap() } } @@ -147,7 +153,7 @@ class Movierulzhd : MainAPI() { addActors(actors) this.recommendations = recommendations addTrailer(trailer) - posterHeaders = interceptor.getCookieHeaders(url).toMap() +// posterHeaders = interceptor.getCookieHeaders(url).toMap() } } else { newMovieLoadResponse(title, url, TvType.Movie, url) { @@ -159,7 +165,7 @@ class Movierulzhd : MainAPI() { addActors(actors) this.recommendations = recommendations addTrailer(trailer) - posterHeaders = interceptor.getCookieHeaders(url).toMap() +// posterHeaders = interceptor.getCookieHeaders(url).toMap() } } }