mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: added Aoneroom
This commit is contained in:
parent
a90648fa79
commit
15f99b4ddf
8 changed files with 167 additions and 28 deletions
|
@ -42,10 +42,7 @@ class Hdmovie2 : Movierulzhd() {
|
|||
callback
|
||||
)
|
||||
} else {
|
||||
var document = app.get(data).document
|
||||
if (document.select("title").text() == "Just a moment...") {
|
||||
document = app.get(data).document
|
||||
}
|
||||
val document = app.get(data).document
|
||||
val id = document.select("meta#dooplay-ajax-counter").attr("data-postid")
|
||||
val type = if (data.contains("/movies/")) "movie" else "tv"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import org.jetbrains.kotlin.konan.properties.Properties
|
||||
|
||||
// use an integer for version numbers
|
||||
version = 204
|
||||
version = 205
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
|
|
|
@ -401,3 +401,8 @@ class Embedwish : Filesim() {
|
|||
class Vidplay2 : Vidplay() {
|
||||
override val mainUrl = "https://vidplay.online"
|
||||
}
|
||||
|
||||
class Flaswish : Filesim() {
|
||||
override val name = "Flaswish"
|
||||
override var mainUrl = "https://flaswish.com"
|
||||
}
|
|
@ -236,6 +236,7 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
|
||||
suspend fun invokeMultimovies(
|
||||
apiUrl: String,
|
||||
title: String? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
|
@ -244,11 +245,82 @@ object SoraExtractor : SoraStream() {
|
|||
) {
|
||||
val fixTitle = title.createSlug()
|
||||
val url = if (season == null) {
|
||||
"$multimoviesAPI/movies/$fixTitle"
|
||||
"$apiUrl/movies/$fixTitle"
|
||||
} else {
|
||||
"$multimoviesAPI/episodes/$fixTitle-${season}x${episode}"
|
||||
"$apiUrl/episodes/$fixTitle-${season}x${episode}"
|
||||
}
|
||||
invokeWpmovies(null, url, subtitleCallback, callback)
|
||||
val req = app.get(url)
|
||||
val directUrl = getBaseUrl(req.url)
|
||||
val iframe = req.document.selectFirst("div.pframe iframe")?.attr("src") ?: return
|
||||
if(!iframe.contains("youtube")) {
|
||||
loadExtractor(iframe, "$directUrl/", subtitleCallback) { link ->
|
||||
if(link.quality == Qualities.Unknown.value) {
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
link.source,
|
||||
link.name,
|
||||
link.url,
|
||||
link.referer,
|
||||
Qualities.P1080.value,
|
||||
link.type,
|
||||
link.headers,
|
||||
link.extractorData
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
suspend fun invokeAoneroom(
|
||||
title: String? = null,
|
||||
year: Int? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
val headers = mapOf(
|
||||
"Authorization" to "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOjcyODc3MjQ5OTg4MzA0NzM5NzYsInV0cCI6MSwiZXhwIjoxNzEwMzg4NzczLCJpYXQiOjE3MDI2MTI3NzN9.Myt-gVHfPfQFbFyRX3WXtiiwvRzDwBrXTEKy1l-GDRU"
|
||||
)
|
||||
val subjectId = app.post(
|
||||
"$aoneroomAPI/wefeed-mobile-bff/subject-api/search", data = mapOf(
|
||||
"page" to "1",
|
||||
"perPage" to "10",
|
||||
"keyword" to "$title",
|
||||
"subjectType" to if (season == null) "1" else "2",
|
||||
), headers = headers
|
||||
).parsedSafe<AoneroomResponse>()?.data?.items?.find {
|
||||
it.title.equals(title, true) && it.releaseDate?.substringBefore("-") == "$year"
|
||||
}?.subjectId
|
||||
|
||||
val data = app.get(
|
||||
"$aoneroomAPI/wefeed-mobile-bff/subject-api/resource?subjectId=${subjectId ?: return}&page=1&perPage=10000&all=0&startPosition=1&endPosition=1&pagerMode=0&resolution=480",
|
||||
headers = headers
|
||||
).parsedSafe<AoneroomResponse>()?.data?.list?.findLast {
|
||||
it.se == (season ?: 0) && it.ep == (episode ?: 0)
|
||||
}
|
||||
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
"Aoneroom",
|
||||
"Aoneroom",
|
||||
data?.resourceLink ?: return,
|
||||
"",
|
||||
data.resolution ?: Qualities.Unknown.value,
|
||||
INFER_TYPE
|
||||
)
|
||||
)
|
||||
|
||||
data.extCaptions?.map { sub ->
|
||||
subtitleCallback.invoke(
|
||||
SubtitleFile(
|
||||
sub.lanName ?: return@map,
|
||||
sub.url ?: return@map,
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
suspend fun invokeNetmovies(
|
||||
|
@ -733,15 +805,16 @@ object SoraExtractor : SoraStream() {
|
|||
res.first().id to res.first().title
|
||||
} else {
|
||||
val data = res.find {
|
||||
val slugTitle = it.title.createSlug()
|
||||
val slugTitle = it.title.createSlug() ?: return
|
||||
when {
|
||||
season == null -> slugTitle?.equals(slug) == true
|
||||
lastSeason == 1 -> slugTitle?.contains(slug) == true
|
||||
else -> slugTitle?.contains(slug) == true && it.title?.contains(
|
||||
"Season $season", true
|
||||
) == true
|
||||
}
|
||||
season == null -> slugTitle == slug
|
||||
lastSeason == 1 -> slugTitle.contains(slug)
|
||||
else -> (slugTitle.contains(slug) && it.title?.contains(
|
||||
"Season $season",
|
||||
true
|
||||
) == true)
|
||||
}
|
||||
} ?: res.find { it.title.equals(title) }
|
||||
data?.id to data?.title
|
||||
}
|
||||
|
||||
|
@ -1003,15 +1076,18 @@ object SoraExtractor : SoraStream() {
|
|||
val driveReq = app.get(driveLink)
|
||||
val driveRes = driveReq.document
|
||||
val bitLink = driveRes.select("a.btn.btn-outline-success").attr("href")
|
||||
val insLink = driveRes.select("a.btn.btn-danger:contains(Instant Download)").attr("href")
|
||||
val insLink =
|
||||
driveRes.select("a.btn.btn-danger:contains(Instant Download)").attr("href")
|
||||
val downloadLink = when {
|
||||
insLink.isNotEmpty() -> extractInstantUHD(insLink)
|
||||
driveRes.select("button.btn.btn-success").text()
|
||||
.contains("Direct Download", true) -> extractDirectUHD(driveLink, driveReq)
|
||||
|
||||
bitLink.isNullOrEmpty() -> {
|
||||
val backupIframe = driveRes.select("a.btn.btn-outline-warning").attr("href")
|
||||
extractBackupUHD(backupIframe ?: return@apmap)
|
||||
}
|
||||
|
||||
else -> {
|
||||
extractMirrorUHD(bitLink, base)
|
||||
}
|
||||
|
@ -1091,7 +1167,8 @@ object SoraExtractor : SoraStream() {
|
|||
1 -> "Season 1"
|
||||
else -> "Season 1 – $lastSeason"
|
||||
}
|
||||
val media = res.selectFirst("div.blog-items article:has(h3.entry-title:matches((?i)$title.*$match)) a")
|
||||
val media =
|
||||
res.selectFirst("div.blog-items article:has(h3.entry-title:matches((?i)$title.*$match)) a")
|
||||
?.attr("href")
|
||||
|
||||
res = app.get(media ?: return).document
|
||||
|
@ -2070,8 +2147,8 @@ object SoraExtractor : SoraStream() {
|
|||
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
|
||||
}
|
||||
|
||||
val data = request(url,).peekBody(1024 * 512).source().buffer.readByteArray()
|
||||
.decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
|
||||
val res = request(url).peekBody(1024 * 512)
|
||||
val data = res.source().buffer.readByteArray().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
|
||||
val json = tryParseJson<BlackvidResponses>(data)
|
||||
|
||||
json?.sources?.map { source ->
|
||||
|
@ -2179,7 +2256,8 @@ object SoraExtractor : SoraStream() {
|
|||
"$cinemaTvAPI/shows/play/$id-$slug-$year"
|
||||
}
|
||||
|
||||
val specialCookies = "PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTime.4.0.1.$unixTime.0.0.0"
|
||||
val specialCookies =
|
||||
"PHPSESSID=e555h63ilisoj2l6j7b5d4jb6p; _csrf=9597150e45f485ad9c4f2e06a2572534d8415337eda9d48d0ecfa25b73b6a9e1a%3A2%3A%7Bi%3A0%3Bs%3A5%3A%22_csrf%22%3Bi%3A1%3Bs%3A32%3A%222HcnegjGB0nX205FAUPb86fqMx9HWIF1%22%3B%7D; _ga=GA1.1.1195498587.1701871187; _ga_VZD7HJ3WK6=GS1.1.$unixTime.4.0.1.$unixTime.0.0.0"
|
||||
val headers = mapOf(
|
||||
"Cookie" to specialCookies,
|
||||
"Connection" to "keep-alive",
|
||||
|
|
|
@ -434,3 +434,31 @@ data class SmashyDSourcesUrls(
|
|||
@JsonProperty("file") var file: String? = null,
|
||||
@JsonProperty("title") var title: String? = null,
|
||||
)
|
||||
|
||||
data class AoneroomResponse(
|
||||
@JsonProperty("data") val data: Data? = null,
|
||||
) {
|
||||
data class Data(
|
||||
@JsonProperty("items") val items: ArrayList<Items>? = arrayListOf(),
|
||||
@JsonProperty("list") val list: ArrayList<List>? = arrayListOf(),
|
||||
) {
|
||||
data class Items(
|
||||
@JsonProperty("subjectId") val subjectId: String? = null,
|
||||
@JsonProperty("title") val title: String? = null,
|
||||
@JsonProperty("releaseDate") val releaseDate: String? = null,
|
||||
)
|
||||
|
||||
data class List(
|
||||
@JsonProperty("resourceLink") val resourceLink: String? = null,
|
||||
@JsonProperty("extCaptions") val extCaptions: ArrayList<ExtCaptions>? = arrayListOf(),
|
||||
@JsonProperty("se") val se: Int? = null,
|
||||
@JsonProperty("ep") val ep: Int? = null,
|
||||
@JsonProperty("resolution") val resolution: Int? = null,
|
||||
) {
|
||||
data class ExtCaptions(
|
||||
@JsonProperty("lanName") val lanName: String? = null,
|
||||
@JsonProperty("url") val url: String? = null,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ package com.hexated
|
|||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.hexated.SoraExtractor.invoke2embed
|
||||
import com.hexated.SoraExtractor.invokeAnimes
|
||||
import com.hexated.SoraExtractor.invokeAoneroom
|
||||
import com.hexated.SoraExtractor.invokeBlackvid
|
||||
import com.hexated.SoraExtractor.invokeBollyMaza
|
||||
import com.hexated.SoraExtractor.invokeDbgo
|
||||
|
@ -102,7 +103,8 @@ open class SoraStream : TmdbProvider() {
|
|||
const val ridomoviesAPI = "https://ridomovies.pw"
|
||||
const val navyAPI = "https://navy-issue-i-239.site"
|
||||
const val emoviesAPI = "https://emovies.si"
|
||||
const val multimoviesAPI = "https://multimovies.live"
|
||||
const val multimoviesAPI = "https://multimovies.top"
|
||||
const val multimovies2API = "https://multimovies.click"
|
||||
const val netmoviesAPI = "https://netmovies.to"
|
||||
const val momentAPI = "https://izzillent-dickstonyx-i-262.site"
|
||||
const val doomoviesAPI = "https://doomovies.net"
|
||||
|
@ -112,6 +114,7 @@ open class SoraStream : TmdbProvider() {
|
|||
const val watchflxAPI = "https://watchflx.tv"
|
||||
const val blackvidAPI = "https://prod.api.blackvid.space"
|
||||
const val showflixAPI = "https://showflix.space"
|
||||
const val aoneroomAPI = "https://api3.aoneroom.com"
|
||||
|
||||
const val fdMoviesAPI = "https://freedrivemovie.lol"
|
||||
const val uhdmoviesAPI = "https://uhdmovies.zip"
|
||||
|
@ -391,6 +394,16 @@ open class SoraStream : TmdbProvider() {
|
|||
{
|
||||
invokeDbgo(res.imdbId, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeAoneroom(
|
||||
res.title,
|
||||
res.airedYear ?: res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
if (res.isAnime) invokeAnimes(
|
||||
res.title,
|
||||
|
@ -641,7 +654,10 @@ open class SoraStream : TmdbProvider() {
|
|||
)
|
||||
},
|
||||
{
|
||||
invokeMultimovies(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
if(res.isBollywood) invokeMultimovies(multimoviesAPI, res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
if(res.isBollywood) invokeMultimovies(multimovies2API, res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
invokeNetmovies(
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.hexated
|
|||
|
||||
import com.hexated.SoraExtractor.invoke2embed
|
||||
import com.hexated.SoraExtractor.invokeAnimes
|
||||
import com.hexated.SoraExtractor.invokeAoneroom
|
||||
import com.hexated.SoraExtractor.invokeBlackvid
|
||||
import com.hexated.SoraExtractor.invokeDbgo
|
||||
import com.hexated.SoraExtractor.invokeDoomovies
|
||||
|
@ -221,6 +222,16 @@ class SoraStreamLite : SoraStream() {
|
|||
{
|
||||
if (!res.isAnime) invokeNowTv(res.id, res.imdbId, res.season, res.episode, callback)
|
||||
},
|
||||
{
|
||||
if (!res.isAnime) invokeAoneroom(
|
||||
res.title,
|
||||
res.airedYear ?: res.year,
|
||||
res.season,
|
||||
res.episode,
|
||||
subtitleCallback,
|
||||
callback
|
||||
)
|
||||
},
|
||||
{
|
||||
invokeNavy(res.imdbId, res.season, res.episode, callback)
|
||||
},
|
||||
|
@ -242,7 +253,10 @@ class SoraStreamLite : SoraStream() {
|
|||
)
|
||||
},
|
||||
{
|
||||
invokeMultimovies(res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
if(res.isBollywood) invokeMultimovies(multimoviesAPI, res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
if(res.isBollywood) invokeMultimovies(multimovies2API, res.title, res.season, res.episode, subtitleCallback, callback)
|
||||
},
|
||||
{
|
||||
invokeNetmovies(
|
||||
|
|
|
@ -29,5 +29,6 @@ class SoraStreamPlugin: Plugin() {
|
|||
registerExtractorAPI(Uploadever())
|
||||
registerExtractorAPI(Netembed())
|
||||
registerExtractorAPI(Vidplay2())
|
||||
registerExtractorAPI(Flaswish())
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue