Polishing Voe extractor

master
Swissky 2024-07-01 14:23:18 +02:00
parent 88bfc17616
commit f14f54cfe0
3 changed files with 7 additions and 8 deletions

View File

@ -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
* upstream.to is using hls2 but voe.sx hls2 is working

View File

@ -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)

View File

@ -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,