mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed Movierulzhd
This commit is contained in:
parent
1f2e0d285e
commit
9c5bc88005
2 changed files with 17 additions and 11 deletions
|
@ -1,12 +1,12 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 9
|
version = 10
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
language = "hi"
|
language = "hi"
|
||||||
// All of these properties are optional, you can safely remove them
|
// 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")
|
authors = listOf("Hexated")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -28,13 +28,15 @@ class Movierulzhd : MainAPI() {
|
||||||
"$mainUrl/episodes/page/" to "Episode",
|
"$mainUrl/episodes/page/" to "Episode",
|
||||||
)
|
)
|
||||||
|
|
||||||
private val interceptor = CloudflareKiller()
|
// private val interceptor = CloudflareKiller()
|
||||||
|
|
||||||
override suspend fun getMainPage(
|
override suspend fun getMainPage(
|
||||||
page: Int,
|
page: Int,
|
||||||
request: MainPageRequest
|
request: MainPageRequest
|
||||||
): HomePageResponse {
|
): HomePageResponse {
|
||||||
val document = app.get(request.data + page, interceptor = interceptor).document
|
val document = app.get(request.data + page,
|
||||||
|
// interceptor = interceptor
|
||||||
|
).document
|
||||||
val home =
|
val home =
|
||||||
document.select("div.items.normal article, div#archive-content article").mapNotNull {
|
document.select("div.items.normal article, div#archive-content article").mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
|
@ -68,14 +70,16 @@ 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()
|
// posterHeaders = interceptor.getCookieHeaders(url).toMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val link = "$mainUrl/search/$query"
|
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 {
|
return document.select("div.result-item").map {
|
||||||
val title =
|
val title =
|
||||||
|
@ -84,13 +88,15 @@ 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()
|
// posterHeaders = interceptor.getCookieHeaders(url).toMap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse {
|
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 =
|
val title =
|
||||||
document.selectFirst("div.data > h1")?.text()?.trim().toString()
|
document.selectFirst("div.data > h1")?.text()?.trim().toString()
|
||||||
|
@ -117,7 +123,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()
|
// posterHeaders = interceptor.getCookieHeaders(url).toMap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +153,7 @@ class Movierulzhd : MainAPI() {
|
||||||
addActors(actors)
|
addActors(actors)
|
||||||
this.recommendations = recommendations
|
this.recommendations = recommendations
|
||||||
addTrailer(trailer)
|
addTrailer(trailer)
|
||||||
posterHeaders = interceptor.getCookieHeaders(url).toMap()
|
// posterHeaders = interceptor.getCookieHeaders(url).toMap()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
newMovieLoadResponse(title, url, TvType.Movie, url) {
|
newMovieLoadResponse(title, url, TvType.Movie, url) {
|
||||||
|
@ -159,7 +165,7 @@ class Movierulzhd : MainAPI() {
|
||||||
addActors(actors)
|
addActors(actors)
|
||||||
this.recommendations = recommendations
|
this.recommendations = recommendations
|
||||||
addTrailer(trailer)
|
addTrailer(trailer)
|
||||||
posterHeaders = interceptor.getCookieHeaders(url).toMap()
|
// posterHeaders = interceptor.getCookieHeaders(url).toMap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue