mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fix UHDMovies
This commit is contained in:
parent
fa093cd1a0
commit
e69a0f141d
3 changed files with 12 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 109
|
||||
version = 110
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -1282,13 +1282,13 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
|
||||
sources.apmap { (quality, link) ->
|
||||
val driveLink = bypassTechmny(link ?: return@apmap null)
|
||||
val base = getBaseUrl(driveLink ?: return@apmap null)
|
||||
val driveLink = if(link?.contains("driveleech") == true) bypassDriveleech(link) else bypassTechmny(link ?: return@apmap)
|
||||
val base = getBaseUrl(driveLink ?: return@apmap)
|
||||
val resDoc = app.get(driveLink).document
|
||||
val bitLink = resDoc.selectFirst("a.btn.btn-outline-success")?.attr("href")
|
||||
val downloadLink = if (bitLink.isNullOrEmpty()) {
|
||||
val backupIframe = resDoc.select("a.btn.btn-outline-warning").attr("href")
|
||||
extractBackupUHD(backupIframe ?: return@apmap null)
|
||||
extractBackupUHD(backupIframe ?: return@apmap)
|
||||
} else {
|
||||
extractMirrorUHD(bitLink, base)
|
||||
}
|
||||
|
@ -1307,7 +1307,7 @@ object SoraExtractor : SoraStream() {
|
|||
ExtractorLink(
|
||||
"UHDMovies",
|
||||
"UHDMovies $tags $size",
|
||||
downloadLink ?: return@apmap null,
|
||||
downloadLink ?: return@apmap,
|
||||
"",
|
||||
qualities
|
||||
)
|
||||
|
|
|
@ -675,6 +675,13 @@ suspend fun bypassTechmny(url: String) : String? {
|
|||
return fixUrl(path, getBaseUrl(driveUrl))
|
||||
}
|
||||
|
||||
suspend fun bypassDriveleech(url: String) : String? {
|
||||
val path = app.get(url).text.substringAfter("replace(\"")
|
||||
.substringBefore("\")")
|
||||
if (path == "/404") return null
|
||||
return fixUrl(path, getBaseUrl(url))
|
||||
}
|
||||
|
||||
private fun getTechmnyCookies(page: String): Triple<String, String, String> {
|
||||
val cat = "rdst_cat"
|
||||
val post = "rdst_post"
|
||||
|
|
Loading…
Reference in a new issue