sora: fix soraextrators

This commit is contained in:
lisa 2023-12-21 10:39:54 +07:00
parent f05a3cfc15
commit 0695426de9
7 changed files with 53 additions and 17 deletions

View file

@ -55,6 +55,7 @@ jobs:
SFMOVIES_API: ${{ secrets.SFMOVIES_API }}
CINEMATV_API: ${{ secrets.CINEMATV_API }}
OMOVIES_API: ${{ secrets.OMOVIES_API }}
FEBBOX_API: ${{ secrets.FEBBOX_API }}
run: |
cd $GITHUB_WORKSPACE/src
echo TMDB_API=$TMDB_API >> local.properties
@ -70,6 +71,7 @@ jobs:
echo SFMOVIES_API=$SFMOVIES_API >> local.properties
echo CINEMATV_API=$CINEMATV_API >> local.properties
echo OMOVIES_API=$OMOVIES_API >> local.properties
echo FEBBOX_API=$FEBBOX_API >> local.properties
- name: Build Plugins
run: |

View file

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties
// use an integer for version numbers
version = 206
version = 207
android {
defaultConfig {
@ -9,6 +9,7 @@ android {
properties.load(project.rootProject.file("local.properties").inputStream())
buildConfigField("String", "TMDB_API", "\"${properties.getProperty("TMDB_API")}\"")
buildConfigField("String", "FEBBOX_API", "\"${properties.getProperty("FEBBOX_API")}\"")
buildConfigField("String", "OMOVIES_API", "\"${properties.getProperty("OMOVIES_API")}\"")
buildConfigField("String", "CINEMATV_API", "\"${properties.getProperty("CINEMATV_API")}\"")
buildConfigField("String", "SFMOVIES_API", "\"${properties.getProperty("SFMOVIES_API")}\"")

View file

@ -103,7 +103,6 @@ object SoraExtractor : SoraStream() {
id: Int? = null,
season: Int? = null,
episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val url = if (season == null) {
@ -1703,7 +1702,6 @@ object SoraExtractor : SoraStream() {
imdbId: String? = null,
season: Int? = null,
episode: Int? = null,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit,
) {
val url = if (season == null) {
@ -2149,8 +2147,8 @@ object SoraExtractor : SoraStream() {
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
}
val res = request(url)
val bytes = res.peekBody(1024 * 512).bytes().also { res.closeQuietly() }
val res = request(url).peekBody(1024 * 512)
val bytes = res.bytes().also { res.closeQuietly() }
val data = bytes.decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
val json = tryParseJson<BlackvidResponses>(data)
@ -2260,7 +2258,6 @@ object SoraExtractor : SoraStream() {
}
val session = "PHPSESSID=ngr4cudjrimdnhkth30ssohs0n; _csrf=a6ffd7bb7654083fce6df528225a238d0e85aa1fb885dc7638c1259ec1ba0d5ca%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%22mTTLiDLjxohs-CpKk0bjRH3HdYMB9uBV%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTime.4.0.1.$unixTime.0.0.0"
cinemaCookiesChecker(session)
val headers = mapOf(
"Cookie" to session,
@ -2314,6 +2311,35 @@ object SoraExtractor : SoraStream() {
}
suspend fun invokeFebbox(
imdbId: String? = null,
season: Int? = null,
episode: Int? = null,
callback: (ExtractorLink) -> Unit,
) {
val url = if (season == null) {
"$febboxAPI/stream/movie/$imdbId.json"
} else {
"$febboxAPI/stream/series/$imdbId:$season:$episode.json"
}
val res = request(url).body
val data = res.string().also { res.closeQuietly() }
val video = tryParseJson<FebboxResponse>(data)?.streams?.find { it.url?.startsWith("https://www.febbox.com") == true }?.url
callback.invoke(
ExtractorLink(
"Febbox",
"Febbox",
video ?: return,
"",
Qualities.P1080.value,
INFER_TYPE
)
)
}
suspend fun invokeNinetv(
tmdbId: Int? = null,
season: Int? = null,

View file

@ -461,4 +461,12 @@ data class AoneroomResponse(
)
}
}
}
data class FebboxResponse(
@JsonProperty("streams") val streams: ArrayList<Streams>? = arrayListOf(),
) {
data class Streams(
@JsonProperty("url") val url: String? = null,
)
}

View file

@ -45,6 +45,7 @@ import com.hexated.SoraExtractor.invokeUhdmovies
import com.hexated.SoraExtractor.invokeVegamovies
import com.hexated.SoraExtractor.invokeVidsrcto
import com.hexated.SoraExtractor.invokeCinemaTv
import com.hexated.SoraExtractor.invokeFebbox
import com.hexated.SoraExtractor.invokeOmovies
import com.hexated.SoraExtractor.invokeWatchsomuch
import com.hexated.SoraExtractor.invokeZshow
@ -115,6 +116,7 @@ open class SoraStream : TmdbProvider() {
const val blackvidAPI = "https://prod.api.blackvid.space"
const val showflixAPI = "https://showflix.space"
const val aoneroomAPI = "https://api3.aoneroom.com"
const val febboxAPI = BuildConfig.FEBBOX_API
const val fdMoviesAPI = "https://freedrivemovie.lol"
const val uhdmoviesAPI = "https://uhdmovies.zip"
@ -362,11 +364,10 @@ open class SoraStream : TmdbProvider() {
argamap(
{
if (!res.isAnime) invokeBlackvid(
res.id,
if (!res.isAnime) invokeFebbox(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
@ -392,7 +393,7 @@ open class SoraStream : TmdbProvider() {
)
},
{
invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
invokeVidSrc(res.id, res.season, res.episode, callback)
},
{
invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback)
@ -567,7 +568,6 @@ open class SoraStream : TmdbProvider() {
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},

View file

@ -31,6 +31,7 @@ import com.hexated.SoraExtractor.invokeShowflix
import com.hexated.SoraExtractor.invokeVidSrc
import com.hexated.SoraExtractor.invokeVidsrcto
import com.hexated.SoraExtractor.invokeCinemaTv
import com.hexated.SoraExtractor.invokeFebbox
import com.hexated.SoraExtractor.invokeOmovies
import com.hexated.SoraExtractor.invokeWatchsomuch
import com.hexated.SoraExtractor.invokeZshow
@ -53,11 +54,10 @@ class SoraStreamLite : SoraStream() {
argamap(
{
if (!res.isAnime) invokeBlackvid(
res.id,
if (!res.isAnime) invokeFebbox(
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},
@ -100,7 +100,7 @@ class SoraStreamLite : SoraStream() {
)
},
{
invokeVidSrc(res.id, res.season, res.episode, subtitleCallback, callback)
invokeVidSrc(res.id, res.season, res.episode, callback)
},
{
invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback)
@ -158,7 +158,6 @@ class SoraStreamLite : SoraStream() {
res.imdbId,
res.season,
res.episode,
subtitleCallback,
callback
)
},

View file

@ -648,7 +648,7 @@ suspend fun getTvMoviesServer(url: String, season: Int?, episode: Int?): Pair<St
}
}
suspend fun cinemaCookiesChecker(session: String) = cinemaCookiesChecker ?: fetchCinemaCookiesChecker(session).also { cinemaCookiesChecker = it }
suspend fun refreshCinemaCookies(session: String) = cinemaCookiesChecker ?: fetchCinemaCookiesChecker(session).also { cinemaCookiesChecker = it }
suspend fun fetchCinemaCookiesChecker(session: String): Boolean {
val wiwiApi = base64Decode("aHR0cHM6Ly9jaW5lbWEud2l3aWNlbnRlci5jb20=")