[Sora] small fix in moviesbay

This commit is contained in:
hexated 2022-12-29 20:19:16 +07:00
parent 25e2deb249
commit cffce41393
3 changed files with 11 additions and 2 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 64
version = 65
cloudstream {

View file

@ -1536,8 +1536,9 @@ object SoraExtractor : SoraStream() {
val size = media[index.minus(1)]
val quality = media[index.minus(2)]
val qualityName = media[index.minus(3)]
val gdriveLink = getDirectGdrive(it)
val doc = app.get(it).document
val doc = app.get(gdriveLink).document
val form = doc.select("form#download-form").attr("action")
val uc = doc.select("input#uc-download-link").attr("value")
val link = app.post(

View file

@ -254,6 +254,14 @@ suspend fun extractCovyn(url: String?): Pair<String?, String?>? {
return Pair(videoLink, size)
}
fun getDirectGdrive(url: String): String {
return if(url.endsWith("share_link")) {
"https://drive.google.com/uc?id=${url.substringAfter("/d/").substringBefore("/")}&export=download"
} else {
url
}
}
suspend fun bypassFdAds(url: String): String? {
val res = app.get(url).document
val freeRedirect = res.selectFirst("a#link")?.attr("href")