mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed #327
This commit is contained in:
parent
730dea79a2
commit
45b2b90f5b
7 changed files with 9 additions and 135 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -56,7 +56,6 @@ jobs:
|
||||||
ANICHI_APP: ${{ secrets.ANICHI_APP }}
|
ANICHI_APP: ${{ secrets.ANICHI_APP }}
|
||||||
PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }}
|
PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }}
|
||||||
ZSHOW_API: ${{ secrets.ZSHOW_API }}
|
ZSHOW_API: ${{ secrets.ZSHOW_API }}
|
||||||
VATIC_API: ${{ secrets.VATIC_API }}
|
|
||||||
SFMOVIES_API: ${{ secrets.SFMOVIES_API }}
|
SFMOVIES_API: ${{ secrets.SFMOVIES_API }}
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE/src
|
cd $GITHUB_WORKSPACE/src
|
||||||
|
@ -74,7 +73,6 @@ jobs:
|
||||||
echo ANICHI_APP=$ANICHI_APP >> local.properties
|
echo ANICHI_APP=$ANICHI_APP >> local.properties
|
||||||
echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> local.properties
|
echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> local.properties
|
||||||
echo ZSHOW_API=$ZSHOW_API >> local.properties
|
echo ZSHOW_API=$ZSHOW_API >> local.properties
|
||||||
echo VATIC_API=$VATIC_API >> local.properties
|
|
||||||
echo SFMOVIES_API=$SFMOVIES_API >> local.properties
|
echo SFMOVIES_API=$SFMOVIES_API >> local.properties
|
||||||
|
|
||||||
- name: Build Plugins
|
- name: Build Plugins
|
||||||
|
|
|
@ -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 = 184
|
version = 185
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -9,7 +9,6 @@ android {
|
||||||
properties.load(project.rootProject.file("local.properties").inputStream())
|
properties.load(project.rootProject.file("local.properties").inputStream())
|
||||||
|
|
||||||
buildConfigField("String", "SFMOVIES_API", "\"${properties.getProperty("SFMOVIES_API")}\"")
|
buildConfigField("String", "SFMOVIES_API", "\"${properties.getProperty("SFMOVIES_API")}\"")
|
||||||
buildConfigField("String", "VATIC_API", "\"${properties.getProperty("VATIC_API")}\"")
|
|
||||||
buildConfigField("String", "ZSHOW_API", "\"${properties.getProperty("ZSHOW_API")}\"")
|
buildConfigField("String", "ZSHOW_API", "\"${properties.getProperty("ZSHOW_API")}\"")
|
||||||
buildConfigField("String", "SORA_API", "\"${properties.getProperty("SORA_API")}\"")
|
buildConfigField("String", "SORA_API", "\"${properties.getProperty("SORA_API")}\"")
|
||||||
buildConfigField("String", "SORAHE", "\"${properties.getProperty("SORAHE")}\"")
|
buildConfigField("String", "SORAHE", "\"${properties.getProperty("SORAHE")}\"")
|
||||||
|
|
|
@ -1607,7 +1607,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
"RStream", "RStream", link, "$rStreamAPI/", Qualities.P720.value, INFER_TYPE
|
"RStream", "RStream", link, "$rStreamAPI/", Qualities.P1080.value, INFER_TYPE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -2140,7 +2140,7 @@ object SoraExtractor : SoraStream() {
|
||||||
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
|
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
|
||||||
}
|
}
|
||||||
|
|
||||||
val data = app.get(url, timeout = 60L, referer = ref).body.bytes().decrypt(key)
|
val data = app.get(url, timeout = 120L, referer = ref).body.bytes().decrypt(key)
|
||||||
val json = tryParseJson<BlackvidResponses>(data)
|
val json = tryParseJson<BlackvidResponses>(data)
|
||||||
|
|
||||||
json?.sources?.map { source ->
|
json?.sources?.map { source ->
|
||||||
|
@ -2236,10 +2236,10 @@ object SoraExtractor : SoraStream() {
|
||||||
"$watchOnlineAPI/shows/play/$id-$slug-$year"
|
"$watchOnlineAPI/shows/play/$id-$slug-$year"
|
||||||
}
|
}
|
||||||
|
|
||||||
var res = app.get(url)
|
val monsterAPI = "https://ditairridgeleg.monster"
|
||||||
if (res.code == 403) return
|
val fixUrl = url.replace(watchOnlineAPI, monsterAPI) + "?mid=1&sid=9k9iupt5sebbnfajrc6ti3ht7l&sec=1974bc4a902c4d69fcbab261dcec69094a9b8164&t=1694986826984"
|
||||||
if (!res.isSuccessful) res = searchWatchOnline(title, season, year) ?: return
|
|
||||||
val doc = res.document
|
val doc = app.get(fixUrl).document
|
||||||
val script = doc.selectFirst("script:containsData(hash:)")?.data()
|
val script = doc.selectFirst("script:containsData(hash:)")?.data()
|
||||||
val hash = Regex("hash:\\s*['\"](\\S+)['\"]").find(script ?: return)?.groupValues?.get(1)
|
val hash = Regex("hash:\\s*['\"](\\S+)['\"]").find(script ?: return)?.groupValues?.get(1)
|
||||||
val expires = Regex("expires:\\s*(\\d+)").find(script)?.groupValues?.get(1)
|
val expires = Regex("expires:\\s*(\\d+)").find(script)?.groupValues?.get(1)
|
||||||
|
@ -2539,60 +2539,16 @@ object SoraExtractor : SoraStream() {
|
||||||
} else {
|
} else {
|
||||||
media?.attributes?.seriess?.get(season - 1)?.get(episode - 1)?.svideos
|
media?.attributes?.seriess?.get(season - 1)?.get(episode - 1)?.svideos
|
||||||
} ?: return
|
} ?: return
|
||||||
val sig = "?sv=2022-11-02&ss=b&srt=sco&sp=rwlaix&se=2024-08-03T01:02:15Z&st=2023-08-02T17:02:15Z&spr=https&sig=9Fyz9V%2F%2FRsHa3%2F1nDYMU%2BxkblH5GMAtW7nrL5OCCASg%3D"
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
"SFMovies",
|
"SFMovies",
|
||||||
"SFMovies",
|
"SFMovies",
|
||||||
fixUrl(video + sig, "https://awesomes.blob.core.windows.net/awesomes"),
|
fixUrl(video, "https://watchfree.blob.core.windows.net/watchfree"),
|
||||||
"",
|
"",
|
||||||
Qualities.P1080.value,
|
Qualities.P1080.value,
|
||||||
INFER_TYPE
|
INFER_TYPE
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
suspend fun invokeVatic(
|
|
||||||
tmdbId: Int? = null,
|
|
||||||
season: Int? = null,
|
|
||||||
episode: Int? = null,
|
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
|
||||||
callback: (ExtractorLink) -> Unit,
|
|
||||||
) {
|
|
||||||
val vaticAPI = BuildConfig.VATIC_API
|
|
||||||
val url = if (season == null) {
|
|
||||||
"$vaticAPI/api/movie?id=$tmdbId"
|
|
||||||
} else {
|
|
||||||
"$vaticAPI/api/tv?id=$tmdbId&s=$season&e=$episode"
|
|
||||||
}
|
|
||||||
|
|
||||||
val res = app.get(
|
|
||||||
url
|
|
||||||
).parsedSafe<VaticSources>()
|
|
||||||
|
|
||||||
res?.qualities?.map { source ->
|
|
||||||
callback.invoke(
|
|
||||||
ExtractorLink(
|
|
||||||
"Vatic",
|
|
||||||
"Vatic",
|
|
||||||
source.path ?: return@map,
|
|
||||||
"$vaticAPI/",
|
|
||||||
if(source.quality.equals("auto", true)) Qualities.P1080.value else getQualityFromName(source.quality),
|
|
||||||
INFER_TYPE
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
res?.srtfiles?.map { sub ->
|
|
||||||
subtitleCallback.invoke(
|
|
||||||
SubtitleFile(
|
|
||||||
sub.caption ?: return@map,
|
|
||||||
sub.url ?: return@map,
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,17 +162,6 @@ data class JikanResponse(
|
||||||
@JsonProperty("data") val data: JikanData? = null,
|
@JsonProperty("data") val data: JikanData? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class WatchOnlineResults(
|
|
||||||
@JsonProperty("slug") val slug: String? = null,
|
|
||||||
@JsonProperty("title") val title: String? = null,
|
|
||||||
@JsonProperty("year") val year: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
data class WatchOnlineSearch(
|
|
||||||
@JsonProperty("result") val result: ArrayList<WatchOnlineResults>? = arrayListOf(),
|
|
||||||
)
|
|
||||||
|
|
||||||
data class WatchOnlineSubtitles(
|
data class WatchOnlineSubtitles(
|
||||||
@JsonProperty("language") val language: String? = null,
|
@JsonProperty("language") val language: String? = null,
|
||||||
@JsonProperty("file") val file: Any? = null,
|
@JsonProperty("file") val file: Any? = null,
|
||||||
|
@ -403,19 +392,4 @@ data class SFMoviesData(
|
||||||
|
|
||||||
data class SFMoviesSearch(
|
data class SFMoviesSearch(
|
||||||
@JsonProperty("data") var data: ArrayList<SFMoviesData>? = arrayListOf(),
|
@JsonProperty("data") var data: ArrayList<SFMoviesData>? = arrayListOf(),
|
||||||
)
|
|
||||||
|
|
||||||
data class VaticSrtfiles(
|
|
||||||
@JsonProperty("caption") var caption: String? = null,
|
|
||||||
@JsonProperty("url") var url: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class VaticQualities(
|
|
||||||
@JsonProperty("path") var path: String? = null,
|
|
||||||
@JsonProperty("quality") var quality: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class VaticSources(
|
|
||||||
@JsonProperty("Qualities") var qualities: ArrayList<VaticQualities> = arrayListOf(),
|
|
||||||
@JsonProperty("Srtfiles") var srtfiles: ArrayList<VaticSrtfiles> = arrayListOf(),
|
|
||||||
)
|
)
|
|
@ -45,7 +45,6 @@ import com.hexated.SoraExtractor.invokeSFMovies
|
||||||
import com.hexated.SoraExtractor.invokeShowflix
|
import com.hexated.SoraExtractor.invokeShowflix
|
||||||
import com.hexated.SoraExtractor.invokeTvMovies
|
import com.hexated.SoraExtractor.invokeTvMovies
|
||||||
import com.hexated.SoraExtractor.invokeUhdmovies
|
import com.hexated.SoraExtractor.invokeUhdmovies
|
||||||
import com.hexated.SoraExtractor.invokeVatic
|
|
||||||
import com.hexated.SoraExtractor.invokeVegamovies
|
import com.hexated.SoraExtractor.invokeVegamovies
|
||||||
import com.hexated.SoraExtractor.invokeVidsrcto
|
import com.hexated.SoraExtractor.invokeVidsrcto
|
||||||
import com.hexated.SoraExtractor.invokeWatchOnline
|
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||||
|
@ -114,7 +113,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val navyAPI = "https://navy-issue-i-239.site"
|
const val navyAPI = "https://navy-issue-i-239.site"
|
||||||
const val emoviesAPI = "https://emovies.si"
|
const val emoviesAPI = "https://emovies.si"
|
||||||
const val pobmoviesAPI = "https://pobmovies.cam"
|
const val pobmoviesAPI = "https://pobmovies.cam"
|
||||||
const val multimoviesAPI = "https://multi-movies.xyz"
|
const val multimoviesAPI = "https://multimovies.live"
|
||||||
const val netmoviesAPI = "https://netmovies.to"
|
const val netmoviesAPI = "https://netmovies.to"
|
||||||
const val momentAPI = "https://moment-explanation-i-244.site"
|
const val momentAPI = "https://moment-explanation-i-244.site"
|
||||||
const val doomoviesAPI = "https://doomovies.net"
|
const val doomoviesAPI = "https://doomovies.net"
|
||||||
|
@ -749,15 +748,6 @@ open class SoraStream : TmdbProvider() {
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
|
||||||
if (!res.isAnime) invokeVatic(
|
|
||||||
res.id,
|
|
||||||
res.season,
|
|
||||||
res.episode,
|
|
||||||
subtitleCallback,
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
if (!res.isAnime) invokeSFMovies(
|
if (!res.isAnime) invokeSFMovies(
|
||||||
res.id,
|
res.id,
|
||||||
|
|
|
@ -30,7 +30,6 @@ import com.hexated.SoraExtractor.invokeGomovies
|
||||||
import com.hexated.SoraExtractor.invokePutactor
|
import com.hexated.SoraExtractor.invokePutactor
|
||||||
import com.hexated.SoraExtractor.invokeSFMovies
|
import com.hexated.SoraExtractor.invokeSFMovies
|
||||||
import com.hexated.SoraExtractor.invokeShowflix
|
import com.hexated.SoraExtractor.invokeShowflix
|
||||||
import com.hexated.SoraExtractor.invokeVatic
|
|
||||||
import com.hexated.SoraExtractor.invokeVidSrc
|
import com.hexated.SoraExtractor.invokeVidSrc
|
||||||
import com.hexated.SoraExtractor.invokeVidsrcto
|
import com.hexated.SoraExtractor.invokeVidsrcto
|
||||||
import com.hexated.SoraExtractor.invokeWatchOnline
|
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||||
|
@ -313,15 +312,6 @@ class SoraStreamLite : SoraStream() {
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
|
||||||
if (!res.isAnime) invokeVatic(
|
|
||||||
res.id,
|
|
||||||
res.season,
|
|
||||||
res.episode,
|
|
||||||
subtitleCallback,
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
if(!res.isAnime) invokeSFMovies(
|
if(!res.isAnime) invokeSFMovies(
|
||||||
res.id,
|
res.id,
|
||||||
|
|
|
@ -10,7 +10,6 @@ import com.hexated.SoraStream.Companion.hdmovies4uAPI
|
||||||
import com.hexated.SoraStream.Companion.malsyncAPI
|
import com.hexated.SoraStream.Companion.malsyncAPI
|
||||||
import com.hexated.SoraStream.Companion.smashyStreamAPI
|
import com.hexated.SoraStream.Companion.smashyStreamAPI
|
||||||
import com.hexated.SoraStream.Companion.tvMoviesAPI
|
import com.hexated.SoraStream.Companion.tvMoviesAPI
|
||||||
import com.hexated.SoraStream.Companion.watchOnlineAPI
|
|
||||||
import com.hexated.SoraStream.Companion.watchflxAPI
|
import com.hexated.SoraStream.Companion.watchflxAPI
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.APIHolder.getCaptchaToken
|
import com.lagradost.cloudstream3.APIHolder.getCaptchaToken
|
||||||
|
@ -21,16 +20,12 @@ import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import com.lagradost.nicehttp.NiceResponse
|
import com.lagradost.nicehttp.NiceResponse
|
||||||
import com.lagradost.nicehttp.RequestBodyTypes
|
import com.lagradost.nicehttp.RequestBodyTypes
|
||||||
import com.lagradost.nicehttp.Requests.Companion.await
|
|
||||||
import com.lagradost.nicehttp.requestCreator
|
import com.lagradost.nicehttp.requestCreator
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.HttpUrl.Companion.toHttpUrl
|
import okhttp3.HttpUrl.Companion.toHttpUrl
|
||||||
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import okhttp3.Request
|
|
||||||
import okhttp3.RequestBody.Companion.toRequestBody
|
import okhttp3.RequestBody.Companion.toRequestBody
|
||||||
import okhttp3.Response
|
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import java.math.BigInteger
|
import java.math.BigInteger
|
||||||
import java.net.*
|
import java.net.*
|
||||||
|
@ -40,7 +35,6 @@ import java.security.spec.PKCS8EncodedKeySpec
|
||||||
import java.security.spec.X509EncodedKeySpec
|
import java.security.spec.X509EncodedKeySpec
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
import javax.crypto.Cipher
|
import javax.crypto.Cipher
|
||||||
import javax.crypto.spec.GCMParameterSpec
|
import javax.crypto.spec.GCMParameterSpec
|
||||||
import javax.crypto.spec.IvParameterSpec
|
import javax.crypto.spec.IvParameterSpec
|
||||||
|
@ -844,33 +838,6 @@ fun Document.findTvMoviesIframe(): String? {
|
||||||
?.substringBefore("'>")
|
?.substringBefore("'>")
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun searchWatchOnline(
|
|
||||||
title: String? = null,
|
|
||||||
season: Int? = null,
|
|
||||||
year: Int? = null,
|
|
||||||
): NiceResponse? {
|
|
||||||
val wTitle = title?.dropLast(1) // weird but this will make search working
|
|
||||||
val mediaId = app.get(
|
|
||||||
if (season == null) {
|
|
||||||
"${watchOnlineAPI}/api/v1/do-search/?q=$wTitle"
|
|
||||||
} else {
|
|
||||||
"${watchOnlineAPI}/api/v1/do-search/?q=$wTitle"
|
|
||||||
}
|
|
||||||
).parsedSafe<WatchOnlineSearch>()?.result?.find {
|
|
||||||
it.title.equals(title, true) && it.year.equals("$year")
|
|
||||||
}?.slug
|
|
||||||
|
|
||||||
return app.get(
|
|
||||||
fixUrl(
|
|
||||||
mediaId ?: return null, if (season == null) {
|
|
||||||
"${watchOnlineAPI}/movies/play"
|
|
||||||
} else {
|
|
||||||
"${watchOnlineAPI}/shows/play"
|
|
||||||
}
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
//modified code from https://github.com/jmir1/aniyomi-extensions/blob/master/src/all/kamyroll/src/eu/kanade/tachiyomi/animeextension/all/kamyroll/AccessTokenInterceptor.kt
|
//modified code from https://github.com/jmir1/aniyomi-extensions/blob/master/src/all/kamyroll/src/eu/kanade/tachiyomi/animeextension/all/kamyroll/AccessTokenInterceptor.kt
|
||||||
suspend fun getCrunchyrollToken(): Map<String, String> {
|
suspend fun getCrunchyrollToken(): Map<String, String> {
|
||||||
val client = app.baseClient.newBuilder()
|
val client = app.baseClient.newBuilder()
|
||||||
|
|
Loading…
Reference in a new issue