mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
added CF into Movierulzhd
This commit is contained in:
parent
67ce566dfd
commit
0969f6ba78
2 changed files with 12 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 15
|
version = 16
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -31,14 +31,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,
|
val document = app.get(request.data + page,
|
||||||
// interceptor = interceptor
|
interceptor = interceptor,
|
||||||
|
referer = mainUrl
|
||||||
).document
|
).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 {
|
||||||
|
@ -73,7 +74,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()
|
posterHeaders = interceptor.getCookieHeaders(mainUrl).toMap()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -81,7 +82,7 @@ class Movierulzhd : MainAPI() {
|
||||||
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
|
val document = app.get(link
|
||||||
// , interceptor = interceptor
|
, interceptor = interceptor
|
||||||
).document
|
).document
|
||||||
|
|
||||||
return document.select("div.result-item").map {
|
return document.select("div.result-item").map {
|
||||||
|
@ -91,14 +92,14 @@ 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
|
val document = app.get(url
|
||||||
// , interceptor = interceptor
|
, interceptor = interceptor
|
||||||
).document
|
).document
|
||||||
|
|
||||||
val title =
|
val title =
|
||||||
|
@ -126,7 +127,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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,7 +157,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) {
|
||||||
|
@ -168,7 +169,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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +219,7 @@ class Movierulzhd : MainAPI() {
|
||||||
): Boolean {
|
): Boolean {
|
||||||
|
|
||||||
val document = app.get(data
|
val document = app.get(data
|
||||||
// , interceptor = interceptor
|
, interceptor = interceptor
|
||||||
).document
|
).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"
|
||||||
|
|
Loading…
Reference in a new issue