fixed Movierulzhd

This commit is contained in:
hexated 2022-09-15 17:34:28 +07:00
parent c65ecaee9f
commit 457bcde815
2 changed files with 7 additions and 2 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 7 version = 8
cloudstream { cloudstream {

View file

@ -68,6 +68,7 @@ class Movierulzhd : MainAPI() {
return newMovieSearchResponse(title, href, TvType.Movie) { return newMovieSearchResponse(title, href, TvType.Movie) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
this.quality = quality this.quality = quality
posterHeaders = interceptor.getCookieHeaders(url).toMap()
} }
} }
@ -83,6 +84,7 @@ class Movierulzhd : MainAPI() {
val posterUrl = it.selectFirst("img")!!.attr("src").toString() val posterUrl = it.selectFirst("img")!!.attr("src").toString()
newMovieSearchResponse(title, href, TvType.TvSeries) { newMovieSearchResponse(title, href, TvType.TvSeries) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
posterHeaders = interceptor.getCookieHeaders(url).toMap()
} }
} }
} }
@ -115,6 +117,7 @@ class Movierulzhd : MainAPI() {
val recPosterUrl = it.selectFirst("img")?.attr("src").toString() val recPosterUrl = it.selectFirst("img")?.attr("src").toString()
newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) { newTvSeriesSearchResponse(recName, recHref, TvType.TvSeries) {
this.posterUrl = recPosterUrl this.posterUrl = recPosterUrl
posterHeaders = interceptor.getCookieHeaders(url).toMap()
} }
} }
@ -144,6 +147,7 @@ class Movierulzhd : MainAPI() {
addActors(actors) addActors(actors)
this.recommendations = recommendations this.recommendations = recommendations
addTrailer(trailer) addTrailer(trailer)
posterHeaders = interceptor.getCookieHeaders(url).toMap()
} }
} else { } else {
newMovieLoadResponse(title, url, TvType.Movie, url) { newMovieLoadResponse(title, url, TvType.Movie, url) {
@ -155,6 +159,7 @@ class Movierulzhd : MainAPI() {
addActors(actors) addActors(actors)
this.recommendations = recommendations this.recommendations = recommendations
addTrailer(trailer) addTrailer(trailer)
posterHeaders = interceptor.getCookieHeaders(url).toMap()
} }
} }
} }
@ -203,7 +208,7 @@ class Movierulzhd : MainAPI() {
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
): Boolean { ): Boolean {
val document = app.get(data, interceptor = interceptor).document val document = app.get(data).document
val id = document.select("meta#dooplay-ajax-counter").attr("data-postid") val id = document.select("meta#dooplay-ajax-counter").attr("data-postid")
val type = if (data.contains("/movies/")) "movie" else "tv" val type = if (data.contains("/movies/")) "movie" else "tv"