This commit is contained in:
jack 2023-11-09 04:34:56 +07:00
parent 95661f55c9
commit 3f66b6f0fa
14 changed files with 54 additions and 83 deletions

View File

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 4 version = 5
cloudstream { cloudstream {

View File

@ -9,7 +9,7 @@ import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
class Animasu : MainAPI() { class Animasu : MainAPI() {
override var mainUrl = "https://animasu.info" override var mainUrl = "https://animasu.win"
override var name = "Animasu" override var name = "Animasu"
override val hasMainPage = true override val hasMainPage = true
override var lang = "id" override var lang = "id"

View File

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties import org.jetbrains.kotlin.konan.properties.Properties
// use an integer for version numbers // use an integer for version numbers
version = 26 version = 27
android { android {
defaultConfig { defaultConfig {

View File

@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.utils.httpsify
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class DutaMovie : Gomov() { class DutaMovie : Gomov() {
override var mainUrl = "https://stream.dutamovie21.club" override var mainUrl = "https://movie.dutamovie21.club"
override var name = "DutaMovie" override var name = "DutaMovie"
override val mainPage = mainPageOf( override val mainPage = mainPageOf(
"category/box-office/page/%d/" to "Box Office", "category/box-office/page/%d/" to "Box Office",

View File

@ -105,7 +105,16 @@ object NineTv {
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
) { ) {
val mainUrl = getBaseUrl(url) val mainUrl = getBaseUrl(url)
val res = app.get(url, referer = referer) val res = app.get(url, headers = mapOf(
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"Accept-Language" to "en-US,en;q=0.5",
"Connection" to "keep-alive",
"Referer" to (referer ?: ""),
"Sec-Fetch-Dest" to "iframe",
"Sec-Fetch-Mode" to "navigate",
"Sec-Fetch-Site" to "same-origin",
"Upgrade-Insecure-Requests" to "1"
))
val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1) val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1)
val key = res.document.getKeys() ?: throw ErrorLoadingException("can't generate key") val key = res.document.getKeys() ?: throw ErrorLoadingException("can't generate key")
val decrypt = AesHelper.cryptoAESHandler(master ?: return, key.toByteArray(), false) val decrypt = AesHelper.cryptoAESHandler(master ?: return, key.toByteArray(), false)
@ -148,7 +157,7 @@ object NineTv {
return """,\s*'([^']+)""".toRegex().find(run)?.groupValues?.getOrNull(1) return """,\s*'([^']+)""".toRegex().find(run)?.groupValues?.getOrNull(1)
} }
fun String.runJS(variable: String): String { private fun String.runJS(variable: String): String {
val rhino = Context.enter() val rhino = Context.enter()
rhino.optimizationLevel = -1 rhino.optimizationLevel = -1
val scope: Scriptable = rhino.initSafeStandardObjects() val scope: Scriptable = rhino.initSafeStandardObjects()

View File

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 16 version = 17
cloudstream { cloudstream {

View File

@ -14,7 +14,7 @@ import org.jsoup.Jsoup
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
class Samehadaku : MainAPI() { class Samehadaku : MainAPI() {
override var mainUrl = "https://samehadaku.help" override var mainUrl = "https://samehadaku.rent"
override var name = "Samehadaku" override var name = "Samehadaku"
override val hasMainPage = true override val hasMainPage = true
override var lang = "id" override var lang = "id"

View File

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties import org.jetbrains.kotlin.konan.properties.Properties
// use an integer for version numbers // use an integer for version numbers
version = 191 version = 192
android { android {
defaultConfig { defaultConfig {

View File

@ -247,7 +247,16 @@ object NineTv {
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
) { ) {
val mainUrl = getBaseUrl(url) val mainUrl = getBaseUrl(url)
val res = app.get(url, referer = referer) val res = app.get(url, headers = mapOf(
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
"Accept-Language" to "en-US,en;q=0.5",
"Connection" to "keep-alive",
"Referer" to (referer ?: ""),
"Sec-Fetch-Dest" to "iframe",
"Sec-Fetch-Mode" to "navigate",
"Sec-Fetch-Site" to "same-origin",
"Upgrade-Insecure-Requests" to "1"
))
val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1) val master = Regex("\\s*=\\s*'([^']+)").find(res.text)?.groupValues?.get(1)
val key = res.document.getKeys() ?: throw ErrorLoadingException("can't generate key") val key = res.document.getKeys() ?: throw ErrorLoadingException("can't generate key")
val decrypt = AesHelper.cryptoAESHandler(master ?: return, key.toByteArray(), false) val decrypt = AesHelper.cryptoAESHandler(master ?: return, key.toByteArray(), false)

View File

@ -996,34 +996,13 @@ object SoraExtractor : SoraStream() {
} }
}.filter { it.second?.contains(Regex("(https:)|(http:)")) == true } }.filter { it.second?.contains(Regex("(https:)|(http:)")) == true }
// val sources = mutableListOf<Pair<String, String?>>()
// if (iframeList.any {
// it.first.contains(
// "2160p",
// true
// )
// }) {
// sources.addAll(iframeList.filter {
// it.first.contains(
// "2160p",
// true
// )
// })
// sources.add(iframeList.first {
// it.first.contains(
// "1080p",
// true
// )
// })
// } else {
// sources.addAll(iframeList.filter { it.first.contains("1080p", true) })
// }
iframeList.apmap { (quality, link) -> iframeList.apmap { (quality, link) ->
val driveLink = val driveLink =
if (link?.contains("driveleech") == true) bypassDriveleech(link) else bypassTechmny( when {
link ?: return@apmap link?.contains("oddfirm") == true -> bypassHrefli(link)
) link?.contains("driveleech") == true -> bypassDriveleech(link)
else -> bypassTechmny(link ?: return@apmap)
}
val base = getBaseUrl(driveLink ?: return@apmap) val base = getBaseUrl(driveLink ?: return@apmap)
val driveReq = app.get(driveLink) val driveReq = app.get(driveLink)
val driveRes = driveReq.document val driveRes = driveReq.document
@ -1661,28 +1640,25 @@ object SoraExtractor : SoraStream() {
} }
suspend fun invokeSmashyStream( suspend fun invokeSmashyStream(
imdbId: String? = null, tmdbId: Int? = null,
season: Int? = null, season: Int? = null,
episode: Int? = null, episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit, subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit, callback: (ExtractorLink) -> Unit,
) { ) {
val url = if (season == null) { val url = if (season == null) {
"$smashyStreamAPI/playere.php?imdb=$imdbId" "$smashyStreamAPI/playere.php?tmdb=$tmdbId"
} else { } else {
"$smashyStreamAPI/playere.php?imdb=$imdbId&season=$season&episode=$episode" "$smashyStreamAPI/playere.php?tmdb=$tmdbId&season=$season&episode=$episode"
} }
app.get( app.get(
url, referer = "https://smashystream.com/" url, referer = "https://smashystream.xyz/"
).document.select("div#_default-servers a.server").map { ).document.select("div#_default-servers a.server").map {
it.attr("data-id") to it.text() it.attr("data-id") to it.text()
}.apmap { }.apmap {
when { when {
it.second.equals("Player FM", true) -> invokeSmashyFm( it.second.contains(Regex("(Player F|Player FM)\$")) -> {
it.second, it.first, url, callback
)
it.second.contains(Regex("(Player F|Player SE|Player N|Player D)")) -> {
invokeSmashyFfix(it.second, it.first, url, callback) invokeSmashyFfix(it.second, it.first, url, callback)
} }
else -> return@apmap else -> return@apmap

View File

@ -415,4 +415,9 @@ data class RidoResponses(
data class RidoSearch( data class RidoSearch(
@JsonProperty("data") var data: RidoData? = null, @JsonProperty("data") var data: RidoData? = null,
)
data class SmashySources(
@JsonProperty("sourceUrls") var sourceUrls: ArrayList<String>? = arrayListOf(),
@JsonProperty("subtitleUrls") var subtitleUrls: String? = null,
) )

View File

@ -103,7 +103,7 @@ open class SoraStream : TmdbProvider() {
const val smashyStreamAPI = "https://embed.smashystream.com" const val smashyStreamAPI = "https://embed.smashystream.com"
const val watchSomuchAPI = "https://watchsomuch.tv" // sub only const val watchSomuchAPI = "https://watchsomuch.tv" // sub only
const val watchOnlineAPI = "https://lookmovie.foundation" const val watchOnlineAPI = "https://lookmovie.foundation"
const val nineTvAPI = "https://ww1.moviesapi.club" const val nineTvAPI = "https://moviesapi.club"
const val nowTvAPI = "https://myfilestorage.xyz" const val nowTvAPI = "https://myfilestorage.xyz"
const val gokuAPI = "https://goku.sx" const val gokuAPI = "https://goku.sx"
const val ridomoviesAPI = "https://ridomovies.pw" const val ridomoviesAPI = "https://ridomovies.pw"
@ -118,7 +118,7 @@ open class SoraStream : TmdbProvider() {
const val animetoshoAPI = "https://animetosho.org" const val animetoshoAPI = "https://animetosho.org"
const val movies123API = "https://new-movies123.link" const val movies123API = "https://new-movies123.link"
const val jump1API = "https://ca.jump1.net" const val jump1API = "https://ca.jump1.net"
const val vegaMoviesAPI = "https://vegamovies.zip" const val vegaMoviesAPI = "https://vegamovies.care"
const val hdmovies4uAPI = "https://hdmovies4u.name" const val hdmovies4uAPI = "https://hdmovies4u.name"
const val watchflxAPI = "https://watchflx.tv" const val watchflxAPI = "https://watchflx.tv"
const val gomoviesAPI = "https://gomovies-online.cam" const val gomoviesAPI = "https://gomovies-online.cam"
@ -532,7 +532,7 @@ open class SoraStream : TmdbProvider() {
}, },
{ {
if (!res.isAnime) invokeSmashyStream( if (!res.isAnime) invokeSmashyStream(
res.imdbId, res.id,
res.season, res.season,
res.episode, res.episode,
subtitleCallback, subtitleCallback,

View File

@ -150,7 +150,7 @@ class SoraStreamLite : SoraStream() {
}, },
{ {
if (!res.isAnime) invokeSmashyStream( if (!res.isAnime) invokeSmashyStream(
res.imdbId, res.id,
res.season, res.season,
res.episode, res.episode,
subtitleCallback, subtitleCallback,

View File

@ -445,51 +445,23 @@ suspend fun invokeSmashyFfix(
ref: String, ref: String,
callback: (ExtractorLink) -> Unit, callback: (ExtractorLink) -> Unit,
) { ) {
val res = app.get(url, referer = ref).text val json = app.get(url, referer = ref, headers = mapOf("X-Requested-With" to "XMLHttpRequest"))
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return .parsedSafe<SmashySources>()
json?.sourceUrls?.map {
source.split(",").map { links ->
val quality = Regex("\\[(\\S+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
val link = links.removePrefix("[$quality]").trim()
callback.invoke( callback.invoke(
ExtractorLink( ExtractorLink(
"Smashy [$name]", "Smashy [$name]",
"Smashy [$name]", "Smashy [$name]",
decode(link).replace("\\/", "/"), it,
smashyStreamAPI, if(name == "Player FM") "https://vidplay.site/" else "",
getQualityFromName(quality), Qualities.P1080.value,
INFER_TYPE, INFER_TYPE
) )
) )
} }
} }
suspend fun invokeSmashyFm(
name: String,
url: String,
ref: String,
callback: (ExtractorLink) -> Unit,
) {
fun String.removeProxy(): String {
return if (this.contains("proxy")) {
"https${this.substringAfterLast("https")}"
} else {
this
}
}
val res = app.get(url, referer = ref).text
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
M3u8Helper.generateM3u8(
"Smashy [$name]",
source.removeProxy(),
"https://vidplay.site/"
).forEach(callback)
}
suspend fun getDumpIdAndType(title: String?, year: Int?, season: Int?): Pair<String?, Int?> { suspend fun getDumpIdAndType(title: String?, year: Int?, season: Int?): Pair<String?, Int?> {
val res = tryParseJson<DumpQuickSearchData>( val res = tryParseJson<DumpQuickSearchData>(
queryApi( queryApi(