From f14f54cfe02a137baf302c847baccb04892b07a6 Mon Sep 17 00:00:00 2001 From: Swissky <12152583+swisskyrepo@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:23:18 +0200 Subject: [PATCH] Polishing Voe extractor --- README.md | 8 +++----- Sflix/src/main/kotlin/com/example/UpstreamExtractor.kt | 1 + Sflix/src/main/kotlin/com/example/VoeExtractor.kt | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 12de363..ecba72b 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,7 @@ > Attempt to write some plugins for cloudstream -* Sflix (WIP from scratch) :x: - +* Sflix (from scratch) :white_check_mark: * HiAnime (from Rowdy-Avocado) :white_check_mark: * Aniwave (from Rowdy-Avocado) :white_check_mark: * SuperStream (from Hexated) :white_check_mark: @@ -11,8 +10,7 @@ * ZoroTV (TODO from scratch) :x: * Onstream (TODO from scratch) :x: -* HDToday :x: - +* HDToday (TODO from scratch) :x: (upcloud/vidcloud/upstream/mixdrop) ## Docs @@ -35,4 +33,4 @@ adb logcat -s mnemo * vidcloud / upcloud uses https://rabbitstream.net/ * 9animetv is the same as Aniwave ? -* upstream.to is using hls2 \ No newline at end of file +* upstream.to is using hls2 but voe.sx hls2 is working \ No newline at end of file diff --git a/Sflix/src/main/kotlin/com/example/UpstreamExtractor.kt b/Sflix/src/main/kotlin/com/example/UpstreamExtractor.kt index 9184402..93042a7 100644 --- a/Sflix/src/main/kotlin/com/example/UpstreamExtractor.kt +++ b/Sflix/src/main/kotlin/com/example/UpstreamExtractor.kt @@ -126,6 +126,7 @@ class Upstream : ExtractorApi() { // quality headers = mapOf( "Host" to "s18.upstreamcdn.co", + "Referer" to "https://upstream.to/", "Origin" to mainUrl ) ).forEach(callback) diff --git a/Sflix/src/main/kotlin/com/example/VoeExtractor.kt b/Sflix/src/main/kotlin/com/example/VoeExtractor.kt index f4f6165..fb17626 100644 --- a/Sflix/src/main/kotlin/com/example/VoeExtractor.kt +++ b/Sflix/src/main/kotlin/com/example/VoeExtractor.kt @@ -24,14 +24,14 @@ class Voe2 : ExtractorApi() { subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit ) { - Log.d("mnemo", "voe.sx loaded") + // Log.d("mnemo", "voe.sx loaded") // Extract the first redirect URL, like https://roberteachfinal.com/e/xxxxxxx val voeDoc = app.get(url, referer = referer).document val redirRegex = """window.location.href = '(.*)'""".toRegex() val redirResult = redirRegex.find(voeDoc.html())?.groupValues?.get(1) if (redirResult != null){ - Log.d("mnemo", "voe.sx redirect: ${redirResult}") + // Log.d("mnemo", "voe.sx redirect: ${redirResult}") val res = app.get(redirResult, referer = referer).document val script = res.select("script").find { it.data().contains("sources =") }?.data() val link = Regex("[\"']hls[\"']:\\s*[\"'](.*)[\"']").find(script ?: return)?.groupValues?.get(1) @@ -52,7 +52,7 @@ class Voe2 : ExtractorApi() { } videoLinks.forEach { videoLink -> - Log.d("mnemo", "voe.sx video link: ${videoLink}") + // Log.d("mnemo", "voe.sx video link: ${videoLink}") M3u8Helper.generateM3u8( name, videoLink,