diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/CineMMRedirect.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/CineMMRedirect.kt new file mode 100644 index 00000000000..62c45007371 --- /dev/null +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/CineMMRedirect.kt @@ -0,0 +1,101 @@ +package com.lagradost.cloudstream3.extractors + +import com.lagradost.cloudstream3.SubtitleFile +import com.lagradost.cloudstream3.utils.ExtractorApi +import com.lagradost.cloudstream3.utils.ExtractorLink +import com.lagradost.cloudstream3.utils.loadExtractor +import okhttp3.HttpUrl.Companion.toHttpUrl + +// deobfuscated from https://hglink.to/main.js?v=1.1.3 using https://deobfuscate.io/ +private val mirrors = arrayOf( + "hgplaycdn.com", + "habetar.com", + "yuguaab.com", + "guxhag.com", + "auvexiug.com", + "xenolyzb.com", + "haxloppd.com", + "cavanhabg.com", + "dumbalag.com", + "uasopt.com" +) + +class HgplayCDN: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://hgplaycdn.com" +} + +class Habetar: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://habetar.com" +} + +class Yuguaab: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://yuguaab.com" +} + +class Guxhag: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://guxhag.com" +} + +class Auvexiug: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://auvexiug.com" +} + +class Xenolyzb: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://xenolyzb.com" +} + +class Haxloppd: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://haxloppd.com" +} + +class Cavanhabg: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://cavanhabg.com" +} + +class Dumbalag: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://dumbalag.com" +} + +class Uasopt: VidHidePro() { + override val name: String = "CineMM" + override val mainUrl: String = "https://uasopt.com" +} + +class Dhcplay: CineMMRedirect() { + override val mainUrl: String = "https://dhcplay.com" +} + +class HglinkTo: CineMMRedirect() { + override val mainUrl: String = "https://hglink.to" +} + +// These providers redirect to one of the other mirrors immediately, +// i.e. they pick a random one of the links above +abstract class CineMMRedirect : ExtractorApi() { + override val name: String = "CineMMRedirect" + override val requiresReferer: Boolean = false + + override suspend fun getUrl( + url: String, + referer: String?, + subtitleCallback: (SubtitleFile) -> Unit, + callback: (ExtractorLink) -> Unit + ) { + val videoId = url.toHttpUrl().encodedPath + val mirror = mirrors.random() + + // re-use existing extractors by calling the ExtractorApi + // of the randomly selected mirror URL + val mirrorUrlWithVideoId = "https://$mirror$videoId" + loadExtractor(mirrorUrlWithVideoId, referer, subtitleCallback, callback) + } +} \ No newline at end of file diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/VidHidePro.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/VidHidePro.kt index 5a3bba08e8c..cce5b01b363 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/VidHidePro.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/extractors/VidHidePro.kt @@ -10,11 +10,6 @@ class VidHidePro1 : VidHidePro() { override var mainUrl = "https://filelions.live" } -class Dhcplay: VidHidePro() { - override var name = "DHC Play" - override var mainUrl = "https://dhcplay.com" -} - class VidHidePro2 : VidHidePro() { override var mainUrl = "https://filelions.online" } diff --git a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt index 98371a73824..9fa926cc032 100644 --- a/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt +++ b/library/src/commonMain/kotlin/com/lagradost/cloudstream3/utils/ExtractorApi.kt @@ -12,6 +12,7 @@ import com.lagradost.cloudstream3.extractors.Ahvsh import com.lagradost.cloudstream3.extractors.Aico import com.lagradost.cloudstream3.extractors.AsianLoad import com.lagradost.cloudstream3.extractors.Asnwish +import com.lagradost.cloudstream3.extractors.Auvexiug import com.lagradost.cloudstream3.extractors.Awish import com.lagradost.cloudstream3.extractors.BgwpCC import com.lagradost.cloudstream3.extractors.BigwarpArt @@ -23,6 +24,7 @@ import com.lagradost.cloudstream3.extractors.Bysezejataos import com.lagradost.cloudstream3.extractors.ByseBuho import com.lagradost.cloudstream3.extractors.ByseVepoin import com.lagradost.cloudstream3.extractors.ByteShare +import com.lagradost.cloudstream3.extractors.Cavanhabg import com.lagradost.cloudstream3.extractors.Cda import com.lagradost.cloudstream3.extractors.Cdnplayer import com.lagradost.cloudstream3.extractors.CdnwishCom @@ -60,6 +62,7 @@ import com.lagradost.cloudstream3.extractors.Dooood import com.lagradost.cloudstream3.extractors.Ds2play import com.lagradost.cloudstream3.extractors.Ds2video import com.lagradost.cloudstream3.extractors.DsstOnline +import com.lagradost.cloudstream3.extractors.Dumbalag import com.lagradost.cloudstream3.extractors.Dwish import com.lagradost.cloudstream3.extractors.EPlayExtractor import com.lagradost.cloudstream3.extractors.Embedgram @@ -103,9 +106,14 @@ import com.lagradost.cloudstream3.extractors.Gofile import com.lagradost.cloudstream3.extractors.GoodstreamExtractor import com.lagradost.cloudstream3.extractors.GuardareStream import com.lagradost.cloudstream3.extractors.Guccihide +import com.lagradost.cloudstream3.extractors.Guxhag import com.lagradost.cloudstream3.extractors.HDMomPlayer import com.lagradost.cloudstream3.extractors.HDPlayerSystem import com.lagradost.cloudstream3.extractors.HDStreamAble +import com.lagradost.cloudstream3.extractors.Habetar +import com.lagradost.cloudstream3.extractors.Haxloppd +import com.lagradost.cloudstream3.extractors.HglinkTo +import com.lagradost.cloudstream3.extractors.HgplayCDN import com.lagradost.cloudstream3.extractors.Hotlinger import com.lagradost.cloudstream3.extractors.HubCloud import com.lagradost.cloudstream3.extractors.Hxfile @@ -237,6 +245,7 @@ import com.lagradost.cloudstream3.extractors.Techinmind import com.lagradost.cloudstream3.extractors.Tomatomatela import com.lagradost.cloudstream3.extractors.TomatomatelalClub import com.lagradost.cloudstream3.extractors.Tubeless +import com.lagradost.cloudstream3.extractors.Uasopt import com.lagradost.cloudstream3.extractors.Up4FunTop import com.lagradost.cloudstream3.extractors.Up4Stream import com.lagradost.cloudstream3.extractors.Upstream @@ -296,6 +305,7 @@ import com.lagradost.cloudstream3.extractors.WishembedPro import com.lagradost.cloudstream3.extractors.Wishfast import com.lagradost.cloudstream3.extractors.Wishonly import com.lagradost.cloudstream3.extractors.XStreamCdn +import com.lagradost.cloudstream3.extractors.Xenolyzb import com.lagradost.cloudstream3.extractors.Yipsu import com.lagradost.cloudstream3.extractors.YourUpload import com.lagradost.cloudstream3.extractors.YoutubeExtractor @@ -303,6 +313,7 @@ import com.lagradost.cloudstream3.extractors.YoutubeMobileExtractor import com.lagradost.cloudstream3.extractors.YoutubeNoCookieExtractor import com.lagradost.cloudstream3.extractors.YoutubeShortLinkExtractor import com.lagradost.cloudstream3.extractors.Yufiles +import com.lagradost.cloudstream3.extractors.Yuguaab import com.lagradost.cloudstream3.extractors.Zorofile import com.lagradost.cloudstream3.extractors.Zplayer import com.lagradost.cloudstream3.extractors.ZplayerV2 @@ -1164,7 +1175,23 @@ val extractorApis: MutableList = arrayListOf( VidHidePro5(), VidHidePro6(), Dhtpre(), + + // CineMM Redirects Dhcplay(), + HglinkTo(), + + // CineMM mirrors + HgplayCDN(), + Habetar(), + Yuguaab(), + Guxhag(), + Auvexiug(), + Xenolyzb(), + Haxloppd(), + Cavanhabg(), + Dumbalag(), + Uasopt(), + Smoothpre(), Peytonepre(), LuluStream(),