mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fixed Movie123Net
This commit is contained in:
parent
ea0b76509d
commit
796c67c7ef
3 changed files with 24 additions and 14 deletions
|
@ -1838,7 +1838,7 @@ object SoraExtractor : SoraStream() {
|
|||
it.t?.equals(
|
||||
"$title - Season $season",
|
||||
true
|
||||
) == true || it.s?.contains("$fixTitle-season-$season", true) == true
|
||||
) == true || it.s?.contains("$fixTitle-season-$season-", true) == true
|
||||
}
|
||||
}?.s?.substringAfterLast("-") ?: return
|
||||
|
||||
|
@ -2348,15 +2348,14 @@ object SoraExtractor : SoraStream() {
|
|||
// removed due to rate limit
|
||||
// if (!app.get(path).isSuccessful) return@apmap null
|
||||
|
||||
val size = file.size?.toDouble() ?: return@apmap null
|
||||
val sizeFile = "%.2f GB".format(bytesToGigaBytes(size))
|
||||
val size = "%.2f GB".format(bytesToGigaBytes(file.size?.toDouble() ?: return@apmap null))
|
||||
val quality = getIndexQuality(file.name)
|
||||
val tags = getIndexQualityTags(file.name)
|
||||
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
"$api $tags [$sizeFile]",
|
||||
"$api $tags [$sizeFile]",
|
||||
"$api $tags [$size]",
|
||||
"$api $tags [$size]",
|
||||
path,
|
||||
"",
|
||||
quality,
|
||||
|
|
|
@ -85,7 +85,7 @@ open class SoraStream : TmdbProvider() {
|
|||
const val series9API = "https://series9.la"
|
||||
const val idlixAPI = "https://idlixian.com"
|
||||
const val noverseAPI = "https://www.nollyverse.com"
|
||||
const val olgplyAPI = "https://olgply.xyz"
|
||||
const val olgplyAPI = "https://olgply.xyz" // dead
|
||||
const val uniqueStreamAPI = "https://uniquestreaming.net"
|
||||
const val filmxyAPI = "https://www.filmxy.vip"
|
||||
const val kimcartoonAPI = "https://kimcartoon.li"
|
||||
|
|
|
@ -82,7 +82,10 @@ fun String.filterIframe(seasonNum: Int?, lastSeason: Int?, year: Int?, title: St
|
|||
)
|
||||
}
|
||||
} else {
|
||||
this.contains(Regex("(?i)($year)|($dotSlug)|($spaceSlug)")) && !this.contains("Download", true)
|
||||
this.contains(Regex("(?i)($year)|($dotSlug)|($spaceSlug)")) && !this.contains(
|
||||
"Download",
|
||||
true
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,7 +273,12 @@ suspend fun getDrivebotLink(url: String?): String? {
|
|||
referer = url
|
||||
).parsedSafe<DriveBotLink>()?.url ?: return null
|
||||
|
||||
return app.get(fixUrl(file, baseUrl)).document.selectFirst("script:containsData(window.open)")
|
||||
return if (file.startsWith("http")) file else app.get(
|
||||
fixUrl(
|
||||
file,
|
||||
baseUrl
|
||||
)
|
||||
).document.selectFirst("script:containsData(window.open)")
|
||||
?.data()?.substringAfter("window.open('")?.substringBefore("')")
|
||||
}
|
||||
|
||||
|
@ -641,6 +649,7 @@ fun decodeIndexJson(json: String): String {
|
|||
val slug = json.reversed().substring(24)
|
||||
return base64Decode(slug.substring(0, slug.length - 20))
|
||||
}
|
||||
|
||||
fun String?.createSlug(): String? {
|
||||
return this?.replace(Regex("[!%:'?,]|( &)"), "")?.replace(" ", "-")?.lowercase()
|
||||
?.replace("-–-", "-")
|
||||
|
@ -657,11 +666,13 @@ fun getKisskhTitle(str: String?): String? {
|
|||
}
|
||||
|
||||
fun getIndexQualityTags(str: String?): String {
|
||||
return Regex("\\d{3,4}[pP]\\.?(.*?)\\.(mkv|mp4|avi)").find(str ?: "")?.groupValues?.getOrNull(1)?.replace(".", " ")?.trim() ?: ""
|
||||
return Regex("\\d{3,4}[pP]\\.?(.*?)\\.(mkv|mp4|avi)").find(str ?: "")?.groupValues?.getOrNull(1)
|
||||
?.replace(".", " ")?.trim() ?: ""
|
||||
}
|
||||
|
||||
fun getIndexQuality(str: String?): Int {
|
||||
return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull() ?: Qualities.Unknown.value
|
||||
return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull()
|
||||
?: Qualities.Unknown.value
|
||||
}
|
||||
|
||||
fun getQuality(str: String): Int {
|
||||
|
|
Loading…
Reference in a new issue