mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Fix OlgplyProvider.kt
This commit is contained in:
parent
9ac618559d
commit
4c47ddd81f
2 changed files with 15 additions and 11 deletions
|
@ -1,12 +1,12 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
// 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 = "Uses TMDB"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Blatzar")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
@ -17,6 +17,5 @@ cloudstream {
|
||||||
* */
|
* */
|
||||||
status = 1 // will be 3 if unspecified
|
status = 1 // will be 3 if unspecified
|
||||||
|
|
||||||
|
|
||||||
iconUrl = "https://www.google.com/s2/favicons?domain=olgply.com&sz=24"
|
iconUrl = "https://www.google.com/s2/favicons?domain=olgply.com&sz=24"
|
||||||
}
|
}
|
|
@ -27,11 +27,15 @@ class OlgplyProvider : TmdbProvider() {
|
||||||
// subtitleCallback: (SubtitleFile) -> Unit,
|
// subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
|
println("URKKKKKKKKKK $url")
|
||||||
val foundVideo = WebViewResolver(
|
val foundVideo = WebViewResolver(
|
||||||
Regex("""movies4discord""")
|
Regex("""\.m3u8|i7njdjvszykaieynzsogaysdgb0hm8u1mzubmush4maopa4wde\.com""")
|
||||||
).resolveUsingWebView(
|
).resolveUsingWebView(
|
||||||
requestCreator("GET", url)
|
requestCreator(
|
||||||
).first ?: return
|
"GET", url, referer = "https://olgply.xyz/"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.first ?: return
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
|
@ -39,7 +43,8 @@ class OlgplyProvider : TmdbProvider() {
|
||||||
"Movies4Discord",
|
"Movies4Discord",
|
||||||
foundVideo.url.toString(),
|
foundVideo.url.toString(),
|
||||||
"",
|
"",
|
||||||
Qualities.Unknown.value
|
Qualities.Unknown.value,
|
||||||
|
true
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -58,7 +63,7 @@ class OlgplyProvider : TmdbProvider() {
|
||||||
val apiUrl =
|
val apiUrl =
|
||||||
"https://olgply.xyz/${tmdbId}${mappedData.season?.let { "/$it" } ?: ""}${mappedData.episode?.let { "/$it" } ?: ""}"
|
"https://olgply.xyz/${tmdbId}${mappedData.season?.let { "/$it" } ?: ""}${mappedData.episode?.let { "/$it" } ?: ""}"
|
||||||
val html =
|
val html =
|
||||||
app.get(apiUrl).text
|
app.get(apiUrl, referer = "https://olgply.xyz/").text
|
||||||
val rhino = Context.enter()
|
val rhino = Context.enter()
|
||||||
rhino.optimizationLevel = -1
|
rhino.optimizationLevel = -1
|
||||||
val scope: Scriptable = rhino.initSafeStandardObjects()
|
val scope: Scriptable = rhino.initSafeStandardObjects()
|
||||||
|
|
Loading…
Reference in a new issue