sora: disabled mMovies

This commit is contained in:
alex 2024-01-21 19:39:02 +07:00
parent ec7b24052b
commit d80ec53b09
15 changed files with 84 additions and 54 deletions

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 = 30 version = 31
android { android {
defaultConfig { defaultConfig {

View File

@ -10,7 +10,7 @@ import org.jsoup.nodes.Element
import java.net.URI import java.net.URI
open class Gomov : MainAPI() { open class Gomov : MainAPI() {
override var mainUrl = "https://gomov.bio" override var mainUrl = "https://gomov.co"
private var directUrl: String? = null private var directUrl: String? = null
override var name = "Gomov" override var name = "Gomov"
override val hasMainPage = true override val hasMainPage = true

View File

@ -3,7 +3,7 @@ package com.hexated
import com.lagradost.cloudstream3.mainPageOf import com.lagradost.cloudstream3.mainPageOf
class Ngefilm : Gomov() { class Ngefilm : Gomov() {
override var mainUrl = "https://tv3.ngefilm21.homes" override var mainUrl = "https://tv4.ngefilm21.homes"
override var name = "Ngefilm" override var name = "Ngefilm"
override val mainPage = mainPageOf( override val mainPage = mainPageOf(
"/page/%d/?s&search=advanced&post_type=movie&index&orderby&genre&movieyear&country&quality=" to "Movies Terbaru", "/page/%d/?s&search=advanced&post_type=movie&index&orderby&genre&movieyear&country&quality=" to "Movies Terbaru",

View File

@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.TvSeriesLoadResponse
import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.*
class Pusatfilm : Gomov() { class Pusatfilm : Gomov() {
override var mainUrl = "https://pusatfilm21.vip" override var mainUrl = "https://pf21.vip"
override var name = "Pusatfilm" override var name = "Pusatfilm"
override val mainPage = mainPageOf( override val mainPage = mainPageOf(
"film-terbaru/page/%d/" to "Film Terbaru", "film-terbaru/page/%d/" to "Film Terbaru",

View File

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

View File

@ -8,8 +8,8 @@ import com.lagradost.cloudstream3.utils.*
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
class LayarKacaProvider : MainAPI() { class LayarKacaProvider : MainAPI() {
override var mainUrl = "https://tv7.lk21official.wiki" override var mainUrl = "https://tv10.lk21official.wiki"
private var seriesUrl = "https://tv9.nontondrama.click" private var seriesUrl = "https://tv11.nontondrama.click"
override var name = "LayarKaca" override var name = "LayarKaca"
override val hasMainPage = true override val hasMainPage = true
override var lang = "id" override var lang = "id"

View File

@ -27,10 +27,7 @@ open class Qiwi : ExtractorApi() {
"$mainUrl/", "$mainUrl/",
getIndexQuality(title), getIndexQuality(title),
headers = mapOf( headers = mapOf(
"Accept" to "video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5",
"Range" to "bytes=0-", "Range" to "bytes=0-",
"Sec-Fetch-Dest" to "video",
"Sec-Fetch-Mode" to "no-cors",
) )
) )
) )
@ -42,39 +39,4 @@ open class Qiwi : ExtractorApi() {
?: Qualities.Unknown.value ?: Qualities.Unknown.value
} }
}
open class Mediafire : ExtractorApi() {
override val name = "Mediafire"
override val mainUrl = "https://www.mediafire.com"
override val requiresReferer = true
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val res = app.get(url, referer = referer).document
val title = res.select("div.dl-btn-label").text()
val video = res.selectFirst("a#downloadButton")?.attr("href")
callback.invoke(
ExtractorLink(
this.name,
this.name,
video ?: return,
"",
getQuality(title),
INFER_TYPE
)
)
}
private fun getQuality(str: String?): Int {
return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull()
?: Qualities.Unknown.value
}
} }

View File

@ -11,6 +11,5 @@ class OploverzProviderPlugin: Plugin() {
// All providers should be added in this manner. Please don't edit the providers list directly. // All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(OploverzProvider()) registerMainAPI(OploverzProvider())
registerExtractorAPI(Qiwi()) registerExtractorAPI(Qiwi())
registerExtractorAPI(Mediafire())
} }
} }

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 = 218 version = 219
android { android {
defaultConfig { defaultConfig {

View File

@ -1821,6 +1821,51 @@ object SoraExtractor : SoraStream() {
} }
suspend fun invokeMoflix(
tmdbId: Int? = null,
season: Int? = null,
episode: Int? = null,
callback: (ExtractorLink) -> Unit
) {
val id = (if(season == null) {
"tmdb|movie|$tmdbId"
} else {
"tmdb|series|$tmdbId"
}).let { base64Encode(it.toByteArray()) }
val loaderUrl = "$moflixAPI/api/v1/titles/$id?loader=titlePage"
val url = if(season == null) {
loaderUrl
} else {
val mediaId = app.get(loaderUrl, referer = "$moflixAPI/").parsedSafe<MoflixResponse>()?.title?.id
"$moflixAPI/api/v1/titles/$mediaId/seasons/$season/episodes/$episode?loader=episodePage"
}
val res = app.get(url, referer = "$moflixAPI/").parsedSafe<MoflixResponse>()
(res?.episode ?: res?.title)?.videos?.filter { it.category.equals("full", true) }?.apmap { iframe ->
val response = app.get(iframe.src ?: return@apmap, referer = "$moflixAPI/")
val host = getBaseUrl(iframe.src)
val doc = response.document.selectFirst("script:containsData(sources:)")?.data()
val script = if (doc.isNullOrEmpty()) {
getAndUnpack(response.text)
} else {
doc
}
val m3u8 = Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return@apmap)?.groupValues?.getOrNull(1)
callback.invoke(
ExtractorLink(
"Moflix",
"Moflix [${iframe.name}]",
m3u8 ?: return@apmap,
"$host/",
iframe.quality?.filter { it.isDigit() }?.toIntOrNull() ?: Qualities.Unknown.value,
INFER_TYPE
)
)
}
}
//TODO only subs //TODO only subs
suspend fun invokeWatchsomuch( suspend fun invokeWatchsomuch(
imdbId: String? = null, imdbId: String? = null,

View File

@ -47,6 +47,23 @@ data class AniwaveServer(
} }
} }
data class MoflixResponse(
@JsonProperty("title") val title: Episode? = null,
@JsonProperty("episode") val episode: Episode? = null,
) {
data class Episode(
@JsonProperty("id") val id: Int? = null,
@JsonProperty("videos") val videos: ArrayList<Videos>? = arrayListOf(),
) {
data class Videos(
@JsonProperty("name") val name: String? = null,
@JsonProperty("category") val category: String? = null,
@JsonProperty("src") val src: String? = null,
@JsonProperty("quality") val quality: String? = null,
)
}
}
data class AniMedia( data class AniMedia(
@JsonProperty("id") var id: Int? = null, @JsonProperty("id") var id: Int? = null,
@JsonProperty("idMal") var idMal: Int? = null @JsonProperty("idMal") var idMal: Int? = null

View File

@ -44,6 +44,7 @@ import com.hexated.SoraExtractor.invokeVegamovies
import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeVidsrcto
import com.hexated.SoraExtractor.invokeCinemaTv import com.hexated.SoraExtractor.invokeCinemaTv
import com.hexated.SoraExtractor.invokeMMovies import com.hexated.SoraExtractor.invokeMMovies
import com.hexated.SoraExtractor.invokeMoflix
import com.hexated.SoraExtractor.invokeOmovies import com.hexated.SoraExtractor.invokeOmovies
import com.hexated.SoraExtractor.invokeWatchCartoon import com.hexated.SoraExtractor.invokeWatchCartoon
import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeWatchsomuch
@ -119,6 +120,7 @@ open class SoraStream : TmdbProvider() {
const val aoneroomAPI = "https://api3.aoneroom.com" const val aoneroomAPI = "https://api3.aoneroom.com"
const val mMoviesAPI = "https://multimovies.uno" const val mMoviesAPI = "https://multimovies.uno"
const val watchCartoonAPI = "https://www1.watchcartoononline.bz" const val watchCartoonAPI = "https://www1.watchcartoononline.bz"
const val moflixAPI = "https://moflix-stream.xyz"
const val fdMoviesAPI = "https://freedrivemovie.com" const val fdMoviesAPI = "https://freedrivemovie.com"
const val uhdmoviesAPI = "https://uhdmovies.zip" const val uhdmoviesAPI = "https://uhdmovies.zip"
@ -721,8 +723,11 @@ open class SoraStream : TmdbProvider() {
?: res.year, res.season, res.episode, callback ?: res.year, res.season, res.episode, callback
) )
}, },
// {
// invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback)
// },
{ {
invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback) invokeMoflix(res.id, res.season, res.episode, callback)
}, },
) )

View File

@ -30,6 +30,7 @@ import com.hexated.SoraExtractor.invokeVidSrc
import com.hexated.SoraExtractor.invokeVidsrcto import com.hexated.SoraExtractor.invokeVidsrcto
import com.hexated.SoraExtractor.invokeCinemaTv import com.hexated.SoraExtractor.invokeCinemaTv
import com.hexated.SoraExtractor.invokeMMovies import com.hexated.SoraExtractor.invokeMMovies
import com.hexated.SoraExtractor.invokeMoflix
import com.hexated.SoraExtractor.invokeOmovies import com.hexated.SoraExtractor.invokeOmovies
import com.hexated.SoraExtractor.invokeWatchCartoon import com.hexated.SoraExtractor.invokeWatchCartoon
import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeWatchsomuch
@ -52,6 +53,9 @@ class SoraStreamLite : SoraStream() {
val res = AppUtils.parseJson<LinkData>(data) val res = AppUtils.parseJson<LinkData>(data)
argamap( argamap(
{
invokeMoflix(res.id, res.season, res.episode, callback)
},
{ {
if (!res.isAnime) invokeWatchsomuch( if (!res.isAnime) invokeWatchsomuch(
res.imdbId, res.imdbId,
@ -328,9 +332,9 @@ class SoraStreamLite : SoraStream() {
?: res.year, res.season, res.episode, callback ?: res.year, res.season, res.episode, callback
) )
}, },
{ // {
invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback) // invokeMMovies(res.title, res.season, res.episode, subtitleCallback, callback)
}, // },
) )
return true return true

View File

@ -623,7 +623,6 @@ open class Superstream : MainAPI() {
} }
} }
private data class LinkData( private data class LinkData(
val id: Int, val id: Int,
val type: Int, val type: Int,
@ -633,7 +632,6 @@ open class Superstream : MainAPI() {
val imdbId: String?, val imdbId: String?,
) )
data class LinkDataProp( data class LinkDataProp(
@JsonProperty("code") val code: Int? = null, @JsonProperty("code") val code: Int? = null,
@JsonProperty("msg") val msg: String? = null, @JsonProperty("msg") val msg: String? = null,

View File

@ -77,7 +77,7 @@ subprojects {
// https://github.com/recloudstream/cloudstream/blob/master/app/build.gradle // https://github.com/recloudstream/cloudstream/blob/master/app/build.gradle
implementation(kotlin("stdlib")) // adds standard kotlin features, like listOf, mapOf etc implementation(kotlin("stdlib")) // adds standard kotlin features, like listOf, mapOf etc
implementation("com.github.Blatzar:NiceHttp:0.4.4") // http library implementation("com.github.Blatzar:NiceHttp:0.4.5") // http library
implementation("org.jsoup:jsoup:1.17.2") // html parser implementation("org.jsoup:jsoup:1.17.2") // html parser
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.16.1") implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.16.1")
implementation("io.karn:khttp-android:0.1.2") implementation("io.karn:khttp-android:0.1.2")