Skip to content

Commit

Permalink
fixed Gmovies
Browse files Browse the repository at this point in the history
  • Loading branch information
jackjohn committed Nov 21, 2023
1 parent 40163c8 commit d5bb853
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 13 deletions.
41 changes: 41 additions & 0 deletions SoraStream/src/main/kotlin/com/hexated/Extractors.kt
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,47 @@ open class Streamruby : ExtractorApi() {

}

open class Uploadever : ExtractorApi() {
override val name = "Uploadever"
override val mainUrl = "https://uploadever.in"
override val requiresReferer = true

override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
var res = app.get(url, referer = referer).document
val formUrl = res.select("form").attr("action")
var formData = res.select("form input").associate { it.attr("name") to it.attr("value") }.filterKeys { it != "go" }
.toMutableMap()
val formReq = app.post(formUrl, data = formData)

res = formReq.document
val captchaKey = res.select("script[src*=https://www.google.com/recaptcha/api.js?render=]").attr("src").substringAfter("render=")
val token = getCaptchaToken(url, captchaKey, referer = "$mainUrl/")
formData = res.select("form#down input").associate { it.attr("name") to it.attr("value") }.toMutableMap()
formData["adblock_detected"] = "0"
formData["referer"] = url
res = app.post(formReq.url, data = formData + mapOf("g-recaptcha-response" to "$token"), cookies = formReq.cookies).document
val video = res.select("div.download-button a.btn.btn-dow.recaptchav2").attr("href")

callback.invoke(
ExtractorLink(
this.name,
this.name,
video,
"",
Qualities.Unknown.value,
INFER_TYPE
)
)

}

}

class Streamwish : Filesim() {
override val name = "Streamwish"
override var mainUrl = "https://streamwish.to"
Expand Down
16 changes: 3 additions & 13 deletions SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@ object SoraExtractor : SoraStream() {
year: Int? = null,
season: Int? = null,
episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val fixTitle = title.createSlug()
Expand All @@ -1201,23 +1202,12 @@ object SoraExtractor : SoraStream() {
it.select("a").attr("href") to it.text()
}
})?.filter {
it.first.contains("gdtot") && it.second.contains(Regex("(?i)(4k|1080p)"))
it.second.contains(Regex("(?i)(4k|1080p)"))
} ?: return

iframe.apmap { (iframeLink, title) ->
val size = Regex("(?i)\\s(\\S+gb|mb)").find(title)?.groupValues?.getOrNull(1)
val gdBotLink = extractGdbot(iframeLink)
val videoLink = extractGdflix(gdBotLink ?: return@apmap null)

callback.invoke(
ExtractorLink(
"GMovies",
"GMovies [$size]",
videoLink ?: return@apmap null,
"",
getGMoviesQuality(title)
)
)
loadCustomTagExtractor("[$size]",iframeLink, "$gMoviesAPI/", subtitleCallback, callback, getIndexQuality(title))
}
}

Expand Down
1 change: 1 addition & 0 deletions SoraStream/src/main/kotlin/com/hexated/SoraStream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ open class SoraStream : TmdbProvider() {
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
},
Expand Down
1 change: 1 addition & 0 deletions SoraStream/src/main/kotlin/com/hexated/SoraStreamPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ class SoraStreamPlugin: Plugin() {
registerExtractorAPI(FilelionsTo())
registerExtractorAPI(Embedwish())
registerExtractorAPI(Wishfast())
registerExtractorAPI(Uploadever())
}
}

0 comments on commit d5bb853

Please sign in to comment.