mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fix UHD?
This commit is contained in:
parent
8a61d0891e
commit
5654e31246
8 changed files with 71 additions and 76 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -54,7 +54,7 @@ jobs:
|
||||||
ANICHI_SERVER: ${{ secrets.ANICHI_SERVER }}
|
ANICHI_SERVER: ${{ secrets.ANICHI_SERVER }}
|
||||||
ANICHI_ENDPOINT: ${{ secrets.ANICHI_ENDPOINT }}
|
ANICHI_ENDPOINT: ${{ secrets.ANICHI_ENDPOINT }}
|
||||||
ANICHI_APP: ${{ secrets.ANICHI_APP }}
|
ANICHI_APP: ${{ secrets.ANICHI_APP }}
|
||||||
GOMOVIES_KEY: ${{ secrets.GOMOVIES_KEY }}
|
PRIMEWIRE_KEY: ${{ secrets.PRIMEWIRE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
cd $GITHUB_WORKSPACE/src
|
cd $GITHUB_WORKSPACE/src
|
||||||
echo SORA_API=$SORA_API >> local.properties
|
echo SORA_API=$SORA_API >> local.properties
|
||||||
|
@ -69,7 +69,7 @@ jobs:
|
||||||
echo ANICHI_SERVER=$ANICHI_SERVER >> local.properties
|
echo ANICHI_SERVER=$ANICHI_SERVER >> local.properties
|
||||||
echo ANICHI_ENDPOINT=$ANICHI_ENDPOINT >> local.properties
|
echo ANICHI_ENDPOINT=$ANICHI_ENDPOINT >> local.properties
|
||||||
echo ANICHI_APP=$ANICHI_APP >> local.properties
|
echo ANICHI_APP=$ANICHI_APP >> local.properties
|
||||||
echo GOMOVIES_KEY=$GOMOVIES_KEY >> local.properties
|
echo PRIMEWIRE_KEY=$PRIMEWIRE_KEY >> local.properties
|
||||||
|
|
||||||
- name: Build Plugins
|
- name: Build Plugins
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -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 = 156
|
version = 157
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -14,7 +14,7 @@ android {
|
||||||
buildConfigField("String", "SORATED", "\"${properties.getProperty("SORATED")}\"")
|
buildConfigField("String", "SORATED", "\"${properties.getProperty("SORATED")}\"")
|
||||||
buildConfigField("String", "DUMP_API", "\"${properties.getProperty("DUMP_API")}\"")
|
buildConfigField("String", "DUMP_API", "\"${properties.getProperty("DUMP_API")}\"")
|
||||||
buildConfigField("String", "DUMP_KEY", "\"${properties.getProperty("DUMP_KEY")}\"")
|
buildConfigField("String", "DUMP_KEY", "\"${properties.getProperty("DUMP_KEY")}\"")
|
||||||
buildConfigField("String", "GOMOVIES_KEY", "\"${properties.getProperty("GOMOVIES_KEY")}\"")
|
buildConfigField("String", "PRIMEWIRE_KEY", "\"${properties.getProperty("PRIMEWIRE_KEY")}\"")
|
||||||
buildConfigField("String", "CRUNCHYROLL_BASIC_TOKEN", "\"${properties.getProperty("CRUNCHYROLL_BASIC_TOKEN")}\"")
|
buildConfigField("String", "CRUNCHYROLL_BASIC_TOKEN", "\"${properties.getProperty("CRUNCHYROLL_BASIC_TOKEN")}\"")
|
||||||
buildConfigField("String", "CRUNCHYROLL_REFRESH_TOKEN", "\"${properties.getProperty("CRUNCHYROLL_REFRESH_TOKEN")}\"")
|
buildConfigField("String", "CRUNCHYROLL_REFRESH_TOKEN", "\"${properties.getProperty("CRUNCHYROLL_REFRESH_TOKEN")}\"")
|
||||||
|
|
||||||
|
|
|
@ -1127,13 +1127,19 @@ object SoraExtractor : SoraStream() {
|
||||||
link ?: return@apmap
|
link ?: return@apmap
|
||||||
)
|
)
|
||||||
val base = getBaseUrl(driveLink ?: return@apmap)
|
val base = getBaseUrl(driveLink ?: return@apmap)
|
||||||
val resDoc = app.get(driveLink).document
|
val driveReq = app.get(driveLink)
|
||||||
val bitLink = resDoc.selectFirst("a.btn.btn-outline-success")?.attr("href")
|
val driveRes = driveReq.document
|
||||||
val downloadLink = if (bitLink.isNullOrEmpty()) {
|
val bitLink = driveRes.select("a.btn.btn-outline-success").attr("href")
|
||||||
val backupIframe = resDoc.select("a.btn.btn-outline-warning").attr("href")
|
val downloadLink = when {
|
||||||
extractBackupUHD(backupIframe ?: return@apmap)
|
driveRes.select("button.btn.btn-success").text()
|
||||||
} else {
|
.contains("Direct Download", true) -> extractDirectUHD(driveLink, driveReq)
|
||||||
extractMirrorUHD(bitLink, base)
|
bitLink.isNullOrEmpty() -> {
|
||||||
|
val backupIframe = driveRes.select("a.btn.btn-outline-warning").attr("href")
|
||||||
|
extractBackupUHD(backupIframe ?: return@apmap)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
extractMirrorUHD(bitLink, base)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val tags = getUhdTags(quality)
|
val tags = getUhdTags(quality)
|
||||||
|
@ -2138,7 +2144,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeGomovies(
|
suspend fun invokePrimewire(
|
||||||
title: String? = null,
|
title: String? = null,
|
||||||
year: Int? = null,
|
year: Int? = null,
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
|
@ -2152,9 +2158,9 @@ object SoraExtractor : SoraStream() {
|
||||||
"$title Season $season"
|
"$title Season $season"
|
||||||
}
|
}
|
||||||
|
|
||||||
val doc = app.get("$gomoviesAPI/search/$query").document
|
val doc = app.get("$primewireAPI/search/$query").document
|
||||||
|
|
||||||
val media = doc.select("div._gory div.g_yFsxmKnYLvpKDTrdbizeYMWy").map {
|
val media = doc.select("div.RvnMfoxhgm").map {
|
||||||
Triple(
|
Triple(
|
||||||
it.attr("data-filmName"),
|
it.attr("data-filmName"),
|
||||||
it.attr("data-year"),
|
it.attr("data-year"),
|
||||||
|
@ -2183,21 +2189,21 @@ object SoraExtractor : SoraStream() {
|
||||||
app.get(
|
app.get(
|
||||||
fixUrl(
|
fixUrl(
|
||||||
media.third,
|
media.third,
|
||||||
gomoviesAPI
|
primewireAPI
|
||||||
)
|
)
|
||||||
).document.selectFirst("div#g_MXOzFGouZrOAUioXjpddqkZK a:contains(Episode ${slug.second})")
|
).document.selectFirst("div#vvqUtffkId a:contains(Episode ${slug.second})")
|
||||||
?.attr("href")
|
?.attr("href")
|
||||||
} ?: return
|
} ?: return
|
||||||
|
|
||||||
val res = app.get(fixUrl(iframe, gomoviesAPI), verify = false)
|
val res = app.get(fixUrl(iframe, primewireAPI), verify = false)
|
||||||
val match = "var url = '(/user/servers/.*?\\?ep=.*?)';".toRegex().find(res.text)
|
val match = "var url = '(/user/servers/.*?\\?ep=.*?)';".toRegex().find(res.text)
|
||||||
val serverUrl = match?.groupValues?.get(1) ?: return
|
val serverUrl = match?.groupValues?.get(1) ?: return
|
||||||
val cookies = res.okhttpResponse.headers.getGomoviesCookies()
|
val cookies = res.okhttpResponse.headers.getPrimewireCookies()
|
||||||
val url = res.document.select("meta[property=og:url]").attr("content")
|
val url = res.document.select("meta[property=og:url]").attr("content")
|
||||||
val headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
val headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
||||||
val qualities = intArrayOf(2160, 1440, 1080, 720, 480, 360)
|
val qualities = intArrayOf(2160, 1440, 1080, 720, 480, 360)
|
||||||
app.get(
|
app.get(
|
||||||
"$gomoviesAPI$serverUrl",
|
"$primewireAPI$serverUrl",
|
||||||
cookies = cookies, referer = url, headers = headers
|
cookies = cookies, referer = url, headers = headers
|
||||||
).document.select("ul li").amap { el ->
|
).document.select("ul li").amap { el ->
|
||||||
val server = el.attr("data-value")
|
val server = el.attr("data-value")
|
||||||
|
@ -2207,16 +2213,16 @@ object SoraExtractor : SoraStream() {
|
||||||
referer = url,
|
referer = url,
|
||||||
headers = headers
|
headers = headers
|
||||||
).text
|
).text
|
||||||
val json = base64Decode(encryptedData).decryptGomoviesJson()
|
val json = base64Decode(encryptedData).decodePrimewireXor()
|
||||||
val links = tryParseJson<List<GomoviesSources>>(json) ?: return@amap
|
val links = tryParseJson<List<PrimewireSources>>(json) ?: return@amap
|
||||||
links.forEach { video ->
|
links.forEach { video ->
|
||||||
qualities.filter { it <= video.max.toInt() }.forEach {
|
qualities.filter { it <= video.max.toInt() }.forEach {
|
||||||
callback(
|
callback(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
"Gomovies",
|
"Primewire",
|
||||||
"Gomovies",
|
"Primewire",
|
||||||
video.src.split("360", limit = 3).joinToString(it.toString()),
|
video.src.split("360", limit = 3).joinToString(it.toString()),
|
||||||
"$gomoviesAPI/",
|
"$primewireAPI/",
|
||||||
it,
|
it,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -2535,7 +2541,8 @@ object SoraExtractor : SoraStream() {
|
||||||
) {
|
) {
|
||||||
val referer = "https://2now.tv/"
|
val referer = "https://2now.tv/"
|
||||||
val slug = getEpisodeSlug(season, episode)
|
val slug = getEpisodeSlug(season, episode)
|
||||||
val url = if (season == null) "$nowTvAPI/$tmdbId.mp4" else "$nowTvAPI/tv/$tmdbId/s${season}e${slug.second}.mp4"
|
val url =
|
||||||
|
if (season == null) "$nowTvAPI/$tmdbId.mp4" else "$nowTvAPI/tv/$tmdbId/s${season}e${slug.second}.mp4"
|
||||||
if (!app.get(url, referer = referer).isSuccessful) return
|
if (!app.get(url, referer = referer).isSuccessful) return
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
|
|
|
@ -9,12 +9,6 @@ data class FDMovieIFrame(
|
||||||
val type: String,
|
val type: String,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class BaymoviesConfig(
|
|
||||||
val country: String,
|
|
||||||
val downloadTime: String,
|
|
||||||
val workers: List<String>
|
|
||||||
)
|
|
||||||
|
|
||||||
data class AniIds(
|
data class AniIds(
|
||||||
var id: Int? = null,
|
var id: Int? = null,
|
||||||
var idMal: Int? = null
|
var idMal: Int? = null
|
||||||
|
@ -37,26 +31,7 @@ data class AniSearch(
|
||||||
@JsonProperty("data") var data: AniData? = AniData()
|
@JsonProperty("data") var data: AniData? = AniData()
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Tmdb2Anilist(
|
data class PrimewireSources(
|
||||||
@JsonProperty("tmdb_id") val tmdb_id: String? = null,
|
|
||||||
@JsonProperty("anilist_id") val anilist_id: String? = null,
|
|
||||||
@JsonProperty("mal_id") val mal_id: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class Movie123Media(
|
|
||||||
@JsonProperty("url") val url: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class Movie123Data(
|
|
||||||
@JsonProperty("t") val t: String? = null,
|
|
||||||
@JsonProperty("s") val s: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class Movie123Search(
|
|
||||||
@JsonProperty("data") val data: ArrayList<Movie123Data>? = arrayListOf(),
|
|
||||||
)
|
|
||||||
|
|
||||||
data class GomoviesSources(
|
|
||||||
@JsonProperty("src") val src: String,
|
@JsonProperty("src") val src: String,
|
||||||
@JsonProperty("file") val file: String? = null,
|
@JsonProperty("file") val file: String? = null,
|
||||||
@JsonProperty("label") val label: Int? = null,
|
@JsonProperty("label") val label: Int? = null,
|
||||||
|
@ -202,15 +177,6 @@ data class IndexSearch(
|
||||||
@JsonProperty("data") val data: IndexData? = null,
|
@JsonProperty("data") val data: IndexData? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class SorastreamResponse(
|
|
||||||
@JsonProperty("data") val data: SorastreamVideos? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class SorastreamVideos(
|
|
||||||
@JsonProperty("mediaUrl") val mediaUrl: String? = null,
|
|
||||||
@JsonProperty("currentDefinition") val currentDefinition: String? = null,
|
|
||||||
)
|
|
||||||
|
|
||||||
data class BiliBiliEpisodes(
|
data class BiliBiliEpisodes(
|
||||||
@JsonProperty("id") val id: Int? = null,
|
@JsonProperty("id") val id: Int? = null,
|
||||||
@JsonProperty("sourceId") val sourceId: String? = null,
|
@JsonProperty("sourceId") val sourceId: String? = null,
|
||||||
|
|
|
@ -25,7 +25,6 @@ import com.hexated.SoraExtractor.invokeFmovies
|
||||||
import com.hexated.SoraExtractor.invokeFwatayako
|
import com.hexated.SoraExtractor.invokeFwatayako
|
||||||
import com.hexated.SoraExtractor.invokeGMovies
|
import com.hexated.SoraExtractor.invokeGMovies
|
||||||
import com.hexated.SoraExtractor.invokeGoku
|
import com.hexated.SoraExtractor.invokeGoku
|
||||||
import com.hexated.SoraExtractor.invokeGomovies
|
|
||||||
import com.hexated.SoraExtractor.invokeKisskh
|
import com.hexated.SoraExtractor.invokeKisskh
|
||||||
import com.hexated.SoraExtractor.invokeLing
|
import com.hexated.SoraExtractor.invokeLing
|
||||||
import com.hexated.SoraExtractor.invokeM4uhd
|
import com.hexated.SoraExtractor.invokeM4uhd
|
||||||
|
@ -46,6 +45,7 @@ import com.hexated.SoraExtractor.invokeMoment
|
||||||
import com.hexated.SoraExtractor.invokeMultimovies
|
import com.hexated.SoraExtractor.invokeMultimovies
|
||||||
import com.hexated.SoraExtractor.invokeNetmovies
|
import com.hexated.SoraExtractor.invokeNetmovies
|
||||||
import com.hexated.SoraExtractor.invokePobmovies
|
import com.hexated.SoraExtractor.invokePobmovies
|
||||||
|
import com.hexated.SoraExtractor.invokePrimewire
|
||||||
import com.hexated.SoraExtractor.invokeTvMovies
|
import com.hexated.SoraExtractor.invokeTvMovies
|
||||||
import com.hexated.SoraExtractor.invokeUhdmovies
|
import com.hexated.SoraExtractor.invokeUhdmovies
|
||||||
import com.hexated.SoraExtractor.invokeWatchOnline
|
import com.hexated.SoraExtractor.invokeWatchOnline
|
||||||
|
@ -111,7 +111,6 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val flixonAPI = "https://flixon.lol"
|
const val flixonAPI = "https://flixon.lol"
|
||||||
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=")
|
|
||||||
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"
|
||||||
|
@ -129,6 +128,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
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"
|
||||||
|
const val primewireAPI = "https://real-primewire.club"
|
||||||
|
|
||||||
// INDEX SITE
|
// INDEX SITE
|
||||||
const val dahmerMoviesAPI = "https://edytjedhgmdhm.abfhaqrhbnf.workers.dev"
|
const val dahmerMoviesAPI = "https://edytjedhgmdhm.abfhaqrhbnf.workers.dev"
|
||||||
|
@ -615,7 +615,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeGomovies(res.title, res.year, res.season, res.episode, callback)
|
invokePrimewire(res.title, res.year, res.season, res.episode, callback)
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// if (!res.isAnime) invokeGdbotMovies(
|
// if (!res.isAnime) invokeGdbotMovies(
|
||||||
|
|
|
@ -10,7 +10,6 @@ import com.hexated.SoraExtractor.invokeFlixon
|
||||||
import com.hexated.SoraExtractor.invokeFmovies
|
import com.hexated.SoraExtractor.invokeFmovies
|
||||||
import com.hexated.SoraExtractor.invokeFwatayako
|
import com.hexated.SoraExtractor.invokeFwatayako
|
||||||
import com.hexated.SoraExtractor.invokeGoku
|
import com.hexated.SoraExtractor.invokeGoku
|
||||||
import com.hexated.SoraExtractor.invokeGomovies
|
|
||||||
import com.hexated.SoraExtractor.invokeHDMovieBox
|
import com.hexated.SoraExtractor.invokeHDMovieBox
|
||||||
import com.hexated.SoraExtractor.invokeIdlix
|
import com.hexated.SoraExtractor.invokeIdlix
|
||||||
import com.hexated.SoraExtractor.invokeKimcartoon
|
import com.hexated.SoraExtractor.invokeKimcartoon
|
||||||
|
@ -32,6 +31,7 @@ import com.hexated.SoraExtractor.invokeFourCartoon
|
||||||
import com.hexated.SoraExtractor.invokeMoment
|
import com.hexated.SoraExtractor.invokeMoment
|
||||||
import com.hexated.SoraExtractor.invokeMultimovies
|
import com.hexated.SoraExtractor.invokeMultimovies
|
||||||
import com.hexated.SoraExtractor.invokeNetmovies
|
import com.hexated.SoraExtractor.invokeNetmovies
|
||||||
|
import com.hexated.SoraExtractor.invokePrimewire
|
||||||
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
|
||||||
|
@ -268,7 +268,7 @@ class SoraStreamLite : SoraStream() {
|
||||||
invokeFlixon(res.id, res.imdbId, res.season, res.episode, callback)
|
invokeFlixon(res.id, res.imdbId, res.season, res.episode, callback)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
invokeGomovies(res.title, res.year, res.season, res.episode, callback)
|
invokePrimewire(res.title, res.year, res.season, res.episode, callback)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
if (!res.isAnime) invokeAsk4Movies(
|
if (!res.isAnime) invokeAsk4Movies(
|
||||||
|
|
|
@ -165,6 +165,34 @@ suspend fun extractMirrorUHD(url: String, ref: String): String? {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun extractDirectUHD(url: String, niceResponse: NiceResponse): String? {
|
||||||
|
val document = niceResponse.document
|
||||||
|
val script = document.selectFirst("script:containsData(cf_token)")?.data() ?: return null
|
||||||
|
val actionToken = script.substringAfter("\"key\", \"").substringBefore("\");")
|
||||||
|
val cfToken = script.substringAfter("cf_token = \"").substringBefore("\";")
|
||||||
|
val body = FormBody.Builder()
|
||||||
|
.addEncoded("action", "direct")
|
||||||
|
.addEncoded("key", actionToken)
|
||||||
|
.addEncoded("action_token", cfToken)
|
||||||
|
.build()
|
||||||
|
val cookies = mapOf("PHPSESSID" to "${niceResponse.cookies["PHPSESSID"]}")
|
||||||
|
val direct = app.post(
|
||||||
|
url,
|
||||||
|
requestBody = body,
|
||||||
|
cookies = cookies,
|
||||||
|
referer = url,
|
||||||
|
headers = mapOf(
|
||||||
|
"x-token" to "driveleech.org"
|
||||||
|
)
|
||||||
|
).parsedSafe<Map<String, String>>()?.get("url")
|
||||||
|
|
||||||
|
return app.get(
|
||||||
|
direct ?: return null, cookies = cookies,
|
||||||
|
referer = url
|
||||||
|
).text.substringAfter("worker_url = '").substringBefore("';")
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
suspend fun extractBackupUHD(url: String): String? {
|
suspend fun extractBackupUHD(url: String): String? {
|
||||||
val resumeDoc = app.get(url)
|
val resumeDoc = app.get(url)
|
||||||
|
|
||||||
|
@ -425,14 +453,8 @@ suspend fun invokeSmashyFfix(
|
||||||
ref: String,
|
ref: String,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
) {
|
) {
|
||||||
val script =
|
val res = app.get(url, referer = ref).text
|
||||||
app.get(url, referer = ref).document.selectFirst("script:containsData(player =)")?.data()
|
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
|
||||||
?: return
|
|
||||||
|
|
||||||
val source =
|
|
||||||
Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(script)?.groupValues?.get(
|
|
||||||
1
|
|
||||||
) ?: return
|
|
||||||
|
|
||||||
source.split(",").map { links ->
|
source.split(",").map { links ->
|
||||||
val quality = Regex("\\[(\\d+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
val quality = Regex("\\[(\\d+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
||||||
|
@ -1283,7 +1305,7 @@ fun decodeIndexJson(json: String): String {
|
||||||
return base64Decode(slug.substring(0, slug.length - 20))
|
return base64Decode(slug.substring(0, slug.length - 20))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun String.decryptGomoviesJson(key: String = BuildConfig.GOMOVIES_KEY): String {
|
fun String.decodePrimewireXor(key: String = BuildConfig.PRIMEWIRE_KEY): String {
|
||||||
val sb = StringBuilder()
|
val sb = StringBuilder()
|
||||||
var i = 0
|
var i = 0
|
||||||
while (i < this.length) {
|
while (i < this.length) {
|
||||||
|
@ -1297,7 +1319,7 @@ fun String.decryptGomoviesJson(key: String = BuildConfig.GOMOVIES_KEY): String {
|
||||||
return sb.toString()
|
return sb.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Headers.getGomoviesCookies(cookieKey: String = "set-cookie"): Map<String, String> {
|
fun Headers.getPrimewireCookies(cookieKey: String = "set-cookie"): Map<String, String> {
|
||||||
val cookieList =
|
val cookieList =
|
||||||
this.filter { it.first.equals(cookieKey, ignoreCase = true) }.mapNotNull {
|
this.filter { it.first.equals(cookieKey, ignoreCase = true) }.mapNotNull {
|
||||||
it.second.split(";").firstOrNull()
|
it.second.split(";").firstOrNull()
|
||||||
|
|
|
@ -10,7 +10,7 @@ import org.jsoup.nodes.Element
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
open class YomoviesProvider : MainAPI() {
|
open class YomoviesProvider : MainAPI() {
|
||||||
override var mainUrl = "https://yomovies.baby"
|
override var mainUrl = "https://yomovies.ltd"
|
||||||
private var directUrl = ""
|
private var directUrl = ""
|
||||||
override var name = "Yomovies"
|
override var name = "Yomovies"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
|
|
Loading…
Reference in a new issue