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
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
|
||||
cloudstream {
|
||||
// All of these properties are optional, you can safely remove them
|
||||
|
||||
// description = "Lorem Ipsum"
|
||||
// authors = listOf("Cloudburst")
|
||||
description = "Uses TMDB"
|
||||
authors = listOf("Blatzar")
|
||||
|
||||
/**
|
||||
* Status int as the following:
|
||||
|
@ -17,6 +17,5 @@ cloudstream {
|
|||
* */
|
||||
status = 1 // will be 3 if unspecified
|
||||
|
||||
|
||||
iconUrl = "https://www.google.com/s2/favicons?domain=olgply.com&sz=24"
|
||||
}
|
|
@ -27,11 +27,15 @@ class OlgplyProvider : TmdbProvider() {
|
|||
// subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
println("URKKKKKKKKKK $url")
|
||||
val foundVideo = WebViewResolver(
|
||||
Regex("""movies4discord""")
|
||||
Regex("""\.m3u8|i7njdjvszykaieynzsogaysdgb0hm8u1mzubmush4maopa4wde\.com""")
|
||||
).resolveUsingWebView(
|
||||
requestCreator("GET", url)
|
||||
).first ?: return
|
||||
requestCreator(
|
||||
"GET", url, referer = "https://olgply.xyz/"
|
||||
)
|
||||
)
|
||||
.first ?: return
|
||||
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
|
@ -39,7 +43,8 @@ class OlgplyProvider : TmdbProvider() {
|
|||
"Movies4Discord",
|
||||
foundVideo.url.toString(),
|
||||
"",
|
||||
Qualities.Unknown.value
|
||||
Qualities.Unknown.value,
|
||||
true
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -58,13 +63,13 @@ class OlgplyProvider : TmdbProvider() {
|
|||
val apiUrl =
|
||||
"https://olgply.xyz/${tmdbId}${mappedData.season?.let { "/$it" } ?: ""}${mappedData.episode?.let { "/$it" } ?: ""}"
|
||||
val html =
|
||||
app.get(apiUrl).text
|
||||
app.get(apiUrl, referer = "https://olgply.xyz/").text
|
||||
val rhino = Context.enter()
|
||||
rhino.optimizationLevel = -1
|
||||
val scope: Scriptable = rhino.initSafeStandardObjects()
|
||||
val documentJs = """
|
||||
Plyr = function(){};
|
||||
|
||||
|
||||
hlsPrototype = {
|
||||
loadSource(url) {
|
||||
this.url = url;
|
||||
|
@ -73,7 +78,7 @@ class OlgplyProvider : TmdbProvider() {
|
|||
|
||||
function Hls() {};
|
||||
Hls.isSupported = function(){return true};
|
||||
|
||||
|
||||
Hls.prototype = hlsPrototype;
|
||||
Hls.prototype.constructor = Hls;
|
||||
|
||||
|
|
Loading…
Reference in a new issue