mirror of
https://github.com/recloudstream/cloudstream.git
synced 2025-08-06 11:31:45 +08:00
feat: add earnvids extractors based on vidhide and fix vidhide (#1651)
This commit is contained in:
@ -30,6 +30,20 @@ class VidHidePro6 : VidHidePro() {
|
|||||||
override val mainUrl = "https://vidhidepre.com"
|
override val mainUrl = "https://vidhidepre.com"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Smoothpre: VidHidePro() {
|
||||||
|
override var name = "EarnVids"
|
||||||
|
override var mainUrl = "https://smoothpre.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dhtpre: VidHidePro() {
|
||||||
|
override var name = "EarnVids"
|
||||||
|
override var mainUrl = "https://dhtpre.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Peytonepre : VidHidePro() {
|
||||||
|
override var name = "EarnVids"
|
||||||
|
override var mainUrl = "https://peytonepre.com"
|
||||||
|
}
|
||||||
|
|
||||||
open class VidHidePro : ExtractorApi() {
|
open class VidHidePro : ExtractorApi() {
|
||||||
override val name = "VidHidePro"
|
override val name = "VidHidePro"
|
||||||
@ -57,16 +71,18 @@ open class VidHidePro : ExtractorApi() {
|
|||||||
getAndUnpack(response.text)
|
getAndUnpack(response.text)
|
||||||
} else {
|
} else {
|
||||||
response.document.selectFirst("script:containsData(sources:)")?.data()
|
response.document.selectFirst("script:containsData(sources:)")?.data()
|
||||||
}
|
} ?: return
|
||||||
val m3u8 =
|
|
||||||
Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return)?.groupValues?.getOrNull(1)
|
// m3u8 urls could be prefixed by 'file:', 'hls2:' or 'hls4:', so we just match ':'
|
||||||
|
Regex(":\\s*\"(.*?m3u8.*?)\"").findAll(script).forEach { m3u8Match ->
|
||||||
generateM3u8(
|
generateM3u8(
|
||||||
name,
|
name,
|
||||||
m3u8 ?: return,
|
m3u8Match.groupValues[1],
|
||||||
mainUrl,
|
mainUrl,
|
||||||
headers = headers
|
headers = headers
|
||||||
).forEach(callback)
|
).forEach(callback)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun getEmbedUrl(url: String): String {
|
private fun getEmbedUrl(url: String): String {
|
||||||
return when {
|
return when {
|
||||||
|
@ -1,37 +1,7 @@
|
|||||||
package com.lagradost.cloudstream3.extractors
|
package com.lagradost.cloudstream3.extractors
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.app
|
open class VidhideExtractor : VidHidePro() {
|
||||||
import com.lagradost.cloudstream3.network.WebViewResolver
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLinkType
|
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
|
||||||
import com.lagradost.cloudstream3.utils.newExtractorLink
|
|
||||||
|
|
||||||
open class VidhideExtractor : ExtractorApi() {
|
|
||||||
override var name = "VidHide"
|
override var name = "VidHide"
|
||||||
override var mainUrl = "https://vidhide.com"
|
override var mainUrl = "https://vidhide.com"
|
||||||
override val requiresReferer = false
|
override val requiresReferer = false
|
||||||
|
|
||||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
|
||||||
val response = app.get(
|
|
||||||
url, referer = referer ?: "$mainUrl/", interceptor = WebViewResolver(
|
|
||||||
Regex("""master\.m3u8""")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
val sources = mutableListOf<ExtractorLink>()
|
|
||||||
if (response.url.contains("m3u8"))
|
|
||||||
sources.add(
|
|
||||||
newExtractorLink(
|
|
||||||
source = name,
|
|
||||||
name = name,
|
|
||||||
url = response.url,
|
|
||||||
type = ExtractorLinkType.M3U8
|
|
||||||
) {
|
|
||||||
this.referer = referer ?: "$mainUrl/"
|
|
||||||
this.quality = Qualities.Unknown.value
|
|
||||||
}
|
|
||||||
)
|
|
||||||
return sources
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -38,6 +38,7 @@ import com.lagradost.cloudstream3.extractors.DesuArcg
|
|||||||
import com.lagradost.cloudstream3.extractors.DesuDrive
|
import com.lagradost.cloudstream3.extractors.DesuDrive
|
||||||
import com.lagradost.cloudstream3.extractors.DesuOdchan
|
import com.lagradost.cloudstream3.extractors.DesuOdchan
|
||||||
import com.lagradost.cloudstream3.extractors.DesuOdvip
|
import com.lagradost.cloudstream3.extractors.DesuOdvip
|
||||||
|
import com.lagradost.cloudstream3.extractors.Dhtpre
|
||||||
import com.lagradost.cloudstream3.extractors.Dokicloud
|
import com.lagradost.cloudstream3.extractors.Dokicloud
|
||||||
import com.lagradost.cloudstream3.extractors.DoodCxExtractor
|
import com.lagradost.cloudstream3.extractors.DoodCxExtractor
|
||||||
import com.lagradost.cloudstream3.extractors.DoodLaExtractor
|
import com.lagradost.cloudstream3.extractors.DoodLaExtractor
|
||||||
@ -152,6 +153,7 @@ import com.lagradost.cloudstream3.extractors.OkRuHTTP
|
|||||||
import com.lagradost.cloudstream3.extractors.OkRuSSL
|
import com.lagradost.cloudstream3.extractors.OkRuSSL
|
||||||
import com.lagradost.cloudstream3.extractors.Okrulink
|
import com.lagradost.cloudstream3.extractors.Okrulink
|
||||||
import com.lagradost.cloudstream3.extractors.PeaceMakerst
|
import com.lagradost.cloudstream3.extractors.PeaceMakerst
|
||||||
|
import com.lagradost.cloudstream3.extractors.Peytonepre
|
||||||
import com.lagradost.cloudstream3.extractors.Pichive
|
import com.lagradost.cloudstream3.extractors.Pichive
|
||||||
import com.lagradost.cloudstream3.extractors.PixelDrain
|
import com.lagradost.cloudstream3.extractors.PixelDrain
|
||||||
import com.lagradost.cloudstream3.extractors.PlayLtXyz
|
import com.lagradost.cloudstream3.extractors.PlayLtXyz
|
||||||
@ -178,6 +180,7 @@ import com.lagradost.cloudstream3.extractors.SfastwishCom
|
|||||||
import com.lagradost.cloudstream3.extractors.ShaveTape
|
import com.lagradost.cloudstream3.extractors.ShaveTape
|
||||||
import com.lagradost.cloudstream3.extractors.SibNet
|
import com.lagradost.cloudstream3.extractors.SibNet
|
||||||
import com.lagradost.cloudstream3.extractors.Simpulumlamerop
|
import com.lagradost.cloudstream3.extractors.Simpulumlamerop
|
||||||
|
import com.lagradost.cloudstream3.extractors.Smoothpre
|
||||||
import com.lagradost.cloudstream3.extractors.Sobreatsesuyp
|
import com.lagradost.cloudstream3.extractors.Sobreatsesuyp
|
||||||
import com.lagradost.cloudstream3.extractors.Solidfiles
|
import com.lagradost.cloudstream3.extractors.Solidfiles
|
||||||
import com.lagradost.cloudstream3.extractors.Ssbstream
|
import com.lagradost.cloudstream3.extractors.Ssbstream
|
||||||
@ -1136,6 +1139,9 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||||||
VidHidePro4(),
|
VidHidePro4(),
|
||||||
VidHidePro5(),
|
VidHidePro5(),
|
||||||
VidHidePro6(),
|
VidHidePro6(),
|
||||||
|
Dhtpre(),
|
||||||
|
Smoothpre(),
|
||||||
|
Peytonepre(),
|
||||||
LuluStream(),
|
LuluStream(),
|
||||||
Lulustream1(),
|
Lulustream1(),
|
||||||
Lulustream2(),
|
Lulustream2(),
|
||||||
|
Reference in New Issue
Block a user