mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
shitty Movierulzhd
This commit is contained in:
parent
545caa87be
commit
0af97ed6b4
2 changed files with 18 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 16
|
version = 17
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -37,10 +37,10 @@ class Movierulzhd : MainAPI() {
|
||||||
page: Int,
|
page: Int,
|
||||||
request: MainPageRequest
|
request: MainPageRequest
|
||||||
): HomePageResponse {
|
): HomePageResponse {
|
||||||
val document = app.get(request.data + page,
|
var document = app.get(request.data + page,).document
|
||||||
interceptor = interceptor,
|
if(document.select("title").text() == "Just a moment...") {
|
||||||
referer = mainUrl
|
document = app.get(request.data + page, interceptor = interceptor).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 {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
|
@ -81,9 +81,10 @@ 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
|
var document = app.get(link,).document
|
||||||
, interceptor = interceptor
|
if(document.select("title").text() == "Just a moment...") {
|
||||||
).document
|
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 =
|
||||||
|
@ -92,16 +93,16 @@ 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(mainUrl).toMap()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse {
|
override suspend fun load(url: String): LoadResponse {
|
||||||
val document = app.get(url
|
var document = app.get(url,).document
|
||||||
, interceptor = interceptor
|
if(document.select("title").text() == "Just a moment...") {
|
||||||
).document
|
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()
|
||||||
val poster = document.select("div.poster > img").attr("src").toString()
|
val poster = document.select("div.poster > img").attr("src").toString()
|
||||||
|
@ -218,9 +219,10 @@ class Movierulzhd : MainAPI() {
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
): Boolean {
|
): Boolean {
|
||||||
|
|
||||||
val document = app.get(data
|
var document = app.get(data).document
|
||||||
, interceptor = interceptor
|
if(document.select("title").text() == "Just a moment...") {
|
||||||
).document
|
document = app.get(data, interceptor = interceptor).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