mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fixed some sources
This commit is contained in:
parent
c26af343ac
commit
9e4f65c2b6
7 changed files with 73 additions and 47 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -55,6 +55,7 @@ jobs:
|
|||
ANICHI_ENDPOINT: ${{ secrets.ANICHI_ENDPOINT }}
|
||||
ANICHI_APP: ${{ secrets.ANICHI_APP }}
|
||||
PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }}
|
||||
ZSHOW_API: ${{ secrets.ZSHOW_API }}
|
||||
run: |
|
||||
cd $GITHUB_WORKSPACE/src
|
||||
echo SORA_API=$SORA_API >> local.properties
|
||||
|
@ -70,6 +71,7 @@ jobs:
|
|||
echo ANICHI_ENDPOINT=$ANICHI_ENDPOINT >> local.properties
|
||||
echo ANICHI_APP=$ANICHI_APP >> local.properties
|
||||
echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> local.properties
|
||||
echo ZSHOW_API=$ZSHOW_API >> local.properties
|
||||
|
||||
- name: Build Plugins
|
||||
run: |
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
import org.jetbrains.kotlin.konan.properties.Properties
|
||||
|
||||
// use an integer for version numbers
|
||||
version = 170
|
||||
version = 171
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
val properties = Properties()
|
||||
properties.load(project.rootProject.file("local.properties").inputStream())
|
||||
|
||||
buildConfigField("String", "ZSHOW_API", "\"${properties.getProperty("ZSHOW_API")}\"")
|
||||
buildConfigField("String", "SORA_API", "\"${properties.getProperty("SORA_API")}\"")
|
||||
buildConfigField("String", "SORAHE", "\"${properties.getProperty("SORAHE")}\"")
|
||||
buildConfigField("String", "SORAXA", "\"${properties.getProperty("SORAXA")}\"")
|
||||
|
|
|
@ -258,23 +258,6 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
}
|
||||
|
||||
suspend fun invokeIdlix(
|
||||
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) {
|
||||
"$idlixAPI/movie/$fixTitle-$year"
|
||||
} else {
|
||||
"$idlixAPI/episode/$fixTitle-season-$season-episode-$episode"
|
||||
}
|
||||
invokeWpmovies(url, subtitleCallback, callback, encrypt = true)
|
||||
}
|
||||
|
||||
suspend fun invokeMultimovies(
|
||||
title: String? = null,
|
||||
season: Int? = null,
|
||||
|
@ -288,7 +271,7 @@ object SoraExtractor : SoraStream() {
|
|||
} else {
|
||||
"$multimoviesAPI/episodes/$fixTitle-${season}x${episode}"
|
||||
}
|
||||
invokeWpmovies(url, subtitleCallback, callback, true)
|
||||
invokeWpmovies(null, url, subtitleCallback, callback, true)
|
||||
}
|
||||
|
||||
suspend fun invokeNetmovies(
|
||||
|
@ -305,10 +288,29 @@ object SoraExtractor : SoraStream() {
|
|||
} else {
|
||||
"$netmoviesAPI/episodes/$fixTitle-${season}x${episode}"
|
||||
}
|
||||
invokeWpmovies(url, subtitleCallback, callback)
|
||||
invokeWpmovies(null, url, subtitleCallback, callback)
|
||||
}
|
||||
|
||||
suspend fun invokeZshow(
|
||||
title: String? = null,
|
||||
year: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val api = BuildConfig.ZSHOW_API
|
||||
val fixTitle = title.createSlug()
|
||||
val url = if (season == null) {
|
||||
"$api/movie/$fixTitle-$year"
|
||||
} else {
|
||||
"$api/episode/$fixTitle-season-$season-episode-$episode"
|
||||
}
|
||||
invokeWpmovies("ZShow", url, subtitleCallback, callback, encrypt = true)
|
||||
}
|
||||
|
||||
private suspend fun invokeWpmovies(
|
||||
name: String? = null,
|
||||
url: String? = null,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
|
@ -319,7 +321,6 @@ object SoraExtractor : SoraStream() {
|
|||
return this.replace("\"", "").replace("\\", "")
|
||||
}
|
||||
val res = app.get(url ?: return)
|
||||
val headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
||||
val referer = getBaseUrl(res.url)
|
||||
val document = res.document
|
||||
document.select("ul#playeroptionsul > li").map {
|
||||
|
@ -329,20 +330,29 @@ object SoraExtractor : SoraStream() {
|
|||
it.attr("data-type")
|
||||
)
|
||||
}.apmap { (id, nume, type) ->
|
||||
delay(1000)
|
||||
val json = 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 = headers, referer = url
|
||||
), headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest"), referer = url
|
||||
)
|
||||
val source = tryParseJson<ResponseHash>(json.text)?.let {
|
||||
when {
|
||||
encrypt -> cryptoAESHandler(it.embed_url,(it.key ?: return@apmap).toByteArray(), false)?.fixBloat()
|
||||
encrypt -> {
|
||||
val meta = tryParseJson<ZShowEmbed>(it.embed_url)?.meta ?: return@apmap
|
||||
val key = generateWpKey(it.key ?: return@apmap,meta)
|
||||
cryptoAESHandler(
|
||||
it.embed_url,
|
||||
key.toByteArray(),
|
||||
false
|
||||
)?.fixBloat()
|
||||
}
|
||||
fixIframe -> Jsoup.parse(it.embed_url).select("IFRAME").attr("SRC")
|
||||
else -> it.embed_url
|
||||
}
|
||||
} ?: return@apmap
|
||||
if (!source.contains("youtube")) {
|
||||
loadExtractor(source, "$referer/", subtitleCallback, callback)
|
||||
loadCustomExtractor(name, source, "$referer/", subtitleCallback, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,6 +141,10 @@ data class FDAds(
|
|||
@JsonProperty("linkr") val linkr: String? = null,
|
||||
)
|
||||
|
||||
data class ZShowEmbed(
|
||||
@JsonProperty("m") val meta: String? = null,
|
||||
)
|
||||
|
||||
data class WatchsomuchTorrents(
|
||||
@JsonProperty("id") val id: Int? = null,
|
||||
@JsonProperty("movieId") val movieId: Int? = null,
|
||||
|
|
|
@ -7,7 +7,6 @@ import com.hexated.SoraExtractor.invokeBollyMaza
|
|||
import com.hexated.SoraExtractor.invokeCryMovies
|
||||
import com.hexated.SoraExtractor.invokeDbgo
|
||||
import com.hexated.SoraExtractor.invokeFilmxy
|
||||
import com.hexated.SoraExtractor.invokeIdlix
|
||||
import com.hexated.SoraExtractor.invokeKimcartoon
|
||||
import com.hexated.SoraExtractor.invokeMovieHab
|
||||
import com.hexated.SoraExtractor.invokeVidSrc
|
||||
|
@ -53,6 +52,7 @@ import com.hexated.SoraExtractor.invokeVidsrcto
|
|||
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||
import com.hexated.SoraExtractor.invokeWatchflx
|
||||
import com.hexated.SoraExtractor.invokeWatchsomuch
|
||||
import com.hexated.SoraExtractor.invokeZshow
|
||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addImdbId
|
||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addTMDbId
|
||||
import com.lagradost.cloudstream3.extractors.VidSrcExtractor
|
||||
|
@ -93,7 +93,6 @@ open class SoraStream : TmdbProvider() {
|
|||
const val dbgoAPI = "https://dbgo.fun"
|
||||
const val movieHabAPI = "https://moviehab.com"
|
||||
const val dreamfilmAPI = "https://dreamfilmsw.net"
|
||||
const val idlixAPI = "https://tv.idlixplus.net"
|
||||
const val noverseAPI = "https://www.nollyverse.com"
|
||||
const val filmxyAPI = "https://www.filmxy.vip"
|
||||
const val kimcartoonAPI = "https://kimcartoon.li"
|
||||
|
@ -431,16 +430,6 @@ open class SoraStream : TmdbProvider() {
|
|||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeIdlix(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
},
|
||||
// {
|
||||
// invokeNoverse(res.title, res.season, res.episode, callback)
|
||||
// },
|
||||
|
@ -765,6 +754,16 @@ open class SoraStream : TmdbProvider() {
|
|||
},
|
||||
{
|
||||
if (!res.isAnime) invokeWatchflx(res.id, res.season, res.episode, callback)
|
||||
},
|
||||
{
|
||||
invokeZshow(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ import com.hexated.SoraExtractor.invokeFilmxy
|
|||
import com.hexated.SoraExtractor.invokeFlixon
|
||||
import com.hexated.SoraExtractor.invokeFwatayako
|
||||
import com.hexated.SoraExtractor.invokeGoku
|
||||
import com.hexated.SoraExtractor.invokeIdlix
|
||||
import com.hexated.SoraExtractor.invokeKimcartoon
|
||||
import com.hexated.SoraExtractor.invokeKisskh
|
||||
import com.hexated.SoraExtractor.invokeLing
|
||||
|
@ -36,6 +35,7 @@ import com.hexated.SoraExtractor.invokeVidsrcto
|
|||
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||
import com.hexated.SoraExtractor.invokeWatchflx
|
||||
import com.hexated.SoraExtractor.invokeWatchsomuch
|
||||
import com.hexated.SoraExtractor.invokeZshow
|
||||
import com.lagradost.cloudstream3.SubtitleFile
|
||||
import com.lagradost.cloudstream3.argamap
|
||||
import com.lagradost.cloudstream3.utils.AppUtils
|
||||
|
@ -134,16 +134,6 @@ class SoraStreamLite : SoraStream() {
|
|||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeIdlix(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
},
|
||||
// {
|
||||
// invokeUniqueStream(
|
||||
// res.title,
|
||||
|
@ -344,6 +334,16 @@ class SoraStreamLite : SoraStream() {
|
|||
res.episode,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeZshow(
|
||||
res.title,
|
||||
res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -1085,6 +1085,16 @@ suspend fun imdbToNetflixId(imdbId: String?, season: Int?): String? {
|
|||
?.substringAfterLast("/")
|
||||
}
|
||||
|
||||
fun generateWpKey(r: String, m: String): String {
|
||||
val rList = r.split("\\x").toTypedArray()
|
||||
var n = ""
|
||||
val decodedM = String(base64Decode(m.split("").reversed().joinToString("")).toCharArray())
|
||||
for (s in decodedM.split("|")) {
|
||||
n += "\\x" + rList[Integer.parseInt(s) + 1]
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
suspend fun loadCustomExtractor(
|
||||
name: String? = null,
|
||||
url: String,
|
||||
|
|
Loading…
Reference in a new issue