diff --git a/multisrc/overrides/animestream/minioppai/src/extractors/MiniOppaiExtractor.kt b/multisrc/overrides/animestream/minioppai/src/extractors/MiniOppaiExtractor.kt index c3a6e5fed9..ba2fa84345 100644 --- a/multisrc/overrides/animestream/minioppai/src/extractors/MiniOppaiExtractor.kt +++ b/multisrc/overrides/animestream/minioppai/src/extractors/MiniOppaiExtractor.kt @@ -26,7 +26,7 @@ class MiniOppaiExtractor(private val client: OkHttpClient) { return scriptData.getItems("sources", baseUrl) { videoUrl, quality -> val videoQuality = "MiniOppai - $quality" Video(videoUrl, videoQuality, videoUrl, headers, subtitleTracks = subs) - } + }.filterNot { it.url.contains("/uploads/unavailable.mp4") } } // time to over-engineer things for no reason at all diff --git a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/animestream/AnimeStream.kt b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/animestream/AnimeStream.kt index 1b0fccaf97..a16fdf1166 100644 --- a/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/animestream/AnimeStream.kt +++ b/multisrc/src/main/java/eu/kanade/tachiyomi/multisrc/animestream/AnimeStream.kt @@ -349,8 +349,17 @@ abstract class AnimeStream( client.newCall(GET(encodedData, headers)).execute().use { it.asJsoup() } } - return doc.selectFirst("iframe[src~=.]")?.attr("abs:src") - ?: doc.selectFirst("meta[content~=.][itemprop=embedUrl]")!!.attr("abs:content") + return doc.selectFirst("iframe[src~=.]")?.safeUrl() + ?: doc.selectFirst("meta[content~=.][itemprop=embedUrl]")!!.safeUrl("content") + } + + private fun Element.safeUrl(attribute: String = "src"): String { + val value = attr(attribute) + return when { + value.startsWith("http") -> value + value.startsWith("//") -> "https:$value" + else -> absUrl(attribute).ifEmpty { value } + } } protected open fun getVideoList(url: String, name: String): List