From 1375d17fce4ae3a732963f6f7664fce6b40f3648 Mon Sep 17 00:00:00 2001 From: hexated Date: Tue, 30 May 2023 21:53:48 +0700 Subject: [PATCH] sora: fix smashy1 --- SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 2 +- SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 60a5615c..bbc7158d 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1889,7 +1889,7 @@ object SoraExtractor : SoraStream() { }.apmap { when { it.first.contains("/ffix") && !isAnime -> { - invokeSmashyFfix(it.second, it.first, callback) + invokeSmashyFfix(it.second, it.first, url, callback) } it.first.contains("/gtop") -> { invokeSmashyGtop(it.second, it.first, callback) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index cf1ad159..609e0953 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -431,10 +431,11 @@ suspend fun invokeVizcloud( suspend fun invokeSmashyFfix( name: String, url: String, + ref: String, callback: (ExtractorLink) -> Unit, ) { val script = - app.get(url).document.selectFirst("script:containsData(player =)")?.data() ?: return + app.get(url, referer = ref).document.selectFirst("script:containsData(player =)")?.data() ?: return val source = Regex("file:\\s['\"](\\S+?)['|\"]").find(script)?.groupValues?.get(