mirror of
https://github.com/recloudstream/cloudstream.git
synced 2025-08-06 19:43:48 +08:00
Added GamoVideo extractor, improved streamtape, fix mixdrop and Vidmoly (#1324)
This commit is contained in:
@ -0,0 +1,30 @@
|
|||||||
|
package com.lagradost.cloudstream3.extractors
|
||||||
|
|
||||||
|
import com.lagradost.cloudstream3.app
|
||||||
|
import com.lagradost.cloudstream3.utils.*
|
||||||
|
|
||||||
|
|
||||||
|
open class GamoVideo : ExtractorApi() {
|
||||||
|
override val name = "GamoVideo"
|
||||||
|
override val mainUrl = "https://gamovideo.com"
|
||||||
|
override val requiresReferer = true
|
||||||
|
|
||||||
|
override suspend fun getUrl(
|
||||||
|
url: String,
|
||||||
|
referer: String?
|
||||||
|
): List<ExtractorLink>? {
|
||||||
|
return app.get(url, referer = referer).document.select("script")
|
||||||
|
.firstOrNull { it.html().contains("sources:") }!!.html().substringAfter("file: \"")
|
||||||
|
.substringBefore("\",").let {
|
||||||
|
listOf(
|
||||||
|
ExtractorLink(
|
||||||
|
name,
|
||||||
|
name,
|
||||||
|
it,
|
||||||
|
url,
|
||||||
|
Qualities.Unknown.value,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -25,7 +25,7 @@ open class MixDrop : ExtractorApi() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||||
with(app.get(url)) {
|
with(app.get(url.replaceFirst("/f/", "/e/"))) {
|
||||||
getAndUnpack(this.text).let { unpackedText ->
|
getAndUnpack(this.text).let { unpackedText ->
|
||||||
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
|
||||||
return listOf(
|
return listOf(
|
||||||
|
@ -4,6 +4,7 @@ import com.lagradost.cloudstream3.app
|
|||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import org.mozilla.javascript.Context
|
||||||
|
|
||||||
class StreamTapeNet : StreamTape() {
|
class StreamTapeNet : StreamTape() {
|
||||||
override var mainUrl = "https://streamtape.net"
|
override var mainUrl = "https://streamtape.net"
|
||||||
@ -13,7 +14,7 @@ class StreamTapeXyz : StreamTape() {
|
|||||||
override var mainUrl = "https://streamtape.xyz"
|
override var mainUrl = "https://streamtape.xyz"
|
||||||
}
|
}
|
||||||
|
|
||||||
class ShaveTape : StreamTape(){
|
class ShaveTape : StreamTape() {
|
||||||
override var mainUrl = "https://shavetape.cash"
|
override var mainUrl = "https://shavetape.cash"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,14 +23,27 @@ open class StreamTape : ExtractorApi() {
|
|||||||
override var mainUrl = "https://streamtape.com"
|
override var mainUrl = "https://streamtape.com"
|
||||||
override val requiresReferer = false
|
override val requiresReferer = false
|
||||||
|
|
||||||
private val linkRegex =
|
|
||||||
Regex("""'robotlink'\)\.innerHTML = '(.+?)'\+ \('(.+?)'\)""")
|
|
||||||
|
|
||||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||||
with(app.get(url)) {
|
with(app.get(url)) {
|
||||||
linkRegex.find(this.text)?.let {
|
var result =
|
||||||
val extractedUrl =
|
this.document.select("script").firstOrNull { it.html().contains("botlink').innerHTML") }
|
||||||
"https:${it.groups[1]!!.value + it.groups[2]!!.value.substring(3)}"
|
?.html()?.lines()?.firstOrNull{ it.contains("botlink').innerHTML") }?.let {
|
||||||
|
val scriptContent =
|
||||||
|
it.substringAfter(").innerHTML").replaceFirst("=", "var url =")
|
||||||
|
val rhino = Context.enter()
|
||||||
|
rhino.optimizationLevel = -1
|
||||||
|
val scope = rhino.initStandardObjects()
|
||||||
|
var result = ""
|
||||||
|
try {
|
||||||
|
rhino.evaluateString(scope, scriptContent, "url", 1, null)
|
||||||
|
result = scope.get("url", scope).toString()
|
||||||
|
}finally {
|
||||||
|
rhino.close()
|
||||||
|
}
|
||||||
|
result
|
||||||
|
}
|
||||||
|
if(!result.isNullOrEmpty()){
|
||||||
|
val extractedUrl = "https:${result}&stream=1"
|
||||||
return listOf(
|
return listOf(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
name,
|
name,
|
||||||
|
@ -128,6 +128,11 @@ class Wishonly : StreamWishExtractor() {
|
|||||||
override val mainUrl = "https://wishonly.site"
|
override val mainUrl = "https://wishonly.site"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Playerwish : StreamWishExtractor() {
|
||||||
|
override val name = "Playerwish"
|
||||||
|
override val mainUrl = "https://playerwish.com"
|
||||||
|
}
|
||||||
|
|
||||||
open class StreamWishExtractor : ExtractorApi() {
|
open class StreamWishExtractor : ExtractorApi() {
|
||||||
override val name = "Streamwish"
|
override val name = "Streamwish"
|
||||||
override val mainUrl = "https://streamwish.to"
|
override val mainUrl = "https://streamwish.to"
|
||||||
|
@ -2,9 +2,11 @@ package com.lagradost.cloudstream3.extractors
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.SubtitleFile
|
import com.lagradost.cloudstream3.SubtitleFile
|
||||||
|
import com.lagradost.cloudstream3.USER_AGENT
|
||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.*
|
import com.lagradost.cloudstream3.utils.*
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
|
|
||||||
class Vidmolyme : Vidmoly() {
|
class Vidmolyme : Vidmoly() {
|
||||||
override val mainUrl = "https://vidmoly.me"
|
override val mainUrl = "https://vidmoly.me"
|
||||||
@ -26,15 +28,25 @@ open class Vidmoly : ExtractorApi() {
|
|||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val headers = mapOf(
|
val headers = mapOf(
|
||||||
"User-Agent" to "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Mobile Safari/537.36",
|
"user-agent" to USER_AGENT,
|
||||||
"Sec-Fetch-Dest" to "iframe"
|
"Sec-Fetch-Dest" to "iframe"
|
||||||
)
|
)
|
||||||
val script = app.get(
|
val newUrl = if(url.contains("/w/"))
|
||||||
url,
|
url.replaceFirst("/w/", "/embed-")+"-920x360.html"
|
||||||
headers = headers,
|
else url
|
||||||
referer = referer,
|
var script: String? = null;
|
||||||
).document.select("script")
|
var attemps = 0
|
||||||
.find { it.data().contains("sources:") }?.data()
|
while (attemps < 10 && script.isNullOrEmpty()){
|
||||||
|
attemps++
|
||||||
|
script = app.get(
|
||||||
|
newUrl,
|
||||||
|
headers = headers,
|
||||||
|
referer = referer,
|
||||||
|
).document.select("script")
|
||||||
|
.firstOrNull { it.data().contains("sources:") }?.data()
|
||||||
|
if(script.isNullOrEmpty())
|
||||||
|
delay(500)
|
||||||
|
}
|
||||||
val videoData = script?.substringAfter("sources: [")
|
val videoData = script?.substringAfter("sources: [")
|
||||||
?.substringBefore("],")?.addMarks("file")
|
?.substringBefore("],")?.addMarks("file")
|
||||||
val subData = script?.substringAfter("tracks: [")?.substringBefore("]")?.addMarks("file")
|
val subData = script?.substringAfter("tracks: [")?.substringBefore("]")?.addMarks("file")
|
||||||
|
@ -283,6 +283,8 @@ import com.lagradost.cloudstream3.extractors.Lulustream3
|
|||||||
import com.lagradost.cloudstream3.extractors.Vidguardto3
|
import com.lagradost.cloudstream3.extractors.Vidguardto3
|
||||||
import com.lagradost.cloudstream3.extractors.Ds2play
|
import com.lagradost.cloudstream3.extractors.Ds2play
|
||||||
import com.lagradost.cloudstream3.extractors.Ds2video
|
import com.lagradost.cloudstream3.extractors.Ds2video
|
||||||
|
import com.lagradost.cloudstream3.extractors.GamoVideo
|
||||||
|
import com.lagradost.cloudstream3.extractors.Playerwish
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
|
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
@ -911,6 +913,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||||||
Jeniusplay(),
|
Jeniusplay(),
|
||||||
StreamoUpload(),
|
StreamoUpload(),
|
||||||
|
|
||||||
|
GamoVideo(),
|
||||||
Gdriveplayerapi(),
|
Gdriveplayerapi(),
|
||||||
Gdriveplayerapp(),
|
Gdriveplayerapp(),
|
||||||
Gdriveplayerfun(),
|
Gdriveplayerfun(),
|
||||||
@ -964,6 +967,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||||||
CdnwishCom(),
|
CdnwishCom(),
|
||||||
FlaswishCom(),
|
FlaswishCom(),
|
||||||
SfastwishCom(),
|
SfastwishCom(),
|
||||||
|
Playerwish(),
|
||||||
EmturbovidExtractor(),
|
EmturbovidExtractor(),
|
||||||
Vtbe(),
|
Vtbe(),
|
||||||
EPlayExtractor(),
|
EPlayExtractor(),
|
||||||
|
Reference in New Issue
Block a user