Added GamoVideo extractor, improved streamtape, fix mixdrop and Vidmoly (#1324)

This commit is contained in:
redblacker8
2024-09-13 13:39:58 -06:00
committed by GitHub
parent 9e55a19bf3
commit f208301de2
6 changed files with 80 additions and 15 deletions

View File

@ -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,
)
)
}
}
}

View File

@ -25,7 +25,7 @@ open class MixDrop : ExtractorApi() {
}
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 ->
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
return listOf(

View File

@ -4,6 +4,7 @@ import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import org.mozilla.javascript.Context
class StreamTapeNet : StreamTape() {
override var mainUrl = "https://streamtape.net"
@ -13,7 +14,7 @@ class StreamTapeXyz : StreamTape() {
override var mainUrl = "https://streamtape.xyz"
}
class ShaveTape : StreamTape(){
class ShaveTape : StreamTape() {
override var mainUrl = "https://shavetape.cash"
}
@ -22,14 +23,27 @@ open class StreamTape : ExtractorApi() {
override var mainUrl = "https://streamtape.com"
override val requiresReferer = false
private val linkRegex =
Regex("""'robotlink'\)\.innerHTML = '(.+?)'\+ \('(.+?)'\)""")
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
with(app.get(url)) {
linkRegex.find(this.text)?.let {
val extractedUrl =
"https:${it.groups[1]!!.value + it.groups[2]!!.value.substring(3)}"
var result =
this.document.select("script").firstOrNull { it.html().contains("botlink').innerHTML") }
?.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(
ExtractorLink(
name,

View File

@ -128,6 +128,11 @@ class Wishonly : StreamWishExtractor() {
override val mainUrl = "https://wishonly.site"
}
class Playerwish : StreamWishExtractor() {
override val name = "Playerwish"
override val mainUrl = "https://playerwish.com"
}
open class StreamWishExtractor : ExtractorApi() {
override val name = "Streamwish"
override val mainUrl = "https://streamwish.to"

View File

@ -2,9 +2,11 @@ package com.lagradost.cloudstream3.extractors
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.USER_AGENT
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import kotlinx.coroutines.delay
class Vidmolyme : Vidmoly() {
override val mainUrl = "https://vidmoly.me"
@ -26,15 +28,25 @@ open class Vidmoly : ExtractorApi() {
callback: (ExtractorLink) -> Unit
) {
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"
)
val script = app.get(
url,
headers = headers,
referer = referer,
).document.select("script")
.find { it.data().contains("sources:") }?.data()
val newUrl = if(url.contains("/w/"))
url.replaceFirst("/w/", "/embed-")+"-920x360.html"
else url
var script: String? = null;
var attemps = 0
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: [")
?.substringBefore("],")?.addMarks("file")
val subData = script?.substringAfter("tracks: [")?.substringBefore("]")?.addMarks("file")

View File

@ -283,6 +283,8 @@ import com.lagradost.cloudstream3.extractors.Lulustream3
import com.lagradost.cloudstream3.extractors.Vidguardto3
import com.lagradost.cloudstream3.extractors.Ds2play
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.normalSafeApiCall
import kotlinx.coroutines.delay
@ -911,6 +913,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
Jeniusplay(),
StreamoUpload(),
GamoVideo(),
Gdriveplayerapi(),
Gdriveplayerapp(),
Gdriveplayerfun(),
@ -964,6 +967,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
CdnwishCom(),
FlaswishCom(),
SfastwishCom(),
Playerwish(),
EmturbovidExtractor(),
Vtbe(),
EPlayExtractor(),