From 0de8c35e8a2b6cdf94584cb9741e8d009c065fd9 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 28 Jun 2026 19:58:02 -0600 Subject: [PATCH 1/2] EmturbovidExtractor: replace selectXpath This will be necessary when we finally fully migrate to ksoup, which currently doesn't have selectXpath, but for our usages that is not necessary. This way is also more consistent with how we do it everywhere else. --- .../extractors/EmturbovidExtractor.kt | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/EmturbovidExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/EmturbovidExtractor.kt index f4a5cdb2b18..50f203546a9 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/EmturbovidExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/EmturbovidExtractor.kt @@ -13,30 +13,27 @@ open class EmturbovidExtractor : ExtractorApi() { override val requiresReferer = false override suspend fun getUrl(url: String, referer: String?): List? { - val response = app.get( - url, referer = referer ?: "$mainUrl/" - ) - val playerScript = - response.document.selectXpath("//script[contains(text(),'var urlPlay')]") - .html() + val response = app.get(url, referer = referer ?: "$mainUrl/") + val playerScript = response.document + .select("script:contains(var urlPlay)") + .html() val sources = mutableListOf() if (playerScript.isNotBlank()) { - val m3u8Url = - playerScript.substringAfter("var urlPlay = '").substringBefore("'") - + val m3u8Url = playerScript.substringAfter("var urlPlay = '").substringBefore("'") sources.add( newExtractorLink( source = name, name = name, url = m3u8Url, - type = ExtractorLinkType.M3U8 + type = ExtractorLinkType.M3U8, ) { this.referer = "$mainUrl/" this.quality = Qualities.Unknown.value } ) } + return sources } -} \ No newline at end of file +} From 5426c1e3311b42d2182fa70121030258daaf4767 Mon Sep 17 00:00:00 2001 From: Luna712 <142361265+Luna712@users.noreply.github.com> Date: Sun, 28 Jun 2026 20:01:00 -0600 Subject: [PATCH 2/2] Use val --- .../lagradost/cloudstream3/extractors/EmturbovidExtractor.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/EmturbovidExtractor.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/EmturbovidExtractor.kt index 50f203546a9..262ed54e932 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/EmturbovidExtractor.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/EmturbovidExtractor.kt @@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.newExtractorLink open class EmturbovidExtractor : ExtractorApi() { - override var name = "Emturbovid" - override var mainUrl = "https://emturbovid.com" + override val name = "Emturbovid" + override val mainUrl = "https://emturbovid.com" override val requiresReferer = false override suspend fun getUrl(url: String, referer: String?): List? {