From 42774f61835eb58e72094f36c6636f0360ffa687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Sancak?= Date: Tue, 9 Jan 2024 01:45:53 +0300 Subject: [PATCH] Extractor: ContentX expanded and fix (#859) * Extractor: ContentX expanded and fix --- .../lagradost/cloudstream3/extractors/ContentXExtractor.kt | 4 ++-- .../lagradost/cloudstream3/extractors/HotlingerExtractor.kt | 5 +++++ .../java/com/lagradost/cloudstream3/utils/ExtractorApi.kt | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/lagradost/cloudstream3/extractors/ContentXExtractor.kt b/app/src/main/java/com/lagradost/cloudstream3/extractors/ContentXExtractor.kt index 61943b70..02b4440d 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/extractors/ContentXExtractor.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/extractors/ContentXExtractor.kt @@ -18,7 +18,7 @@ open class ContentX : ExtractorApi() { val i_source = app.get(url, referer=ext_ref).text val i_extract = Regex("""window\.openPlayer\('([^']+)'""").find(i_source)!!.groups[1]?.value ?: throw ErrorLoadingException("i_extract is null") - val vid_source = app.get("https://contentx.me/source2.php?v=${i_extract}", referer=ext_ref).text + val vid_source = app.get("${mainUrl}/source2.php?v=${i_extract}", referer=ext_ref).text val vid_extract = Regex("""file\":\"([^\"]+)""").find(vid_source)!!.groups[1]?.value ?: throw ErrorLoadingException("vid_extract is null") val m3u_link = vid_extract.replace("\\", "") @@ -35,7 +35,7 @@ open class ContentX : ExtractorApi() { val i_dublaj = Regex(""",\"([^']+)\",\"Türkçe""").find(i_source)!!.groups[1]?.value if (i_dublaj != null) { - val dublaj_source = app.get("https://contentx.me/source2.php?v=${i_dublaj}", referer=ext_ref).text + val dublaj_source = app.get("${mainUrl}/source2.php?v=${i_dublaj}", referer=ext_ref).text val dublaj_extract = Regex("""file\":\"([^\"]+)""").find(dublaj_source)!!.groups[1]?.value ?: throw ErrorLoadingException("dublaj_extract is null") val dublaj_link = dublaj_extract.replace("\\", "") diff --git a/app/src/main/java/com/lagradost/cloudstream3/extractors/HotlingerExtractor.kt b/app/src/main/java/com/lagradost/cloudstream3/extractors/HotlingerExtractor.kt index 4a77cbf3..7389db68 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/extractors/HotlingerExtractor.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/extractors/HotlingerExtractor.kt @@ -5,4 +5,9 @@ package com.lagradost.cloudstream3.extractors class Hotlinger : ContentX() { override var name = "Hotlinger" override var mainUrl = "https://hotlinger.com" +} + +class FourCX : ContentX() { + override var name = "FourCX" + override var mainUrl = "https://four.contentx.me" } \ No newline at end of file diff --git a/app/src/main/java/com/lagradost/cloudstream3/utils/ExtractorApi.kt b/app/src/main/java/com/lagradost/cloudstream3/utils/ExtractorApi.kt index deb0eb3c..2f686a2c 100644 --- a/app/src/main/java/com/lagradost/cloudstream3/utils/ExtractorApi.kt +++ b/app/src/main/java/com/lagradost/cloudstream3/utils/ExtractorApi.kt @@ -104,6 +104,7 @@ import com.lagradost.cloudstream3.extractors.TauVideo import com.lagradost.cloudstream3.extractors.SibNet import com.lagradost.cloudstream3.extractors.ContentX import com.lagradost.cloudstream3.extractors.Hotlinger +import com.lagradost.cloudstream3.extractors.FourCX import com.lagradost.cloudstream3.extractors.HDMomPlayer import com.lagradost.cloudstream3.extractors.HDPlayerSystem import com.lagradost.cloudstream3.extractors.VideoSeyred @@ -683,6 +684,7 @@ val extractorApis: MutableList = arrayListOf( SibNet(), ContentX(), Hotlinger(), + FourCX(), HDMomPlayer(), HDPlayerSystem(), VideoSeyred(),