Extractor: ContentX expanded and fix

This commit is contained in:
keyiflerolsun 2024-01-08 11:01:12 +03:00
parent f687508521
commit 2dd5fa4605
No known key found for this signature in database
GPG key ID: 3034301CA5C50DA8
3 changed files with 8 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_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("\\", "")

View file

@ -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"
}

View file

@ -683,6 +683,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
SibNet(),
ContentX(),
Hotlinger(),
FourCX(),
HDMomPlayer(),
HDPlayerSystem(),
VideoSeyred(),