mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: added PapaonMovies
This commit is contained in:
parent
f3f08c08fa
commit
1be336cc1b
3 changed files with 114 additions and 41 deletions
|
@ -1912,7 +1912,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val secret =
|
val secret =
|
||||||
script.substringAfter("secret = \"").substringBefore("\";").let { base64Decode(it) }
|
script.substringAfter("secret = \"").substringBefore("\";").let { base64Decode(it) }
|
||||||
val key = script.substringAfter("token = \"").substringBefore("\";")
|
val key = script.substringAfter("token = \"").substringBefore("\";")
|
||||||
delay(2000)
|
delay(3000)
|
||||||
val source = app.get(
|
val source = app.get(
|
||||||
"$secret$key",
|
"$secret$key",
|
||||||
headers = mapOf(
|
headers = mapOf(
|
||||||
|
@ -1991,15 +1991,16 @@ object SoraExtractor : SoraStream() {
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
) {
|
) {
|
||||||
|
val api = "https://thebayindexpublicgroupapi.zindex.eu.org"
|
||||||
val key = base64DecodeAPI("ZW0=c3Q=c3k=b28=YWQ=Ymg=")
|
val key = base64DecodeAPI("ZW0=c3Q=c3k=b28=YWQ=Ymg=")
|
||||||
val headers = mapOf(
|
val headers = mapOf(
|
||||||
"Referer" to "$baymovies/",
|
"Referer" to "$baymoviesAPI/",
|
||||||
"Origin" to baymovies,
|
"Origin" to baymoviesAPI,
|
||||||
"cf_cache_token" to "UKsVpQqBMxB56gBfhYKbfCVkRIXMh42pk6G4DdkXXoVh7j4BjV"
|
"cf_cache_token" to "UKsVpQqBMxB56gBfhYKbfCVkRIXMh42pk6G4DdkXXoVh7j4BjV"
|
||||||
)
|
)
|
||||||
val query = getIndexQuery(title, year, season, episode)
|
val query = getIndexQuery(title, year, season, episode)
|
||||||
val search = app.get(
|
val search = app.get(
|
||||||
"$baymoviesAPI/0:search?q=$query&page_token=&page_index=0",
|
"$api/0:search?q=$query&page_token=&page_index=0",
|
||||||
headers = headers
|
headers = headers
|
||||||
).text
|
).text
|
||||||
val media = searchIndex(title, season, episode, year, search) ?: return
|
val media = searchIndex(title, season, episode, year, search) ?: return
|
||||||
|
@ -2015,7 +2016,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
val link =
|
val link =
|
||||||
"https://api.$worker.workers.dev/download.aspx?file=$encryptedId&expiry=$encryptedExpiry&mac=$hmacSign"
|
"https://api.$worker.workers.dev/download.aspx?file=$encryptedId&expiry=$encryptedExpiry&mac=$hmacSign"
|
||||||
if (!app.get(link, referer = "$baymovies/").isSuccessful) return@apmap null
|
// if (!app.get(link, referer = "$baymoviesAPI/").isSuccessful) return@apmap null
|
||||||
val size = file.size?.toDouble() ?: return@apmap null
|
val size = file.size?.toDouble() ?: return@apmap null
|
||||||
val sizeFile = "%.2f GB".format(bytesToGigaBytes(size))
|
val sizeFile = "%.2f GB".format(bytesToGigaBytes(size))
|
||||||
val tags = Regex("\\d{3,4}[pP]\\.?(.*?)\\.(mkv|mp4)").find(
|
val tags = Regex("\\d{3,4}[pP]\\.?(.*?)\\.(mkv|mp4)").find(
|
||||||
|
@ -2031,7 +2032,7 @@ object SoraExtractor : SoraStream() {
|
||||||
"Baymovies $tags [$sizeFile]",
|
"Baymovies $tags [$sizeFile]",
|
||||||
"Baymovies $tags [$sizeFile]",
|
"Baymovies $tags [$sizeFile]",
|
||||||
link,
|
link,
|
||||||
"$baymovies/",
|
"$baymoviesAPI/",
|
||||||
quality,
|
quality,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -2189,7 +2190,7 @@ object SoraExtractor : SoraStream() {
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
password: String? = null,
|
password: String = "",
|
||||||
) {
|
) {
|
||||||
invokeIndex(
|
invokeIndex(
|
||||||
apiUrl,
|
apiUrl,
|
||||||
|
@ -2211,7 +2212,7 @@ object SoraExtractor : SoraStream() {
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
password: String? = null,
|
password: String = "",
|
||||||
) {
|
) {
|
||||||
invokeIndex(
|
invokeIndex(
|
||||||
apiUrl,
|
apiUrl,
|
||||||
|
@ -2225,6 +2226,46 @@ object SoraExtractor : SoraStream() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun invokePapaonMovies1(
|
||||||
|
apiUrl: String,
|
||||||
|
api: String,
|
||||||
|
title: String? = null,
|
||||||
|
year: Int? = null,
|
||||||
|
season: Int? = null,
|
||||||
|
episode: Int? = null,
|
||||||
|
callback: (ExtractorLink) -> Unit,
|
||||||
|
) {
|
||||||
|
invokeIndex(
|
||||||
|
apiUrl,
|
||||||
|
api,
|
||||||
|
title,
|
||||||
|
year,
|
||||||
|
season,
|
||||||
|
episode,
|
||||||
|
callback,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun invokePapaonMovies2(
|
||||||
|
apiUrl: String,
|
||||||
|
api: String,
|
||||||
|
title: String? = null,
|
||||||
|
year: Int? = null,
|
||||||
|
season: Int? = null,
|
||||||
|
episode: Int? = null,
|
||||||
|
callback: (ExtractorLink) -> Unit,
|
||||||
|
) {
|
||||||
|
invokeIndex(
|
||||||
|
apiUrl,
|
||||||
|
api,
|
||||||
|
title,
|
||||||
|
year,
|
||||||
|
season,
|
||||||
|
episode,
|
||||||
|
callback,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
private suspend fun invokeIndex(
|
private suspend fun invokeIndex(
|
||||||
apiUrl: String,
|
apiUrl: String,
|
||||||
api: String,
|
api: String,
|
||||||
|
@ -2233,33 +2274,13 @@ object SoraExtractor : SoraStream() {
|
||||||
season: Int? = null,
|
season: Int? = null,
|
||||||
episode: Int? = null,
|
episode: Int? = null,
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
password: String? = null,
|
password: String = "",
|
||||||
) {
|
) {
|
||||||
val encodedIndex = arrayOf(
|
|
||||||
"GamMovies",
|
|
||||||
"JSMovies",
|
|
||||||
"BlackMovies",
|
|
||||||
"CodexMovies",
|
|
||||||
"RinzryMovies",
|
|
||||||
"EdithxMovies",
|
|
||||||
"XtremeMovies",
|
|
||||||
)
|
|
||||||
|
|
||||||
val lockedIndex = arrayOf(
|
|
||||||
"CodexMovies",
|
|
||||||
"EdithxMovies",
|
|
||||||
)
|
|
||||||
|
|
||||||
val premiumIndex = arrayOf(
|
|
||||||
"EdithxMovies"
|
|
||||||
)
|
|
||||||
|
|
||||||
val passHeaders = mapOf(
|
val passHeaders = mapOf(
|
||||||
"Authorization" to password
|
"Authorization" to password
|
||||||
)
|
)
|
||||||
|
|
||||||
val query = getIndexQuery(title, year, season, episode).let {
|
val query = getIndexQuery(title, year, season, episode).let {
|
||||||
if (api in premiumIndex) "$it mkv" else it
|
if (api in mkvIndex) "$it mkv" else it
|
||||||
}
|
}
|
||||||
val body =
|
val body =
|
||||||
"""{"q":"$query","password":null,"page_token":null,"page_index":0}""".toRequestBody(
|
"""{"q":"$query","password":null,"page_token":null,"page_index":0}""".toRequestBody(
|
||||||
|
@ -2271,17 +2292,17 @@ object SoraExtractor : SoraStream() {
|
||||||
"page_index" to "0"
|
"page_index" to "0"
|
||||||
)
|
)
|
||||||
val search = if (api in encodedIndex) {
|
val search = if (api in encodedIndex) {
|
||||||
if (api in lockedIndex) decodeIndexJson(
|
decodeIndexJson(
|
||||||
app.post(
|
if (api in lockedIndex) app.post(
|
||||||
"${apiUrl}search",
|
"${apiUrl}search",
|
||||||
data = data,
|
data = data,
|
||||||
headers = passHeaders.mapValues { it.value as String }
|
headers = passHeaders
|
||||||
).text
|
).text else app.post("${apiUrl}search", data = data).text
|
||||||
) else decodeIndexJson(app.post("${apiUrl}search", data = data).text)
|
)
|
||||||
} else {
|
} else {
|
||||||
app.post("${apiUrl}search", requestBody = body).text
|
app.post("${apiUrl}search", requestBody = body).text
|
||||||
}
|
}
|
||||||
val media = if (api in premiumIndex) searchIndex(
|
val media = if (api in untrimmedIndex) searchIndex(
|
||||||
title,
|
title,
|
||||||
season,
|
season,
|
||||||
episode,
|
episode,
|
||||||
|
@ -2301,7 +2322,7 @@ object SoraExtractor : SoraStream() {
|
||||||
app.post(
|
app.post(
|
||||||
"${apiUrl}id2path",
|
"${apiUrl}id2path",
|
||||||
data = pathData,
|
data = pathData,
|
||||||
headers = passHeaders.mapValues { it.value as String }
|
headers = passHeaders
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
app.post(
|
app.post(
|
||||||
|
|
|
@ -35,6 +35,8 @@ import com.hexated.SoraExtractor.invokeM4uhd
|
||||||
import com.hexated.SoraExtractor.invokeMovie123Net
|
import com.hexated.SoraExtractor.invokeMovie123Net
|
||||||
import com.hexated.SoraExtractor.invokeMoviesbay
|
import com.hexated.SoraExtractor.invokeMoviesbay
|
||||||
import com.hexated.SoraExtractor.invokeMoviezAdd
|
import com.hexated.SoraExtractor.invokeMoviezAdd
|
||||||
|
import com.hexated.SoraExtractor.invokePapaonMovies1
|
||||||
|
import com.hexated.SoraExtractor.invokePapaonMovies2
|
||||||
import com.hexated.SoraExtractor.invokeRStream
|
import com.hexated.SoraExtractor.invokeRStream
|
||||||
import com.hexated.SoraExtractor.invokeRinzrymovies
|
import com.hexated.SoraExtractor.invokeRinzrymovies
|
||||||
import com.hexated.SoraExtractor.invokeSmashyStream
|
import com.hexated.SoraExtractor.invokeSmashyStream
|
||||||
|
@ -68,7 +70,6 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val jikanAPI = "https://api.jikan.moe/v4"
|
const val jikanAPI = "https://api.jikan.moe/v4"
|
||||||
const val gdbot = "https://gdbot.xyz"
|
const val gdbot = "https://gdbot.xyz"
|
||||||
const val consumetAnilistAPI = "https://api.consumet.org/meta/anilist"
|
const val consumetAnilistAPI = "https://api.consumet.org/meta/anilist"
|
||||||
const val baymovies = "https://opengatewayindex.pages.dev"
|
|
||||||
|
|
||||||
private val apiKey = base64DecodeAPI("ZTM=NTg=MjM=MjM=ODc=MzI=OGQ=MmE=Nzk=Nzk=ZjI=NTA=NDY=NDA=MzA=YjA=") // PLEASE DON'T STEAL
|
private val apiKey = base64DecodeAPI("ZTM=NTg=MjM=MjM=ODc=MzI=OGQ=MmE=Nzk=Nzk=ZjI=NTA=NDY=NDA=MzA=YjA=") // PLEASE DON'T STEAL
|
||||||
|
|
||||||
|
@ -108,7 +109,7 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val movie123NetAPI = "https://ww7.0123movie.net"
|
const val movie123NetAPI = "https://ww7.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
|
||||||
const val baymoviesAPI = "https://thebayindexpublicgroupapi.zindex.eu.org" // dead
|
const val baymoviesAPI = "https://opengatewayindex.pages.dev" // dead
|
||||||
const val chillmovies0API = "https://chill.aicirou.workers.dev/0:" // dead
|
const val chillmovies0API = "https://chill.aicirou.workers.dev/0:" // dead
|
||||||
const val chillmovies1API = "https://chill.aicirou.workers.dev/1:" // dead
|
const val chillmovies1API = "https://chill.aicirou.workers.dev/1:" // dead
|
||||||
const val gamMoviesAPI = "https://drive.gamick.workers.dev/0:" // dead
|
const val gamMoviesAPI = "https://drive.gamick.workers.dev/0:" // dead
|
||||||
|
@ -118,6 +119,8 @@ open class SoraStream : TmdbProvider() {
|
||||||
const val codexMoviesAPI = "https://packs.codexcloudx.tech/0:"
|
const val codexMoviesAPI = "https://packs.codexcloudx.tech/0:"
|
||||||
const val edithxMoviesAPI = "https://index.edithx.ga/0:"
|
const val edithxMoviesAPI = "https://index.edithx.ga/0:"
|
||||||
const val xtremeMoviesAPI = "https://kartik19.xtrememirror0.workers.dev/0:"
|
const val xtremeMoviesAPI = "https://kartik19.xtrememirror0.workers.dev/0:"
|
||||||
|
const val papaonMovies1API = "https://m.papaonwork.workers.dev/0:"
|
||||||
|
const val papaonMovies2API = "https://m.papaonwork.workers.dev/1:"
|
||||||
|
|
||||||
fun getType(t: String?): TvType {
|
fun getType(t: String?): TvType {
|
||||||
return when (t) {
|
return when (t) {
|
||||||
|
@ -674,6 +677,28 @@ open class SoraStream : TmdbProvider() {
|
||||||
callback
|
callback
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
if (!res.isAnime) invokePapaonMovies1(
|
||||||
|
papaonMovies1API,
|
||||||
|
"PapaonMovies[1]",
|
||||||
|
res.title,
|
||||||
|
res.year,
|
||||||
|
res.season,
|
||||||
|
res.episode,
|
||||||
|
callback
|
||||||
|
)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
if (!res.isAnime) invokePapaonMovies2(
|
||||||
|
papaonMovies2API,
|
||||||
|
"PapaonMovies[2]",
|
||||||
|
res.title,
|
||||||
|
res.year,
|
||||||
|
res.season,
|
||||||
|
res.episode,
|
||||||
|
callback
|
||||||
|
)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package com.hexated
|
package com.hexated
|
||||||
|
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import com.hexated.SoraStream.Companion.baymovies
|
import com.hexated.SoraStream.Companion.baymoviesAPI
|
||||||
import com.hexated.SoraStream.Companion.consumetCrunchyrollAPI
|
import com.hexated.SoraStream.Companion.consumetCrunchyrollAPI
|
||||||
import com.hexated.SoraStream.Companion.filmxyAPI
|
import com.hexated.SoraStream.Companion.filmxyAPI
|
||||||
import com.hexated.SoraStream.Companion.gdbot
|
import com.hexated.SoraStream.Companion.gdbot
|
||||||
|
@ -32,6 +32,33 @@ import kotlin.collections.ArrayList
|
||||||
import kotlin.collections.HashMap
|
import kotlin.collections.HashMap
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
|
||||||
|
val encodedIndex = arrayOf(
|
||||||
|
"GamMovies",
|
||||||
|
"JSMovies",
|
||||||
|
"BlackMovies",
|
||||||
|
"CodexMovies",
|
||||||
|
"RinzryMovies",
|
||||||
|
"EdithxMovies",
|
||||||
|
"XtremeMovies",
|
||||||
|
"PapaonMovies[1]",
|
||||||
|
"PapaonMovies[2]",
|
||||||
|
)
|
||||||
|
|
||||||
|
val lockedIndex = arrayOf(
|
||||||
|
"CodexMovies",
|
||||||
|
"EdithxMovies",
|
||||||
|
)
|
||||||
|
|
||||||
|
val mkvIndex = arrayOf(
|
||||||
|
"EdithxMovies"
|
||||||
|
)
|
||||||
|
|
||||||
|
val untrimmedIndex = arrayOf(
|
||||||
|
"PapaonMovies[1]",
|
||||||
|
"PapaonMovies[2]",
|
||||||
|
"EdithxMovies",
|
||||||
|
)
|
||||||
|
|
||||||
data class FilmxyCookies(
|
data class FilmxyCookies(
|
||||||
val phpsessid: String? = null,
|
val phpsessid: String? = null,
|
||||||
val wLog: String? = null,
|
val wLog: String? = null,
|
||||||
|
@ -596,7 +623,7 @@ const downloadtime = "(.*?)";
|
||||||
var arrayofworkers = (.*)""".toRegex()
|
var arrayofworkers = (.*)""".toRegex()
|
||||||
val js = app.get(
|
val js = app.get(
|
||||||
"https://geolocation.zindex.eu.org/api.js",
|
"https://geolocation.zindex.eu.org/api.js",
|
||||||
referer = "$baymovies/",
|
referer = "$baymoviesAPI/",
|
||||||
).text
|
).text
|
||||||
val match = regex.find(js) ?: throw ErrorLoadingException()
|
val match = regex.find(js) ?: throw ErrorLoadingException()
|
||||||
val country = match.groupValues[1]
|
val country = match.groupValues[1]
|
||||||
|
|
Loading…
Reference in a new issue