Extractor: ContentX expanded and fix (#859)

* Extractor: ContentX expanded and fix
This commit is contained in:
Ömer Faruk Sancak 2024-01-09 01:45:53 +03:00 committed by GitHub
parent f687508521
commit 42774f6183
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View file

@ -18,7 +18,7 @@ open class ContentX : ExtractorApi() {
val i_source = app.get(url, referer=ext_ref).text 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 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 vid_extract = Regex("""file\":\"([^\"]+)""").find(vid_source)!!.groups[1]?.value ?: throw ErrorLoadingException("vid_extract is null")
val m3u_link = vid_extract.replace("\\", "") 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 val i_dublaj = Regex(""",\"([^']+)\",\"Türkçe""").find(i_source)!!.groups[1]?.value
if (i_dublaj != null) { 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_extract = Regex("""file\":\"([^\"]+)""").find(dublaj_source)!!.groups[1]?.value ?: throw ErrorLoadingException("dublaj_extract is null")
val dublaj_link = dublaj_extract.replace("\\", "") val dublaj_link = dublaj_extract.replace("\\", "")

View file

@ -5,4 +5,9 @@ package com.lagradost.cloudstream3.extractors
class Hotlinger : ContentX() { class Hotlinger : ContentX() {
override var name = "Hotlinger" override var name = "Hotlinger"
override var mainUrl = "https://hotlinger.com" override var mainUrl = "https://hotlinger.com"
}
class FourCX : ContentX() {
override var name = "FourCX"
override var mainUrl = "https://four.contentx.me"
} }

View file

@ -104,6 +104,7 @@ import com.lagradost.cloudstream3.extractors.TauVideo
import com.lagradost.cloudstream3.extractors.SibNet import com.lagradost.cloudstream3.extractors.SibNet
import com.lagradost.cloudstream3.extractors.ContentX import com.lagradost.cloudstream3.extractors.ContentX
import com.lagradost.cloudstream3.extractors.Hotlinger import com.lagradost.cloudstream3.extractors.Hotlinger
import com.lagradost.cloudstream3.extractors.FourCX
import com.lagradost.cloudstream3.extractors.HDMomPlayer import com.lagradost.cloudstream3.extractors.HDMomPlayer
import com.lagradost.cloudstream3.extractors.HDPlayerSystem import com.lagradost.cloudstream3.extractors.HDPlayerSystem
import com.lagradost.cloudstream3.extractors.VideoSeyred import com.lagradost.cloudstream3.extractors.VideoSeyred
@ -683,6 +684,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
SibNet(), SibNet(),
ContentX(), ContentX(),
Hotlinger(), Hotlinger(),
FourCX(),
HDMomPlayer(), HDMomPlayer(),
HDPlayerSystem(), HDPlayerSystem(),
VideoSeyred(), VideoSeyred(),