sora: added Netmovies

This commit is contained in:
sora 2023-07-27 21:38:45 +07:00
parent 4f4d9f63de
commit 332ccf5c6f
4 changed files with 136 additions and 45 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 = 148 version = 149
android { android {
defaultConfig { defaultConfig {

View file

@ -416,27 +416,7 @@ object SoraExtractor : SoraStream() {
} else { } else {
"$idlixAPI/episode/$fixTitle-season-$season-episode-$episode" "$idlixAPI/episode/$fixTitle-season-$season-episode-$episode"
} }
invokeWpmovies(url,subtitleCallback, callback)
val res = app.get(url)
if (!res.isSuccessful) return
val referer = getBaseUrl(res.url)
val document = res.document
val id = document.select("meta#dooplay-ajax-counter").attr("data-postid")
val type = if (url.contains("/movie/")) "movie" else "tv"
document.select("ul#playeroptionsul > li").map {
it.attr("data-nume")
}.apmap { nume ->
val source = app.post(
url = "$referer/wp-admin/admin-ajax.php", data = mapOf(
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), referer = url
).parsed<ResponseHash>().embed_url
if (!source.contains("youtube")) {
loadExtractor(source, "$referer/", subtitleCallback, callback)
}
}
} }
suspend fun invokeMultimovies( suspend fun invokeMultimovies(
@ -452,22 +432,47 @@ object SoraExtractor : SoraStream() {
} else { } else {
"$multimoviesAPI/episodes/$fixTitle-${season}x${episode}" "$multimoviesAPI/episodes/$fixTitle-${season}x${episode}"
} }
invokeWpmovies(url,subtitleCallback, callback,true)
}
val res = app.get(url) suspend fun invokeNetmovies(
title: String? = null,
year: Int? = null,
season: Int? = null,
episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val fixTitle = title.createSlug()
val url = if (season == null) {
"$netmoviesAPI/movies/$fixTitle-$year"
} else {
"$netmoviesAPI/episodes/$fixTitle-${season}x${episode}"
}
invokeWpmovies(url,subtitleCallback, callback)
}
private suspend fun invokeWpmovies(
url: String? = null,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit,
fixIframe: Boolean = false,
) {
val res = app.get(url ?: return)
val referer = getBaseUrl(res.url) val referer = getBaseUrl(res.url)
val document = res.document val document = res.document
val id = document.select("meta#dooplay-ajax-counter").attr("data-postid")
val type = if (url.contains("/movies/")) "movie" else "tv"
document.select("ul#playeroptionsul > li").map { document.select("ul#playeroptionsul > li").map {
it.attr("data-nume") Triple(
}.apmap { nume -> it.attr("data-post"),
it.attr("data-nume"),
it.attr("data-type")
)
}.apmap { (id, nume, type) ->
val source = app.post( val source = app.post(
url = "$referer/wp-admin/admin-ajax.php", data = mapOf( url = "$referer/wp-admin/admin-ajax.php", data = mapOf(
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type "action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), referer = url ), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), referer = url
).parsed<ResponseHash>().embed_url.let { Jsoup.parse(it).select("IFRAME").attr("SRC") } ).parsed<ResponseHash>().embed_url.let { if(fixIframe) Jsoup.parse(it).select("IFRAME").attr("SRC") else it }
if (!source.contains("youtube")) { if (!source.contains("youtube")) {
loadExtractor(source, "$referer/", subtitleCallback, callback) loadExtractor(source, "$referer/", subtitleCallback, callback)
} }

View file

@ -51,6 +51,7 @@ import com.hexated.SoraExtractor.invokeDumpStream
import com.hexated.SoraExtractor.invokeEmovies import com.hexated.SoraExtractor.invokeEmovies
import com.hexated.SoraExtractor.invokeFourCartoon import com.hexated.SoraExtractor.invokeFourCartoon
import com.hexated.SoraExtractor.invokeMultimovies import com.hexated.SoraExtractor.invokeMultimovies
import com.hexated.SoraExtractor.invokeNetmovies
import com.hexated.SoraExtractor.invokePobmovies import com.hexated.SoraExtractor.invokePobmovies
import com.hexated.SoraExtractor.invokeTvMovies import com.hexated.SoraExtractor.invokeTvMovies
import com.hexated.SoraExtractor.invokeUhdmovies import com.hexated.SoraExtractor.invokeUhdmovies
@ -117,7 +118,8 @@ open class SoraStream : TmdbProvider() {
const val movie123NetAPI = "https://ww8.0123movie.net" const val movie123NetAPI = "https://ww8.0123movie.net"
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
val gomoviesAPI = base64DecodeAPI("bQ==Y28=ZS4=aW4=bmw=LW8=ZXM=dmk=bW8=Z28=Ly8=czo=dHA=aHQ=") val gomoviesAPI =
base64DecodeAPI("bQ==Y28=ZS4=aW4=bmw=LW8=ZXM=dmk=bW8=Z28=Ly8=czo=dHA=aHQ=")
const val ask4MoviesAPI = "https://ask4movie.nl" const val ask4MoviesAPI = "https://ask4movie.nl"
const val biliBiliAPI = "https://api-vn.otakuz.live/server" const val biliBiliAPI = "https://api-vn.otakuz.live/server"
const val watchOnlineAPI = "https://watchonline.ag" const val watchOnlineAPI = "https://watchonline.ag"
@ -132,6 +134,7 @@ open class SoraStream : TmdbProvider() {
const val pobmoviesAPI = "https://pobmovies.cam" const val pobmoviesAPI = "https://pobmovies.cam"
const val fourCartoonAPI = "https://4cartoon.net" const val fourCartoonAPI = "https://4cartoon.net"
const val multimoviesAPI = "https://multimovies.xyz" const val multimoviesAPI = "https://multimovies.xyz"
const val netmoviesAPI = "https://netmovies.to"
// INDEX SITE // INDEX SITE
const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:" const val blackMoviesAPI = "https://dl.blacklistedbois.workers.dev/0:"
@ -268,7 +271,8 @@ open class SoraStream : TmdbProvider() {
val year = releaseDate?.split("-")?.first()?.toIntOrNull() val year = releaseDate?.split("-")?.first()?.toIntOrNull()
val rating = res.vote_average.toString().toRatingInt() val rating = res.vote_average.toString().toRatingInt()
val genres = res.genres?.mapNotNull { it.name } val genres = res.genres?.mapNotNull { it.name }
val isAnime = genres?.contains("Animation") == true && (res.original_language == "zh" || res.original_language == "ja") val isAnime =
genres?.contains("Animation") == true && (res.original_language == "zh" || res.original_language == "ja")
val keywords = res.keywords?.results?.mapNotNull { it.name }.orEmpty() val keywords = res.keywords?.results?.mapNotNull { it.name }.orEmpty()
.ifEmpty { res.keywords?.keywords?.mapNotNull { it.name } } .ifEmpty { res.keywords?.keywords?.mapNotNull { it.name } }
@ -310,7 +314,7 @@ open class SoraStream : TmdbProvider() {
date = season.airDate, date = season.airDate,
airedDate = res.releaseDate ?: res.firstAirDate, airedDate = res.releaseDate ?: res.firstAirDate,
).toJson(), ).toJson(),
name = eps.name + if(isUpcoming(eps.airDate)) " - [UPCOMING]" else "", name = eps.name + if (isUpcoming(eps.airDate)) " - [UPCOMING]" else "",
season = eps.seasonNumber, season = eps.seasonNumber,
episode = eps.episodeNumber, episode = eps.episodeNumber,
posterUrl = getImageUrl(eps.stillPath), posterUrl = getImageUrl(eps.stillPath),
@ -396,7 +400,15 @@ open class SoraStream : TmdbProvider() {
) )
}, },
{ {
invokeGoku(res.title, res.year, res.season, res.lastSeason, res.episode, subtitleCallback, callback) invokeGoku(
res.title,
res.year,
res.season,
res.lastSeason,
res.episode,
subtitleCallback,
callback
)
}, },
{ {
invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback) invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
@ -499,7 +511,13 @@ open class SoraStream : TmdbProvider() {
) )
}, },
{ {
if(!res.isAnime) invokeKimcartoon(res.title, res.season, res.episode, subtitleCallback, callback) if (!res.isAnime) invokeKimcartoon(
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
}, },
// { // {
// invokeXmovies( // invokeXmovies(
@ -522,7 +540,15 @@ open class SoraStream : TmdbProvider() {
) )
}, },
{ {
invokeKisskh(res.title, res.season, res.episode, res.isAnime, res.lastSeason, subtitleCallback, callback) invokeKisskh(
res.title,
res.season,
res.episode,
res.isAnime,
res.lastSeason,
subtitleCallback,
callback
)
}, },
{ {
invokeLing( invokeLing(
@ -810,16 +836,43 @@ open class SoraStream : TmdbProvider() {
invokeNavy(res.imdbId, res.season, res.episode, callback) invokeNavy(res.imdbId, res.season, res.episode, callback)
}, },
{ {
if (!res.isAnime) invokeEmovies(res.title, res.year, res.season, res.episode, subtitleCallback, callback) if (!res.isAnime) invokeEmovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
}, },
{ {
if(!res.isAnime && res.season == null) invokePobmovies(res.title, res.year, callback) if (!res.isAnime && res.season == null) invokePobmovies(
res.title,
res.year,
callback
)
}, },
{ {
if(!res.isAnime) invokeFourCartoon(res.title, res.year, res.season, res.episode, callback) if (!res.isAnime) invokeFourCartoon(
res.title,
res.year,
res.season,
res.episode,
callback
)
}, },
{ {
invokeMultimovies(res.title,res.season,res.episode,subtitleCallback,callback) invokeMultimovies(res.title, res.season, res.episode, subtitleCallback, callback)
},
{
invokeNetmovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
} }
) )

View file

@ -30,6 +30,7 @@ import com.hexated.SoraExtractor.invokeDumpStream
import com.hexated.SoraExtractor.invokeEmovies import com.hexated.SoraExtractor.invokeEmovies
import com.hexated.SoraExtractor.invokeFourCartoon import com.hexated.SoraExtractor.invokeFourCartoon
import com.hexated.SoraExtractor.invokeMultimovies import com.hexated.SoraExtractor.invokeMultimovies
import com.hexated.SoraExtractor.invokeNetmovies
import com.hexated.SoraExtractor.invokeVidSrc import com.hexated.SoraExtractor.invokeVidSrc
import com.hexated.SoraExtractor.invokeWatchOnline import com.hexated.SoraExtractor.invokeWatchOnline
import com.hexated.SoraExtractor.invokeWatchsomuch import com.hexated.SoraExtractor.invokeWatchsomuch
@ -89,7 +90,15 @@ class SoraStreamLite : SoraStream() {
) )
}, },
{ {
invokeGoku(res.title, res.year, res.season, res.lastSeason, res.episode, subtitleCallback, callback) invokeGoku(
res.title,
res.year,
res.season,
res.lastSeason,
res.episode,
subtitleCallback,
callback
)
}, },
{ {
invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback) invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
@ -189,7 +198,13 @@ class SoraStreamLite : SoraStream() {
) )
}, },
{ {
if(!res.isAnime) invokeKimcartoon(res.title, res.season, res.episode, subtitleCallback, callback) if (!res.isAnime) invokeKimcartoon(
res.title,
res.season,
res.episode,
subtitleCallback,
callback
)
}, },
{ {
invokeSmashyStream( invokeSmashyStream(
@ -222,7 +237,15 @@ class SoraStreamLite : SoraStream() {
) )
}, },
{ {
invokeKisskh(res.title, res.season, res.episode, res.isAnime, res.lastSeason, subtitleCallback, callback) invokeKisskh(
res.title,
res.season,
res.episode,
res.isAnime,
res.lastSeason,
subtitleCallback,
callback
)
}, },
{ {
invokeLing( invokeLing(
@ -302,7 +325,7 @@ class SoraStreamLite : SoraStream() {
) )
}, },
{ {
if(!res.isAnime) invokeFourCartoon( if (!res.isAnime) invokeFourCartoon(
res.title, res.title,
res.year, res.year,
res.season, res.season,
@ -311,7 +334,17 @@ class SoraStreamLite : SoraStream() {
) )
}, },
{ {
invokeMultimovies(res.title,res.season,res.episode,subtitleCallback,callback) invokeMultimovies(res.title, res.season, res.episode, subtitleCallback, callback)
},
{
invokeNetmovies(
res.title,
res.year,
res.season,
res.episode,
subtitleCallback,
callback
)
} }
) )