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
f9aef12a03
commit
7dfb3b7b64
2 changed files with 25 additions and 18 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 4
|
version = 5
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
||||||
|
import com.lagradost.cloudstream3.extractors.StreamSB
|
||||||
import com.lagradost.cloudstream3.mvvm.safeApiCall
|
import com.lagradost.cloudstream3.mvvm.safeApiCall
|
||||||
import com.lagradost.cloudstream3.utils.*
|
import com.lagradost.cloudstream3.utils.*
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
@ -32,7 +33,8 @@ class Movierulzhd : MainAPI() {
|
||||||
request: MainPageRequest
|
request: MainPageRequest
|
||||||
): HomePageResponse {
|
): HomePageResponse {
|
||||||
val document = app.get(request.data + page).document
|
val document = app.get(request.data + page).document
|
||||||
val home = document.select("div.items.normal article, div#archive-content article").mapNotNull {
|
val home =
|
||||||
|
document.select("div.items.normal article, div#archive-content article").mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
return newHomePageResponse(request.name, home)
|
return newHomePageResponse(request.name, home)
|
||||||
|
@ -162,7 +164,8 @@ class Movierulzhd : MainAPI() {
|
||||||
val mainUrl = "https://sbflix.xyz"
|
val mainUrl = "https://sbflix.xyz"
|
||||||
val name = "Sbflix"
|
val name = "Sbflix"
|
||||||
|
|
||||||
val regexID = Regex("(embed-[a-zA-Z0-9]{0,8}[a-zA-Z0-9_-]+|\\/e\\/[a-zA-Z0-9]{0,8}[a-zA-Z0-9_-]+)")
|
val regexID =
|
||||||
|
Regex("(embed-[a-zA-Z0-9]{0,8}[a-zA-Z0-9_-]+|\\/e\\/[a-zA-Z0-9]{0,8}[a-zA-Z0-9_-]+)")
|
||||||
val id = regexID.findAll(url).map {
|
val id = regexID.findAll(url).map {
|
||||||
it.value.replace(Regex("(embed-|\\/e\\/)"), "")
|
it.value.replace(Regex("(embed-|\\/e\\/)"), "")
|
||||||
}.first()
|
}.first()
|
||||||
|
@ -170,11 +173,14 @@ class Movierulzhd : MainAPI() {
|
||||||
val headers = mapOf(
|
val headers = mapOf(
|
||||||
"watchsb" to "sbstream",
|
"watchsb" to "sbstream",
|
||||||
)
|
)
|
||||||
val urltext = app.get(master.lowercase(),
|
val urltext = app.get(
|
||||||
|
master.lowercase(),
|
||||||
headers = headers,
|
headers = headers,
|
||||||
referer = url,
|
referer = url,
|
||||||
).text
|
).text
|
||||||
val mapped = urltext.let { AppUtils.parseJson<Main>(it) }
|
val mapped = urltext.let { AppUtils.parseJson<Main>(it) }
|
||||||
|
val testurl = app.get(mapped.streamData.file, headers = headers).text
|
||||||
|
if (urltext.contains("m3u8") && testurl.contains("EXTM3U"))
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
name,
|
name,
|
||||||
|
@ -182,6 +188,7 @@ class Movierulzhd : MainAPI() {
|
||||||
mapped.streamData.file,
|
mapped.streamData.file,
|
||||||
url,
|
url,
|
||||||
Qualities.Unknown.value,
|
Qualities.Unknown.value,
|
||||||
|
isM3u8 = true,
|
||||||
headers = headers
|
headers = headers
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue