From a50fcc8cf5038799e5f991f179ea2e2c8c0344f0 Mon Sep 17 00:00:00 2001 From: Zaw Date: Wed, 15 Feb 2023 22:45:47 +0300 Subject: [PATCH] pls work --- .../src/main/kotlin/com/movizland/MovizlandProvider.kt | 2 ++ .../src/main/kotlin/com/mycima/MyCimaProvider.kt | 9 +++++++-- .../src/main/kotlin/com/shahid4u/JWPlayerExtractor.kt | 2 +- .../src/main/kotlin/com/shahid4u/Shahid4uPlugin.kt | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/MovizlandProvider/src/main/kotlin/com/movizland/MovizlandProvider.kt b/MovizlandProvider/src/main/kotlin/com/movizland/MovizlandProvider.kt index 7479905..0cf0a4e 100644 --- a/MovizlandProvider/src/main/kotlin/com/movizland/MovizlandProvider.kt +++ b/MovizlandProvider/src/main/kotlin/com/movizland/MovizlandProvider.kt @@ -1,6 +1,7 @@ package com.movizland +import android.annotation.SuppressLint import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer import com.lagradost.cloudstream3.utils.ExtractorLink @@ -71,6 +72,7 @@ class Movizland : MainAPI() { return newHomePageResponse(request.name, list) } + @SuppressLint("SuspiciousIndentation") override suspend fun search(query: String): List { val q = query.replace(" ".toRegex(), "%20") val result = arrayListOf() diff --git a/MyCimaProvider/src/main/kotlin/com/mycima/MyCimaProvider.kt b/MyCimaProvider/src/main/kotlin/com/mycima/MyCimaProvider.kt index a78f522..bd63c3a 100644 --- a/MyCimaProvider/src/main/kotlin/com/mycima/MyCimaProvider.kt +++ b/MyCimaProvider/src/main/kotlin/com/mycima/MyCimaProvider.kt @@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addActors import com.lagradost.cloudstream3.utils.AppUtils.parseJson import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.loadExtractor import org.jsoup.Jsoup import org.jsoup.nodes.Element @@ -308,8 +309,12 @@ class MyCima : MainAPI() { subtitleCallback: (SubtitleFile) -> Unit, callback: (ExtractorLink) -> Unit ): Boolean { - app.get(data).document - .select("ul.List--Download--Mycima--Single:nth-child(2) li").map { + val doc = app.get(data).document + doc.select(".WatchServersList > ul > li").apmap { + val url = it.select("btn").attr("data-url") + loadExtractor(url, data, subtitleCallback, callback) + } + doc.select("ul.List--Download--Mycima--Single:nth-child(2) li").apmap { it.select("a").map { linkElement -> callback.invoke( ExtractorLink( diff --git a/Shahid4uProvider/src/main/kotlin/com/shahid4u/JWPlayerExtractor.kt b/Shahid4uProvider/src/main/kotlin/com/shahid4u/JWPlayerExtractor.kt index d61a934..a762f9a 100644 --- a/Shahid4uProvider/src/main/kotlin/com/shahid4u/JWPlayerExtractor.kt +++ b/Shahid4uProvider/src/main/kotlin/com/shahid4u/JWPlayerExtractor.kt @@ -53,7 +53,7 @@ open class JWPlayer : ExtractorApi() { ) } -class VidHD : JWPlayer() { +class VidHDJW : JWPlayer() { override val name = "VidHD" override val mainUrl = "https://vidhd.fun" } diff --git a/Shahid4uProvider/src/main/kotlin/com/shahid4u/Shahid4uPlugin.kt b/Shahid4uProvider/src/main/kotlin/com/shahid4u/Shahid4uPlugin.kt index a1404e1..0777b56 100644 --- a/Shahid4uProvider/src/main/kotlin/com/shahid4u/Shahid4uPlugin.kt +++ b/Shahid4uProvider/src/main/kotlin/com/shahid4u/Shahid4uPlugin.kt @@ -7,8 +7,8 @@ import android.content.Context class Shahid4uPlugin: Plugin() { override fun load(context: Context) { registerMainAPI(Shahid4u()) + registerExtractorAPI(VidHDJW()) registerExtractorAPI(VidHD()) registerExtractorAPI(GoStream()) - registerExtractorAPI(Vidbom()) } } \ No newline at end of file