mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
rebahin: update domain
This commit is contained in:
parent
01899b2b8c
commit
f3f8c8e59a
5 changed files with 337 additions and 496 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 7
|
version = 8
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -3,7 +3,7 @@ package com.hexated
|
||||||
import com.lagradost.cloudstream3.TvType
|
import com.lagradost.cloudstream3.TvType
|
||||||
|
|
||||||
class Cgvindo : RebahinProvider() {
|
class Cgvindo : RebahinProvider() {
|
||||||
override var mainUrl = "http://cgvindo.click"
|
override var mainUrl = "http://cgvindo.ink"
|
||||||
override var name = "Cgvindo"
|
override var name = "Cgvindo"
|
||||||
|
|
||||||
}
|
}
|
|
@ -6,14 +6,14 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.addActors
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.mvvm.safeApiCall
|
import com.lagradost.cloudstream3.mvvm.safeApiCall
|
||||||
import com.lagradost.cloudstream3.network.WebViewResolver
|
|
||||||
import com.lagradost.cloudstream3.utils.*
|
import com.lagradost.cloudstream3.utils.*
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
open class RebahinProvider : MainAPI() {
|
open class RebahinProvider : MainAPI() {
|
||||||
override var mainUrl = "http://179.43.163.50"
|
override var mainUrl = "http://179.43.163.51"
|
||||||
|
private var directUrl: String? = null
|
||||||
override var name = "Rebahin"
|
override var name = "Rebahin"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
override var lang = "id"
|
override var lang = "id"
|
||||||
|
@ -97,8 +97,9 @@ open class RebahinProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse {
|
override suspend fun load(url: String): LoadResponse {
|
||||||
val document = app.get(url).document
|
val req = app.get(url)
|
||||||
|
directUrl = getBaseUrl(req.url)
|
||||||
|
val document = req.document
|
||||||
val title = document.selectFirst("h3[itemprop=name]")!!.ownText().trim()
|
val title = document.selectFirst("h3[itemprop=name]")!!.ownText().trim()
|
||||||
val poster = document.select(".mvic-desc > div.thumb.mvic-thumb").attr("style")
|
val poster = document.select(".mvic-desc > div.thumb.mvic-thumb").attr("style")
|
||||||
.substringAfter("url(").substringBeforeLast(")")
|
.substringAfter("url(").substringBeforeLast(")")
|
||||||
|
@ -157,12 +158,30 @@ open class RebahinProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getLanguage(str: String): String {
|
override suspend fun loadLinks(
|
||||||
return when {
|
data: String,
|
||||||
str.contains("indonesia", true) || str.contains("bahasa", true) -> "Indonesian"
|
isCasting: Boolean,
|
||||||
else -> str
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
): Boolean {
|
||||||
|
|
||||||
|
data.removeSurrounding("[", "]").split(",").map { it.trim() }.apmap { link ->
|
||||||
|
safeApiCall {
|
||||||
|
when {
|
||||||
|
link.startsWith(mainServer) -> invokeLokalSource(
|
||||||
|
link,
|
||||||
|
subtitleCallback,
|
||||||
|
callback
|
||||||
|
)
|
||||||
|
else -> {
|
||||||
|
loadExtractor(link, "$directUrl/", subtitleCallback, callback)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
private suspend fun invokeLokalSource(
|
private suspend fun invokeLokalSource(
|
||||||
url: String,
|
url: String,
|
||||||
|
@ -172,7 +191,7 @@ open class RebahinProvider : MainAPI() {
|
||||||
val document = app.get(
|
val document = app.get(
|
||||||
url,
|
url,
|
||||||
allowRedirects = false,
|
allowRedirects = false,
|
||||||
referer = mainUrl,
|
referer = directUrl,
|
||||||
headers = mapOf("Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8")
|
headers = mapOf("Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8")
|
||||||
).document
|
).document
|
||||||
|
|
||||||
|
@ -204,82 +223,17 @@ open class RebahinProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun invokeKotakAjairSource(
|
private fun getLanguage(str: String): String {
|
||||||
url: String,
|
return when {
|
||||||
subCallback: (SubtitleFile) -> Unit,
|
str.contains("indonesia", true) || str.contains("bahasa", true) -> "Indonesian"
|
||||||
sourceCallback: (ExtractorLink) -> Unit
|
else -> str
|
||||||
) {
|
|
||||||
val domainUrl = "https://kotakajair.xyz"
|
|
||||||
val id = url.trimEnd('/').split("/").last()
|
|
||||||
val sources = app.post(
|
|
||||||
url = "$domainUrl/api/source/$id",
|
|
||||||
data = mapOf("r" to mainUrl, "d" to URI(url).host)
|
|
||||||
).parsed<ResponseKotakAjair>()
|
|
||||||
|
|
||||||
sources.data?.map {
|
|
||||||
sourceCallback.invoke(
|
|
||||||
ExtractorLink(
|
|
||||||
name,
|
|
||||||
"KotakAjair",
|
|
||||||
fixUrl(it.file),
|
|
||||||
referer = url,
|
|
||||||
quality = getQualityFromName(it.label)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
val userData = sources.player.poster_file.split("/")[2]
|
|
||||||
sources.captions?.map {
|
|
||||||
subCallback.invoke(
|
|
||||||
SubtitleFile(
|
|
||||||
getLanguage(it.language),
|
|
||||||
"$domainUrl/asset/userdata/$userData/caption/${it.hash}/${it.id}.srt"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override suspend fun loadLinks(
|
|
||||||
data: String,
|
|
||||||
isCasting: Boolean,
|
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
|
||||||
callback: (ExtractorLink) -> Unit
|
|
||||||
): Boolean {
|
|
||||||
|
|
||||||
data.removeSurrounding("[", "]").split(",").map { it.trim() }.apmap { link ->
|
|
||||||
safeApiCall {
|
|
||||||
when {
|
|
||||||
link.startsWith(mainServer) -> invokeLokalSource(
|
|
||||||
link,
|
|
||||||
subtitleCallback,
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
link.startsWith("https://kotakajair.xyz") -> invokeKotakAjairSource(
|
|
||||||
link,
|
|
||||||
subtitleCallback,
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
else -> {
|
|
||||||
loadExtractor(link, "$mainUrl/", subtitleCallback, callback)
|
|
||||||
if (link.startsWith("https://sbfull.com")) {
|
|
||||||
val response = app.get(
|
|
||||||
link, interceptor = WebViewResolver(
|
|
||||||
Regex("""\.srt""")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
subtitleCallback.invoke(
|
|
||||||
SubtitleFile(
|
|
||||||
"Indonesian",
|
|
||||||
response.url
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
private fun getBaseUrl(url: String): String {
|
||||||
|
return URI(url).let {
|
||||||
|
"${it.scheme}://${it.host}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private data class Tracks(
|
private data class Tracks(
|
||||||
|
@ -288,27 +242,5 @@ open class RebahinProvider : MainAPI() {
|
||||||
@JsonProperty("kind") val kind: String? = null
|
@JsonProperty("kind") val kind: String? = null
|
||||||
)
|
)
|
||||||
|
|
||||||
private data class Captions(
|
|
||||||
@JsonProperty("id") val id: String,
|
|
||||||
@JsonProperty("hash") val hash: String,
|
|
||||||
@JsonProperty("language") val language: String,
|
|
||||||
)
|
|
||||||
|
|
||||||
private data class Data(
|
|
||||||
@JsonProperty("file") val file: String,
|
|
||||||
@JsonProperty("label") val label: String,
|
|
||||||
)
|
|
||||||
|
|
||||||
private data class Player(
|
|
||||||
@JsonProperty("poster_file") val poster_file: String,
|
|
||||||
)
|
|
||||||
|
|
||||||
private data class ResponseKotakAjair(
|
|
||||||
@JsonProperty("success") val success: Boolean,
|
|
||||||
@JsonProperty("player") val player: Player,
|
|
||||||
@JsonProperty("data") val data: List<Data>?,
|
|
||||||
@JsonProperty("captions") val captions: List<Captions>?
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,7 @@ object SoraExtractor : SoraStream() {
|
||||||
ele.select("div.info-split > div:nth-child(2)").text().substringAfter("SS")
|
ele.select("div.info-split > div:nth-child(2)").text().substringAfter("SS")
|
||||||
.substringBefore("/").trim().toIntOrNull()
|
.substringBefore("/").trim().toIntOrNull()
|
||||||
(titleMedia.equals(title, true) || titleMedia.createSlug()
|
(titleMedia.equals(title, true) || titleMedia.createSlug()
|
||||||
.equals(titleSlug) || url?.contains("$titleSlug-") == true) &&
|
.equals(titleSlug) || url?.contains("$titleSlug-") == true) && (if (season == null) {
|
||||||
(if (season == null) {
|
|
||||||
yearMedia == year && url?.contains("/movie/") == true
|
yearMedia == year && url?.contains("/movie/") == true
|
||||||
} else {
|
} else {
|
||||||
lastSeasonMedia == lastSeason && url?.contains("/series/") == true
|
lastSeasonMedia == lastSeason && url?.contains("/series/") == true
|
||||||
|
@ -59,13 +58,11 @@ object SoraExtractor : SoraStream() {
|
||||||
val serversId = if (season == null) {
|
val serversId = if (season == null) {
|
||||||
val movieId = app.get(
|
val movieId = app.get(
|
||||||
fixUrl(
|
fixUrl(
|
||||||
media.selectFirst("a")?.attr("href") ?: return,
|
media.selectFirst("a")?.attr("href") ?: return, gokuAPI
|
||||||
gokuAPI
|
|
||||||
)
|
)
|
||||||
).url.substringAfterLast("/")
|
).url.substringAfterLast("/")
|
||||||
app.get(
|
app.get(
|
||||||
"$gokuAPI/ajax/movie/episode/servers/$movieId",
|
"$gokuAPI/ajax/movie/episode/servers/$movieId", headers = headers
|
||||||
headers = headers
|
|
||||||
).document.getServers()
|
).document.getServers()
|
||||||
} else {
|
} else {
|
||||||
val seasonId = app.get(
|
val seasonId = app.get(
|
||||||
|
@ -74,17 +71,14 @@ object SoraExtractor : SoraStream() {
|
||||||
}", headers = headers
|
}", headers = headers
|
||||||
).document.select("a.ss-item").find { it.ownText().equals("Season $season", true) }
|
).document.select("a.ss-item").find { it.ownText().equals("Season $season", true) }
|
||||||
?.attr("data-id")
|
?.attr("data-id")
|
||||||
val episodeId =
|
val episodeId = app.get(
|
||||||
app.get(
|
"$gokuAPI/ajax/movie/season/episodes/${seasonId ?: return}", headers = headers
|
||||||
"$gokuAPI/ajax/movie/season/episodes/${seasonId ?: return}",
|
|
||||||
headers = headers
|
|
||||||
).document.select("div.item").find {
|
).document.select("div.item").find {
|
||||||
it.selectFirst("strong")?.text().equals("Eps $episode:", true)
|
it.selectFirst("strong")?.text().equals("Eps $episode:", true)
|
||||||
}?.selectFirst("a")?.attr("data-id")
|
}?.selectFirst("a")?.attr("data-id")
|
||||||
|
|
||||||
app.get(
|
app.get(
|
||||||
"$gokuAPI/ajax/movie/episode/servers/${episodeId ?: return}",
|
"$gokuAPI/ajax/movie/episode/servers/${episodeId ?: return}", headers = headers
|
||||||
headers = headers
|
|
||||||
).document.getServers()
|
).document.getServers()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,20 +109,7 @@ object SoraExtractor : SoraStream() {
|
||||||
"$vidSrcAPI/embed/$id/${season}-${episode}"
|
"$vidSrcAPI/embed/$id/${season}-${episode}"
|
||||||
}
|
}
|
||||||
|
|
||||||
loadExtractor(url, null, subtitleCallback) { link ->
|
loadCustomExtractor(null, url, null, subtitleCallback, callback, Qualities.P1080.value)
|
||||||
callback.invoke(
|
|
||||||
ExtractorLink(
|
|
||||||
link.name,
|
|
||||||
link.name,
|
|
||||||
link.url,
|
|
||||||
link.referer,
|
|
||||||
if (link.name == "VidSrc") Qualities.P1080.value else link.quality,
|
|
||||||
link.type,
|
|
||||||
link.headers,
|
|
||||||
link.extractorData
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokeDbgo(
|
suspend fun invokeDbgo(
|
||||||
|
@ -167,8 +148,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
val ref = getBaseUrl(iframeDbgo)
|
val ref = getBaseUrl(iframeDbgo)
|
||||||
decryptStreamUrl(source).split(",").map { links ->
|
decryptStreamUrl(source).split(",").map { links ->
|
||||||
val quality =
|
val quality = Regex("\\[(\\d*p.*?)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
||||||
Regex("\\[(\\d*p.*?)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
|
||||||
?: return@map null
|
?: return@map null
|
||||||
links.replace("[$quality]", "").split(" or ").map { it.trim() }.map { link ->
|
links.replace("[$quality]", "").split(" or ").map { it.trim() }.map { link ->
|
||||||
val name = if (link.contains(".m3u8")) "Dbgo (Main)" else "Dbgo (Backup)"
|
val name = if (link.contains(".m3u8")) "Dbgo (Main)" else "Dbgo (Backup)"
|
||||||
|
@ -291,21 +271,23 @@ object SoraExtractor : SoraStream() {
|
||||||
fun String.fixBloat(): String {
|
fun String.fixBloat(): String {
|
||||||
return this.replace("\"", "").replace("\\", "")
|
return this.replace("\"", "").replace("\\", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
val res = app.get(url ?: return)
|
val res = app.get(url ?: return)
|
||||||
val referer = getBaseUrl(res.url)
|
val referer = getBaseUrl(res.url)
|
||||||
val document = res.document
|
val document = res.document
|
||||||
document.select("ul#playeroptionsul > li").map {
|
document.select("ul#playeroptionsul > li").map {
|
||||||
Triple(
|
Triple(
|
||||||
it.attr("data-post"),
|
it.attr("data-post"), it.attr("data-nume"), it.attr("data-type")
|
||||||
it.attr("data-nume"),
|
|
||||||
it.attr("data-type")
|
|
||||||
)
|
)
|
||||||
}.apmap { (id, nume, type) ->
|
}.apmap { (id, nume, type) ->
|
||||||
delay(1000)
|
delay(1000)
|
||||||
val json = app.post(
|
val json = app.post(
|
||||||
url = "$referer/wp-admin/admin-ajax.php", data = mapOf(
|
url = "$referer/wp-admin/admin-ajax.php",
|
||||||
|
data = mapOf(
|
||||||
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
|
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
|
||||||
), headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest"), referer = url
|
),
|
||||||
|
headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest"),
|
||||||
|
referer = url
|
||||||
)
|
)
|
||||||
val source = tryParseJson<ResponseHash>(json.text)?.let {
|
val source = tryParseJson<ResponseHash>(json.text)?.let {
|
||||||
when {
|
when {
|
||||||
|
@ -313,11 +295,10 @@ object SoraExtractor : SoraStream() {
|
||||||
val meta = tryParseJson<ZShowEmbed>(it.embed_url)?.meta ?: return@apmap
|
val meta = tryParseJson<ZShowEmbed>(it.embed_url)?.meta ?: return@apmap
|
||||||
val key = generateWpKey(it.key ?: return@apmap, meta)
|
val key = generateWpKey(it.key ?: return@apmap, meta)
|
||||||
cryptoAESHandler(
|
cryptoAESHandler(
|
||||||
it.embed_url,
|
it.embed_url, key.toByteArray(), false
|
||||||
key.toByteArray(),
|
|
||||||
false
|
|
||||||
)?.fixBloat()
|
)?.fixBloat()
|
||||||
}
|
}
|
||||||
|
|
||||||
fixIframe -> Jsoup.parse(it.embed_url).select("IFRAME").attr("SRC")
|
fixIframe -> Jsoup.parse(it.embed_url).select("IFRAME").attr("SRC")
|
||||||
else -> it.embed_url
|
else -> it.embed_url
|
||||||
}
|
}
|
||||||
|
@ -340,9 +321,7 @@ object SoraExtractor : SoraStream() {
|
||||||
.filter { element -> element.select("span.flag img").attr("src").contains("/en.") }
|
.filter { element -> element.select("span.flag img").attr("src").contains("/en.") }
|
||||||
.map {
|
.map {
|
||||||
Triple(
|
Triple(
|
||||||
it.attr("data-post"),
|
it.attr("data-post"), it.attr("data-nume"), it.attr("data-type")
|
||||||
it.attr("data-nume"),
|
|
||||||
it.attr("data-type")
|
|
||||||
)
|
)
|
||||||
}.apmap { (id, nume, type) ->
|
}.apmap { (id, nume, type) ->
|
||||||
val source = app.get(
|
val source = app.get(
|
||||||
|
@ -540,23 +519,14 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
servers.filter { it.first == "720p" || it.first == "1080p" }.apmap {
|
servers.filter { it.first == "720p" || it.first == "1080p" }.apmap {
|
||||||
val server = if (it.third.startsWith("https://ouo")) bypassOuo(it.third) else it.third
|
val server = if (it.third.startsWith("https://ouo")) bypassOuo(it.third) else it.third
|
||||||
loadExtractor(server ?: return@apmap, "$dramadayAPI/", subtitleCallback) { link ->
|
loadCustomTagExtractor(
|
||||||
callback.invoke(
|
it.second,
|
||||||
ExtractorLink(
|
server ?: return@apmap,
|
||||||
link.source,
|
"$dramadayAPI/",
|
||||||
"${link.name} ${it.second}",
|
subtitleCallback,
|
||||||
link.url,
|
callback,
|
||||||
link.referer,
|
getQualityFromName(it.first)
|
||||||
when (link.type) {
|
|
||||||
ExtractorLinkType.M3U8 -> link.quality
|
|
||||||
else -> getQualityFromName(it.first)
|
|
||||||
},
|
|
||||||
link.type,
|
|
||||||
link.headers,
|
|
||||||
link.extractorData
|
|
||||||
)
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -582,8 +552,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val seasonUrl =
|
val seasonUrl =
|
||||||
res.select("ul.nav.nav-tabs.tabs-left li:matches(Season $season\$) a").attr("href")
|
res.select("ul.nav.nav-tabs.tabs-left li:matches(Season $season\$) a").attr("href")
|
||||||
val episodeUrl = app.get(
|
val episodeUrl = app.get(
|
||||||
seasonUrl,
|
seasonUrl, cookies = cookies
|
||||||
cookies = cookies
|
|
||||||
).document.select("div.thumb-nail-list a:contains(${epsSlug.second}:)").attr("href")
|
).document.select("div.thumb-nail-list a:contains(${epsSlug.second}:)").attr("href")
|
||||||
app.get(episodeUrl, cookies = cookies).document.selectFirst("iframe.movie_player")
|
app.get(episodeUrl, cookies = cookies).document.selectFirst("iframe.movie_player")
|
||||||
?.attr("src")
|
?.attr("src")
|
||||||
|
@ -623,8 +592,7 @@ object SoraExtractor : SoraStream() {
|
||||||
app.get("$kimcartoonAPI/Cartoon/$fixTitle").document
|
app.get("$kimcartoonAPI/Cartoon/$fixTitle").document
|
||||||
} else {
|
} else {
|
||||||
val res = app.get("$kimcartoonAPI/Cartoon/$fixTitle-Season-$season")
|
val res = app.get("$kimcartoonAPI/Cartoon/$fixTitle-Season-$season")
|
||||||
if (res.url == "$kimcartoonAPI/")
|
if (res.url == "$kimcartoonAPI/") app.get("$kimcartoonAPI/Cartoon/$fixTitle-Season-0$season").document else res.document
|
||||||
app.get("$kimcartoonAPI/Cartoon/$fixTitle-Season-0$season").document else res.document
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val iframe = if (season == null) {
|
val iframe = if (season == null) {
|
||||||
|
@ -661,8 +629,7 @@ object SoraExtractor : SoraStream() {
|
||||||
json.subtitlingList?.map { sub ->
|
json.subtitlingList?.map { sub ->
|
||||||
subtitleCallback.invoke(
|
subtitleCallback.invoke(
|
||||||
SubtitleFile(
|
SubtitleFile(
|
||||||
getVipLanguage(sub.languageAbbr ?: return@map),
|
getVipLanguage(sub.languageAbbr ?: return@map), sub.subtitlingUrl ?: return@map
|
||||||
sub.subtitlingUrl ?: return@map
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -687,8 +654,7 @@ object SoraExtractor : SoraStream() {
|
||||||
tryParseJson<List<FmoviesSubtitles>>(subtitles)?.map {
|
tryParseJson<List<FmoviesSubtitles>>(subtitles)?.map {
|
||||||
subtitleCallback.invoke(
|
subtitleCallback.invoke(
|
||||||
SubtitleFile(
|
SubtitleFile(
|
||||||
it.label ?: "",
|
it.label ?: "", it.file ?: return@map
|
||||||
it.file ?: return@map
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -725,8 +691,7 @@ object SoraExtractor : SoraStream() {
|
||||||
season == null -> slugTitle?.equals(slug) == true
|
season == null -> slugTitle?.equals(slug) == true
|
||||||
lastSeason == 1 -> slugTitle?.contains(slug) == true
|
lastSeason == 1 -> slugTitle?.contains(slug) == true
|
||||||
else -> slugTitle?.contains(slug) == true && it.title?.contains(
|
else -> slugTitle?.contains(slug) == true && it.title?.contains(
|
||||||
"Season $season",
|
"Season $season", true
|
||||||
true
|
|
||||||
) == true
|
) == true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -752,10 +717,7 @@ object SoraExtractor : SoraStream() {
|
||||||
listOf(source.video, source.thirdParty).apmap { link ->
|
listOf(source.video, source.thirdParty).apmap { link ->
|
||||||
if (link?.contains(".m3u8") == true) {
|
if (link?.contains(".m3u8") == true) {
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
"Kisskh",
|
"Kisskh", link, "$kissKhAPI/", headers = mapOf("Origin" to kissKhAPI)
|
||||||
link,
|
|
||||||
"$kissKhAPI/",
|
|
||||||
headers = mapOf("Origin" to kissKhAPI)
|
|
||||||
).forEach(callback)
|
).forEach(callback)
|
||||||
} else {
|
} else {
|
||||||
loadExtractor(
|
loadExtractor(
|
||||||
|
@ -793,31 +755,18 @@ object SoraExtractor : SoraStream() {
|
||||||
) {
|
) {
|
||||||
|
|
||||||
val (aniId, malId) = convertTmdbToAnimeId(
|
val (aniId, malId) = convertTmdbToAnimeId(
|
||||||
title,
|
title, date, airedDate, if (season == null) TvType.AnimeMovie else TvType.Anime
|
||||||
date,
|
|
||||||
airedDate,
|
|
||||||
if (season == null) TvType.AnimeMovie else TvType.Anime
|
|
||||||
)
|
)
|
||||||
|
|
||||||
argamap(
|
argamap({
|
||||||
{
|
|
||||||
invokeAnimetosho(malId, season, episode, subtitleCallback, callback)
|
invokeAnimetosho(malId, season, episode, subtitleCallback, callback)
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
invokeAniwatch(malId, episode, subtitleCallback, callback)
|
invokeAniwatch(malId, episode, subtitleCallback, callback)
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
if (season != null) invokeCrunchyroll(
|
if (season != null) invokeCrunchyroll(
|
||||||
aniId,
|
aniId, malId, epsTitle, season, episode, subtitleCallback, callback
|
||||||
malId,
|
|
||||||
epsTitle,
|
|
||||||
season,
|
|
||||||
episode,
|
|
||||||
subtitleCallback,
|
|
||||||
callback
|
|
||||||
)
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun invokeAnimetosho(
|
private suspend fun invokeAnimetosho(
|
||||||
|
@ -842,7 +791,8 @@ object SoraExtractor : SoraStream() {
|
||||||
val (seasonSLug, episodeSlug) = getEpisodeSlug(season, episode)
|
val (seasonSLug, episodeSlug) = getEpisodeSlug(season, episode)
|
||||||
val jikan = app.get("$jikanAPI/anime/$malId/full").parsedSafe<JikanResponse>()?.data
|
val jikan = app.get("$jikanAPI/anime/$malId/full").parsedSafe<JikanResponse>()?.data
|
||||||
val aniId = jikan?.external?.find { it.name == "AniDB" }?.url?.substringAfterLast("=")
|
val aniId = jikan?.external?.find { it.name == "AniDB" }?.url?.substringAfterLast("=")
|
||||||
val res = app.get("$animetoshoAPI/series/${jikan?.title?.createSlug()}.$aniId?filter[0][t]=nyaa_class&filter[0][v]=trusted").document
|
val res =
|
||||||
|
app.get("$animetoshoAPI/series/${jikan?.title?.createSlug()}.$aniId?filter[0][t]=nyaa_class&filter[0][v]=trusted").document
|
||||||
|
|
||||||
val servers = if (season == null) {
|
val servers = if (season == null) {
|
||||||
res.select("div.home_list_entry:has(div.links)").getLinks()
|
res.select("div.home_list_entry:has(div.links)").getLinks()
|
||||||
|
@ -852,23 +802,9 @@ object SoraExtractor : SoraStream() {
|
||||||
}
|
}
|
||||||
|
|
||||||
servers.filter { it.third in arrayOf(Qualities.P1080.value, Qualities.P720.value) }.apmap {
|
servers.filter { it.third in arrayOf(Qualities.P1080.value, Qualities.P720.value) }.apmap {
|
||||||
loadExtractor(it.first, "$animetoshoAPI/", subtitleCallback) { link ->
|
loadCustomTagExtractor(
|
||||||
callback.invoke(
|
it.second, it.first, "$animetoshoAPI/", subtitleCallback, callback, it.third
|
||||||
ExtractorLink(
|
|
||||||
link.source,
|
|
||||||
"${link.name} [${it.second}]",
|
|
||||||
link.url,
|
|
||||||
link.referer,
|
|
||||||
when (link.type) {
|
|
||||||
ExtractorLinkType.M3U8 -> link.quality
|
|
||||||
else -> it.third
|
|
||||||
},
|
|
||||||
link.type,
|
|
||||||
link.headers,
|
|
||||||
link.extractorData
|
|
||||||
)
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -886,20 +822,16 @@ object SoraExtractor : SoraStream() {
|
||||||
.parsedSafe<MALSyncResponses>()?.sites?.zoro?.keys?.map { it }
|
.parsedSafe<MALSyncResponses>()?.sites?.zoro?.keys?.map { it }
|
||||||
animeId?.apmap { id ->
|
animeId?.apmap { id ->
|
||||||
val episodeId = app.get(
|
val episodeId = app.get(
|
||||||
"$aniwatchAPI/ajax/v2/episode/list/${id ?: return@apmap}",
|
"$aniwatchAPI/ajax/v2/episode/list/${id ?: return@apmap}", headers = headers
|
||||||
headers = headers
|
).parsedSafe<AniwatchResponses>()?.html?.let {
|
||||||
)
|
|
||||||
.parsedSafe<AniwatchResponses>()?.html?.let {
|
|
||||||
Jsoup.parse(it)
|
Jsoup.parse(it)
|
||||||
}?.select("div.ss-list a")?.find { it.attr("data-number") == "${episode ?: 1}" }
|
}?.select("div.ss-list a")?.find { it.attr("data-number") == "${episode ?: 1}" }
|
||||||
?.attr("data-id")
|
?.attr("data-id")
|
||||||
|
|
||||||
val servers =
|
val servers = app.get(
|
||||||
app.get(
|
|
||||||
"$aniwatchAPI/ajax/v2/episode/servers?episodeId=${episodeId ?: return@apmap}",
|
"$aniwatchAPI/ajax/v2/episode/servers?episodeId=${episodeId ?: return@apmap}",
|
||||||
headers = headers
|
headers = headers
|
||||||
)
|
).parsedSafe<AniwatchResponses>()?.html?.let { Jsoup.parse(it) }
|
||||||
.parsedSafe<AniwatchResponses>()?.html?.let { Jsoup.parse(it) }
|
|
||||||
?.select("div.item.server-item")?.map {
|
?.select("div.item.server-item")?.map {
|
||||||
Triple(
|
Triple(
|
||||||
it.text(),
|
it.text(),
|
||||||
|
@ -912,8 +844,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val iframe = app.get(
|
val iframe = app.get(
|
||||||
"$aniwatchAPI/ajax/v2/episode/sources?id=${server.second ?: return@servers}",
|
"$aniwatchAPI/ajax/v2/episode/sources?id=${server.second ?: return@servers}",
|
||||||
headers = headers
|
headers = headers
|
||||||
)
|
).parsedSafe<AniwatchResponses>()?.link ?: return@servers
|
||||||
.parsedSafe<AniwatchResponses>()?.link ?: return@servers
|
|
||||||
val audio = if (server.third == "sub") "Raw" else "English Dub"
|
val audio = if (server.third == "sub") "Raw" else "English Dub"
|
||||||
loadCustomExtractor(
|
loadCustomExtractor(
|
||||||
"${server.first} [$audio]",
|
"${server.first} [$audio]",
|
||||||
|
@ -1019,11 +950,9 @@ object SoraExtractor : SoraStream() {
|
||||||
if (season == null) {
|
if (season == null) {
|
||||||
it.text() to it.nextElementSibling()?.select("a")?.attr("href")
|
it.text() to it.nextElementSibling()?.select("a")?.attr("href")
|
||||||
} else {
|
} else {
|
||||||
it.text() to it.nextElementSibling()
|
it.text() to it.nextElementSibling()?.select("a")?.find { child ->
|
||||||
?.select("a")?.find { child ->
|
|
||||||
child.select("span").text().equals("Episode $episode", true)
|
child.select("span").text().equals("Episode $episode", true)
|
||||||
}
|
}?.attr("href")
|
||||||
?.attr("href")
|
|
||||||
}
|
}
|
||||||
}.filter { it.second?.contains(Regex("(https:)|(http:)")) == true }
|
}.filter { it.second?.contains(Regex("(https:)|(http:)")) == true }
|
||||||
|
|
||||||
|
@ -1059,15 +988,18 @@ object SoraExtractor : SoraStream() {
|
||||||
val driveReq = app.get(driveLink)
|
val driveReq = app.get(driveLink)
|
||||||
val driveRes = driveReq.document
|
val driveRes = driveReq.document
|
||||||
val bitLink = driveRes.select("a.btn.btn-outline-success").attr("href")
|
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 {
|
val downloadLink = when {
|
||||||
insLink.isNotEmpty() -> extractInstantUHD(insLink)
|
insLink.isNotEmpty() -> extractInstantUHD(insLink)
|
||||||
driveRes.select("button.btn.btn-success").text()
|
driveRes.select("button.btn.btn-success").text()
|
||||||
.contains("Direct Download", true) -> extractDirectUHD(driveLink, driveReq)
|
.contains("Direct Download", true) -> extractDirectUHD(driveLink, driveReq)
|
||||||
|
|
||||||
bitLink.isNullOrEmpty() -> {
|
bitLink.isNullOrEmpty() -> {
|
||||||
val backupIframe = driveRes.select("a.btn.btn-outline-warning").attr("href")
|
val backupIframe = driveRes.select("a.btn.btn-outline-warning").attr("href")
|
||||||
extractBackupUHD(backupIframe ?: return@apmap)
|
extractBackupUHD(backupIframe ?: return@apmap)
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
extractMirrorUHD(bitLink, base)
|
extractMirrorUHD(bitLink, base)
|
||||||
}
|
}
|
||||||
|
@ -1101,45 +1033,43 @@ object SoraExtractor : SoraStream() {
|
||||||
) {
|
) {
|
||||||
var res = app.get("$vegaMoviesAPI/search/$title").document
|
var res = app.get("$vegaMoviesAPI/search/$title").document
|
||||||
val match = if (season == null) "$year" else "Season $season"
|
val match = if (season == null) "$year" else "Season $season"
|
||||||
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")
|
?.attr("href")
|
||||||
|
|
||||||
res = app.get(media ?: return).document
|
res = app.get(media ?: return).document
|
||||||
val hTag = if (season == null) "h5" else "h3"
|
val hTag = if (season == null) "h5" else "h3"
|
||||||
val aTag = if (season == null) "Download Now" else "V-Cloud"
|
val aTag = if (season == null) "Download Now" else "V-Cloud"
|
||||||
res.select("div.entry-content > $hTag:matches(1080p|2160p)").apmap {
|
res.select("div.entry-content > $hTag:matches(1080p|2160p)").apmap {
|
||||||
val tags = """(?:1080p|2160p)(.*)""".toRegex().find(it.text())?.groupValues?.get(1)?.trim()
|
val tags =
|
||||||
val href = it.nextElementSibling()?.select("a:contains($aTag)")?.attr("href")?.let { url ->
|
"""(?:1080p|2160p)(.*)""".toRegex().find(it.text())?.groupValues?.get(1)?.trim()
|
||||||
|
val href =
|
||||||
|
it.nextElementSibling()?.select("a:contains($aTag)")?.attr("href")?.let { url ->
|
||||||
app.post(
|
app.post(
|
||||||
"${getBaseUrl(url)}/red.php",
|
"${getBaseUrl(url)}/red.php",
|
||||||
data = mapOf("link" to url),
|
data = mapOf("link" to url),
|
||||||
referer = "$vegaMoviesAPI/"
|
referer = "$vegaMoviesAPI/"
|
||||||
).text.substringAfter("location.href = \"").substringBefore("\"")
|
).text.substringAfter("location.href = \"").substringBefore("\"")
|
||||||
}
|
}
|
||||||
val selector = if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)"
|
val selector =
|
||||||
val server = app.get(href ?: return@apmap).document.selectFirst("div.entry-content > $selector")
|
if (season == null) "p a:contains(V-Cloud)" else "h4:matches(0?$episode) + p a:contains(V-Cloud)"
|
||||||
|
val server =
|
||||||
|
app.get(href ?: return@apmap).document.selectFirst("div.entry-content > $selector")
|
||||||
?.attr("href")
|
?.attr("href")
|
||||||
loadExtractor(server ?: return@apmap, "$vegaMoviesAPI/", subtitleCallback) { link ->
|
loadCustomTagExtractor(
|
||||||
callback.invoke(
|
tags,
|
||||||
ExtractorLink(
|
server ?: return@apmap,
|
||||||
link.name,
|
"$vegaMoviesAPI/",
|
||||||
"${link.name} $tags",
|
subtitleCallback,
|
||||||
link.url,
|
callback,
|
||||||
link.referer,
|
getIndexQuality(it.text())
|
||||||
getIndexQuality(it.text()),
|
|
||||||
link.type,
|
|
||||||
link.headers,
|
|
||||||
)
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invokePobmovies(
|
suspend fun invokePobmovies(
|
||||||
title: String? = null,
|
title: String? = null, year: Int? = null, callback: (ExtractorLink) -> Unit
|
||||||
year: Int? = null,
|
|
||||||
callback: (ExtractorLink) -> Unit
|
|
||||||
) {
|
) {
|
||||||
val detailDoc = app.get("$pobmoviesAPI/${title.createSlug()}-$year").document
|
val detailDoc = app.get("$pobmoviesAPI/${title.createSlug()}-$year").document
|
||||||
val iframeList = detailDoc.select("div.entry-content p").map { it }
|
val iframeList = detailDoc.select("div.entry-content p").map { it }
|
||||||
|
@ -1150,20 +1080,17 @@ object SoraExtractor : SoraStream() {
|
||||||
val sources = mutableListOf<Pair<String, String?>>()
|
val sources = mutableListOf<Pair<String, String?>>()
|
||||||
if (iframeList.any {
|
if (iframeList.any {
|
||||||
it.first.contains(
|
it.first.contains(
|
||||||
"2160p",
|
"2160p", true
|
||||||
true
|
|
||||||
)
|
)
|
||||||
}) {
|
}) {
|
||||||
sources.addAll(iframeList.filter {
|
sources.addAll(iframeList.filter {
|
||||||
it.first.contains(
|
it.first.contains(
|
||||||
"2160p",
|
"2160p", true
|
||||||
true
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
sources.add(iframeList.first {
|
sources.add(iframeList.first {
|
||||||
it.first.contains(
|
it.first.contains(
|
||||||
"1080p",
|
"1080p", true
|
||||||
true
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -1216,9 +1143,10 @@ object SoraExtractor : SoraStream() {
|
||||||
return base64Decode(this.substringAfterLast("/"))
|
return base64Decode(this.substringAfterLast("/"))
|
||||||
}
|
}
|
||||||
val (seasonSlug, episodeSlug) = getEpisodeSlug(season, episode)
|
val (seasonSlug, episodeSlug) = getEpisodeSlug(season, episode)
|
||||||
val media = app.get("$hdmovies4uAPI/?s=${if (season == null) imdbId else title}").document
|
val media =
|
||||||
.let {
|
app.get("$hdmovies4uAPI/?s=${if (season == null) imdbId else title}").document.let {
|
||||||
val selector = if (season == null) "a" else "a:matches((?i)$title.*Season $season)"
|
val selector =
|
||||||
|
if (season == null) "a" else "a:matches((?i)$title.*Season $season)"
|
||||||
it.selectFirst("div.gridxw.gridxe $selector")?.attr("href")
|
it.selectFirst("div.gridxw.gridxe $selector")?.attr("href")
|
||||||
}
|
}
|
||||||
val selector = if (season == null) "1080p|2160p" else "(?i)Episode.*(?:1080p|2160p)"
|
val selector = if (season == null) "1080p|2160p" else "(?i)Episode.*(?:1080p|2160p)"
|
||||||
|
@ -1251,8 +1179,7 @@ object SoraExtractor : SoraStream() {
|
||||||
) {
|
) {
|
||||||
val ref = "https://videoapi.tv/"
|
val ref = "https://videoapi.tv/"
|
||||||
val files = app.get(
|
val files = app.get(
|
||||||
"$fwatayakoAPI/IAF0wWTdNYZm?imdb_id=$imdbId",
|
"$fwatayakoAPI/IAF0wWTdNYZm?imdb_id=$imdbId", referer = ref
|
||||||
referer = ref
|
|
||||||
).document.selectFirst("input#files")?.attr("value") ?: return
|
).document.selectFirst("input#files")?.attr("value") ?: return
|
||||||
val data = files.let {
|
val data = files.let {
|
||||||
if (season == null) {
|
if (season == null) {
|
||||||
|
@ -1430,7 +1357,8 @@ object SoraExtractor : SoraStream() {
|
||||||
val scriptData = req.document.select("div.row div.item").map { ele ->
|
val scriptData = req.document.select("div.row div.item").map { ele ->
|
||||||
Triple(
|
Triple(
|
||||||
ele.select("div.tiptitle p").text(),
|
ele.select("div.tiptitle p").text(),
|
||||||
ele.select("div.jtip-top div:last-child").text().substringBefore("–").filter { it.isDigit() },
|
ele.select("div.jtip-top div:last-child").text().substringBefore("–")
|
||||||
|
.filter { it.isDigit() },
|
||||||
ele.selectFirst("a")?.attr("href")
|
ele.selectFirst("a")?.attr("href")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1448,7 +1376,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val link = fixUrl(script?.third ?: return, referer)
|
val link = fixUrl(script?.third ?: return, referer)
|
||||||
val request = app.get(link)
|
val request = app.get(link)
|
||||||
var cookies = request.cookies
|
var cookies = request.cookies
|
||||||
val headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest",)
|
val headers = mapOf("Accept" to "*/*", "X-Requested-With" to "XMLHttpRequest")
|
||||||
|
|
||||||
val doc = request.document
|
val doc = request.document
|
||||||
val token = doc.selectFirst("meta[name=csrf-token]")?.attr("content")
|
val token = doc.selectFirst("meta[name=csrf-token]")?.attr("content")
|
||||||
|
@ -1533,10 +1461,8 @@ object SoraExtractor : SoraStream() {
|
||||||
)
|
)
|
||||||
val headers = getCrunchyrollToken()
|
val headers = getCrunchyrollToken()
|
||||||
val seasonIdData = app.get(
|
val seasonIdData = app.get(
|
||||||
"$crunchyrollAPI/content/v2/cms/series/${id ?: return}/seasons",
|
"$crunchyrollAPI/content/v2/cms/series/${id ?: return}/seasons", headers = headers
|
||||||
headers = headers
|
).parsedSafe<CrunchyrollResponses>()?.data?.let { s ->
|
||||||
)
|
|
||||||
.parsedSafe<CrunchyrollResponses>()?.data?.let { s ->
|
|
||||||
if (s.size == 1) {
|
if (s.size == 1) {
|
||||||
s.firstOrNull()
|
s.firstOrNull()
|
||||||
} else {
|
} else {
|
||||||
|
@ -1553,14 +1479,12 @@ object SoraExtractor : SoraStream() {
|
||||||
?.map { it.guid to it.audio_locale } ?: listOf(seasonIdData?.id to "ja-JP")
|
?.map { it.guid to it.audio_locale } ?: listOf(seasonIdData?.id to "ja-JP")
|
||||||
|
|
||||||
seasonId.apmap { (sId, audioL) ->
|
seasonId.apmap { (sId, audioL) ->
|
||||||
val streamsLink =
|
val streamsLink = app.get(
|
||||||
app.get(
|
|
||||||
"$crunchyrollAPI/content/v2/cms/seasons/${sId ?: return@apmap}/episodes",
|
"$crunchyrollAPI/content/v2/cms/seasons/${sId ?: return@apmap}/episodes",
|
||||||
headers = headers
|
headers = headers
|
||||||
).parsedSafe<CrunchyrollResponses>()?.data?.find {
|
).parsedSafe<CrunchyrollResponses>()?.data?.find {
|
||||||
it.title.equals(epsTitle, true) || it.slug_title.equals(
|
it.title.equals(epsTitle, true) || it.slug_title.equals(
|
||||||
epsTitle.createSlug(),
|
epsTitle.createSlug(), true
|
||||||
true
|
|
||||||
) || it.episode_number == episode
|
) || it.episode_number == episode
|
||||||
}?.streams_link
|
}?.streams_link
|
||||||
val sources =
|
val sources =
|
||||||
|
@ -1568,8 +1492,7 @@ object SoraExtractor : SoraStream() {
|
||||||
.parsedSafe<CrunchyrollSourcesResponses>()
|
.parsedSafe<CrunchyrollSourcesResponses>()
|
||||||
|
|
||||||
listOf(
|
listOf(
|
||||||
"adaptive_hls",
|
"adaptive_hls", "vo_adaptive_hls"
|
||||||
"vo_adaptive_hls"
|
|
||||||
).map { hls ->
|
).map { hls ->
|
||||||
val name = if (hls == "adaptive_hls") "Crunchyroll" else "Vrv"
|
val name = if (hls == "adaptive_hls") "Crunchyroll" else "Vrv"
|
||||||
val audio = if (audioL == "en-US") "English Dub" else "Raw"
|
val audio = if (audioL == "en-US") "English Dub" else "Raw"
|
||||||
|
@ -1645,8 +1568,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val mediaLink =
|
val mediaLink =
|
||||||
app.get(matchMedia?.first ?: return).document.selectFirst("a#jake1")?.attr("href")
|
app.get(matchMedia?.first ?: return).document.selectFirst("a#jake1")?.attr("href")
|
||||||
val detailDoc = app.get(mediaLink ?: return).document
|
val detailDoc = app.get(mediaLink ?: return).document
|
||||||
val media = detailDoc.selectFirst("div.entry-content pre span")?.text()
|
val media = detailDoc.selectFirst("div.entry-content pre span")?.text()?.split("|")
|
||||||
?.split("|")
|
|
||||||
?.map { it.trim() }
|
?.map { it.trim() }
|
||||||
|
|
||||||
val iframe = (if (season == null) {
|
val iframe = (if (season == null) {
|
||||||
|
@ -1714,12 +1636,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
"RStream",
|
"RStream", "RStream", link, rStreamAPI, Qualities.P720.value, link.contains(".m3u8")
|
||||||
"RStream",
|
|
||||||
link,
|
|
||||||
rStreamAPI,
|
|
||||||
Qualities.P720.value,
|
|
||||||
link.contains(".m3u8")
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1734,8 +1651,10 @@ object SoraExtractor : SoraStream() {
|
||||||
val onionUrl = "https://onionplay.se/"
|
val onionUrl = "https://onionplay.se/"
|
||||||
val request = if (season == null) {
|
val request = if (season == null) {
|
||||||
val res = app.get("$flixonAPI/$imdbId", referer = onionUrl)
|
val res = app.get("$flixonAPI/$imdbId", referer = onionUrl)
|
||||||
if (res.text.contains("BEGIN PGP SIGNED MESSAGE")
|
if (res.text.contains("BEGIN PGP SIGNED MESSAGE")) app.get(
|
||||||
) app.get("$flixonAPI/$imdbId-1", referer = onionUrl) else res
|
"$flixonAPI/$imdbId-1",
|
||||||
|
referer = onionUrl
|
||||||
|
) else res
|
||||||
} else {
|
} else {
|
||||||
app.get("$flixonAPI/$tmdbId-$season-$episode", referer = onionUrl)
|
app.get("$flixonAPI/$tmdbId-$season-$episode", referer = onionUrl)
|
||||||
}
|
}
|
||||||
|
@ -1748,16 +1667,12 @@ object SoraExtractor : SoraStream() {
|
||||||
val iframe = collection?.split(",")?.map { it.trim().toInt() }?.map { nums ->
|
val iframe = collection?.split(",")?.map { it.trim().toInt() }?.map { nums ->
|
||||||
nums.minus(num).toChar()
|
nums.minus(num).toChar()
|
||||||
}?.joinToString("")?.let { Jsoup.parse(it) }?.selectFirst("button.redirect")
|
}?.joinToString("")?.let { Jsoup.parse(it) }?.selectFirst("button.redirect")
|
||||||
?.attr("onclick")
|
?.attr("onclick")?.substringAfter("('")?.substringBefore("')")
|
||||||
?.substringAfter("('")?.substringBefore("')")
|
|
||||||
|
|
||||||
delay(1000)
|
delay(1000)
|
||||||
val unPacker =
|
val unPacker = app.get(
|
||||||
app.get(
|
iframe ?: return, referer = "$flixonAPI/"
|
||||||
iframe ?: return,
|
).document.selectFirst("script:containsData(JuicyCodes.Run)")?.data()
|
||||||
referer = "$flixonAPI/"
|
|
||||||
).document.selectFirst("script:containsData(JuicyCodes.Run)")
|
|
||||||
?.data()
|
|
||||||
?.substringAfter("JuicyCodes.Run(")?.substringBefore(");")?.split("+")
|
?.substringAfter("JuicyCodes.Run(")?.substringBefore(");")?.split("+")
|
||||||
?.joinToString("") { it.replace("\"", "").trim() }
|
?.joinToString("") { it.replace("\"", "").trim() }
|
||||||
?.let { getAndUnpack(base64Decode(it)) }
|
?.let { getAndUnpack(base64Decode(it)) }
|
||||||
|
@ -1794,24 +1709,19 @@ object SoraExtractor : SoraStream() {
|
||||||
}
|
}
|
||||||
|
|
||||||
app.get(
|
app.get(
|
||||||
url,
|
url, referer = "https://smashystream.com/"
|
||||||
referer = "https://smashystream.com/"
|
|
||||||
).document.select("div#_default-servers a.server").map {
|
).document.select("div#_default-servers a.server").map {
|
||||||
it.attr("data-id") to it.text()
|
it.attr("data-id") to it.text()
|
||||||
}.apmap {
|
}.apmap {
|
||||||
when {
|
when {
|
||||||
(it.second.equals("Player F", true) || it.second.equals(
|
(it.second.equals("Player F", true) || it.second.equals(
|
||||||
"Player N",
|
"Player N", true
|
||||||
true
|
|
||||||
)) && !isAnime -> {
|
)) && !isAnime -> {
|
||||||
invokeSmashyFfix(it.second, it.first, url, callback)
|
invokeSmashyFfix(it.second, it.first, url, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
it.second.equals("Player FM", true) && !isAnime -> invokeSmashyFm(
|
it.second.equals("Player FM", true) && !isAnime -> invokeSmashyFm(
|
||||||
it.second,
|
it.second, it.first, url, callback
|
||||||
it.first,
|
|
||||||
url,
|
|
||||||
callback
|
|
||||||
)
|
)
|
||||||
|
|
||||||
else -> return@apmap
|
else -> return@apmap
|
||||||
|
@ -1829,8 +1739,7 @@ object SoraExtractor : SoraStream() {
|
||||||
) {
|
) {
|
||||||
val id = imdbId?.removePrefix("tt")
|
val id = imdbId?.removePrefix("tt")
|
||||||
val epsId = app.post(
|
val epsId = app.post(
|
||||||
"$watchSomuchAPI/Watch/ajMovieTorrents.aspx",
|
"$watchSomuchAPI/Watch/ajMovieTorrents.aspx", data = mapOf(
|
||||||
data = mapOf(
|
|
||||||
"index" to "0",
|
"index" to "0",
|
||||||
"mid" to "$id",
|
"mid" to "$id",
|
||||||
"wsk" to "f6ea6cde-e42b-4c26-98d3-b4fe48cdd4fb",
|
"wsk" to "f6ea6cde-e42b-4c26-98d3-b4fe48cdd4fb",
|
||||||
|
@ -1853,13 +1762,10 @@ object SoraExtractor : SoraStream() {
|
||||||
"$watchSomuchAPI/Watch/ajMovieSubtitles.aspx?mid=$id&tid=$epsId&part=S${seasonSlug}E${episodeSlug}"
|
"$watchSomuchAPI/Watch/ajMovieSubtitles.aspx?mid=$id&tid=$epsId&part=S${seasonSlug}E${episodeSlug}"
|
||||||
}
|
}
|
||||||
|
|
||||||
app.get(subUrl)
|
app.get(subUrl).parsedSafe<WatchsomuchSubResponses>()?.subtitles?.map { sub ->
|
||||||
.parsedSafe<WatchsomuchSubResponses>()?.subtitles
|
|
||||||
?.map { sub ->
|
|
||||||
subtitleCallback.invoke(
|
subtitleCallback.invoke(
|
||||||
SubtitleFile(
|
SubtitleFile(
|
||||||
sub.label ?: "",
|
sub.label ?: "", fixUrl(sub.url ?: return@map null, watchSomuchAPI)
|
||||||
fixUrl(sub.url ?: return@map null, watchSomuchAPI)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1908,9 +1814,7 @@ object SoraExtractor : SoraStream() {
|
||||||
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
||||||
)
|
)
|
||||||
val data = mapOf(
|
val data = mapOf(
|
||||||
"q" to query,
|
"q" to query, "page_token" to "", "page_index" to "0"
|
||||||
"page_token" to "",
|
|
||||||
"page_index" to "0"
|
|
||||||
)
|
)
|
||||||
val search = if (api in encodedIndex) {
|
val search = if (api in encodedIndex) {
|
||||||
decodeIndexJson(
|
decodeIndexJson(
|
||||||
|
@ -1921,21 +1825,14 @@ object SoraExtractor : SoraStream() {
|
||||||
referer = apiUrl,
|
referer = apiUrl,
|
||||||
timeout = 120L
|
timeout = 120L
|
||||||
).text else app.post(
|
).text else app.post(
|
||||||
"${apiUrl}search",
|
"${apiUrl}search", data = data, referer = apiUrl
|
||||||
data = data,
|
|
||||||
referer = apiUrl
|
|
||||||
).text
|
).text
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
app.post("${apiUrl}search", requestBody = body, referer = apiUrl, timeout = 120L).text
|
app.post("${apiUrl}search", requestBody = body, referer = apiUrl, timeout = 120L).text
|
||||||
}
|
}
|
||||||
val media = if (api in untrimmedIndex) searchIndex(
|
val media = if (api in untrimmedIndex) searchIndex(
|
||||||
title,
|
title, season, episode, year, search, false
|
||||||
season,
|
|
||||||
episode,
|
|
||||||
year,
|
|
||||||
search,
|
|
||||||
false
|
|
||||||
) else searchIndex(title, season, episode, year, search)
|
) else searchIndex(title, season, episode, year, search)
|
||||||
media?.apmap { file ->
|
media?.apmap { file ->
|
||||||
val pathBody = """{"id":"${file.id ?: return@apmap null}"}""".toRequestBody(
|
val pathBody = """{"id":"${file.id ?: return@apmap null}"}""".toRequestBody(
|
||||||
|
@ -1959,7 +1856,9 @@ object SoraExtractor : SoraStream() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
app.post("${apiUrl}id2path", requestBody = pathBody, referer = apiUrl, timeout = 120L)
|
app.post(
|
||||||
|
"${apiUrl}id2path", requestBody = pathBody, referer = apiUrl, timeout = 120L
|
||||||
|
)
|
||||||
}).text.let { path ->
|
}).text.let { path ->
|
||||||
if (api in ddomainIndex) {
|
if (api in ddomainIndex) {
|
||||||
val worker = app.get(
|
val worker = app.get(
|
||||||
|
@ -2005,9 +1904,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val query = getIndexQuery(title, null, season, episode)
|
val query = getIndexQuery(title, null, season, episode)
|
||||||
val files = app.get("$gdbot/search?q=$query").document.select("ul.divide-y li").map {
|
val files = app.get("$gdbot/search?q=$query").document.select("ul.divide-y li").map {
|
||||||
Triple(
|
Triple(
|
||||||
it.select("a").attr("href"),
|
it.select("a").attr("href"), it.select("a").text(), it.select("span").text()
|
||||||
it.select("a").text(),
|
|
||||||
it.select("span").text()
|
|
||||||
)
|
)
|
||||||
}.filter {
|
}.filter {
|
||||||
matchingIndex(
|
matchingIndex(
|
||||||
|
@ -2023,10 +1920,8 @@ object SoraExtractor : SoraStream() {
|
||||||
}
|
}
|
||||||
|
|
||||||
files.let { file ->
|
files.let { file ->
|
||||||
listOfNotNull(
|
listOfNotNull(file.find { it.second.contains("2160p", true) },
|
||||||
file.find { it.second.contains("2160p", true) },
|
file.find { it.second.contains("1080p", true) })
|
||||||
file.find { it.second.contains("1080p", true) }
|
|
||||||
)
|
|
||||||
}.apmap { file ->
|
}.apmap { file ->
|
||||||
val videoUrl = extractGdflix(file.first)
|
val videoUrl = extractGdflix(file.first)
|
||||||
val quality = getIndexQuality(file.second)
|
val quality = getIndexQuality(file.second)
|
||||||
|
@ -2091,10 +1986,7 @@ object SoraExtractor : SoraStream() {
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun invoke2embed(
|
suspend fun invoke2embed(
|
||||||
imdbId: String?,
|
imdbId: String?, season: Int?, episode: Int?, callback: (ExtractorLink) -> Unit
|
||||||
season: Int?,
|
|
||||||
episode: Int?,
|
|
||||||
callback: (ExtractorLink) -> Unit
|
|
||||||
) {
|
) {
|
||||||
val server = "https://stream.2embed.cc"
|
val server = "https://stream.2embed.cc"
|
||||||
val url = if (season == null) {
|
val url = if (season == null) {
|
||||||
|
@ -2104,7 +1996,11 @@ object SoraExtractor : SoraStream() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val iframesrc = app.get(url).document.selectFirst("iframe#iframesrc")?.attr("src")
|
val iframesrc = app.get(url).document.selectFirst("iframe#iframesrc")?.attr("src")
|
||||||
val framesrc = app.get(fixUrl(iframesrc ?: return, twoEmbedAPI)).document.selectFirst("iframe#framesrc")?.attr("src")
|
val framesrc = app.get(
|
||||||
|
fixUrl(
|
||||||
|
iframesrc ?: return, twoEmbedAPI
|
||||||
|
)
|
||||||
|
).document.selectFirst("iframe#framesrc")?.attr("src")
|
||||||
val video = app.get(fixUrl(framesrc ?: return, "$server/e/")).text.let {
|
val video = app.get(fixUrl(framesrc ?: return, "$server/e/")).text.let {
|
||||||
Regex("file:\\s*\"(.*?m3u8.*?)\"").find(it)?.groupValues?.getOrNull(1)
|
Regex("file:\\s*\"(.*?m3u8.*?)\"").find(it)?.groupValues?.getOrNull(1)
|
||||||
}
|
}
|
||||||
|
@ -2127,6 +2023,7 @@ object SoraExtractor : SoraStream() {
|
||||||
fun String.decrypt(key: String): List<PrimewireSources>? {
|
fun String.decrypt(key: String): List<PrimewireSources>? {
|
||||||
return tryParseJson<List<PrimewireSources>>(base64Decode(this).decodePrimewireXor(key))
|
return tryParseJson<List<PrimewireSources>>(base64Decode(this).decodePrimewireXor(key))
|
||||||
}
|
}
|
||||||
|
|
||||||
val slug = getEpisodeSlug(season, episode)
|
val slug = getEpisodeSlug(season, episode)
|
||||||
val query = if (season == null) {
|
val query = if (season == null) {
|
||||||
title
|
title
|
||||||
|
@ -2138,9 +2035,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
val media = doc.select("div.RvnMfoxhgm").map {
|
val media = doc.select("div.RvnMfoxhgm").map {
|
||||||
Triple(
|
Triple(
|
||||||
it.attr("data-filmName"),
|
it.attr("data-filmName"), it.attr("data-year"), it.select("a").attr("href")
|
||||||
it.attr("data-year"),
|
|
||||||
it.select("a").attr("href")
|
|
||||||
)
|
)
|
||||||
}.let { el ->
|
}.let { el ->
|
||||||
if (el.size == 1) {
|
if (el.size == 1) {
|
||||||
|
@ -2149,8 +2044,7 @@ object SoraExtractor : SoraStream() {
|
||||||
el.find {
|
el.find {
|
||||||
if (season == null) {
|
if (season == null) {
|
||||||
(it.first.equals(title, true) || it.first.equals(
|
(it.first.equals(title, true) || it.first.equals(
|
||||||
"$title ($year)",
|
"$title ($year)", true
|
||||||
true
|
|
||||||
)) && it.second.equals("$year")
|
)) && it.second.equals("$year")
|
||||||
} else {
|
} else {
|
||||||
it.first.equals("$title - Season $season", true)
|
it.first.equals("$title - Season $season", true)
|
||||||
|
@ -2164,22 +2058,21 @@ object SoraExtractor : SoraStream() {
|
||||||
} else {
|
} else {
|
||||||
app.get(
|
app.get(
|
||||||
fixUrl(
|
fixUrl(
|
||||||
media.third,
|
media.third, primewireAPI
|
||||||
primewireAPI
|
|
||||||
)
|
)
|
||||||
).document.selectFirst("div#vvqUtffkId 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, primewireAPI), verify = false)
|
val res = app.get(fixUrl(iframe, primewireAPI), verify = false)
|
||||||
val serverUrl = "var url = '(/user/servers/.*?\\?ep=.*?)';".toRegex().find(res.text)?.groupValues?.get(1) ?: return
|
val serverUrl = "var url = '(/user/servers/.*?\\?ep=.*?)';".toRegex()
|
||||||
|
.find(res.text)?.groupValues?.get(1) ?: return
|
||||||
val cookies = res.okhttpResponse.headers.getPrimewireCookies()
|
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)
|
||||||
val serverRes = app.get(
|
val serverRes = app.get(
|
||||||
"$primewireAPI$serverUrl",
|
"$primewireAPI$serverUrl", cookies = cookies, referer = url, headers = headers
|
||||||
cookies = cookies, referer = url, headers = headers
|
|
||||||
)
|
)
|
||||||
val unpack = getAndUnpack(serverRes.text)
|
val unpack = getAndUnpack(serverRes.text)
|
||||||
val key = unpack.substringAfter("(key=").substringBefore(")")
|
val key = unpack.substringAfter("(key=").substringBefore(")")
|
||||||
|
@ -2239,11 +2132,9 @@ object SoraExtractor : SoraStream() {
|
||||||
it.select("div.episodes__number").text().equals("Episode $episode", true)
|
it.select("div.episodes__number").text().equals("Episode $episode", true)
|
||||||
}?.attr("data-id-episode")
|
}?.attr("data-id-episode")
|
||||||
} ?: return
|
} ?: return
|
||||||
argamap(
|
argamap({
|
||||||
{
|
|
||||||
invokeMonster(res.url.substringAfterLast("/"), episodeId, season, callback)
|
invokeMonster(res.url.substringAfterLast("/"), episodeId, season, callback)
|
||||||
},
|
}, {
|
||||||
{
|
|
||||||
val videoUrl = if (season == null) {
|
val videoUrl = if (season == null) {
|
||||||
"$watchOnlineAPI/api/v1/security/movie-access?id_movie=$episodeId"
|
"$watchOnlineAPI/api/v1/security/movie-access?id_movie=$episodeId"
|
||||||
} else {
|
} else {
|
||||||
|
@ -2273,8 +2164,7 @@ object SoraExtractor : SoraStream() {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2290,11 +2180,12 @@ object SoraExtractor : SoraStream() {
|
||||||
} else {
|
} else {
|
||||||
"shows/view/$urlSlug"
|
"shows/view/$urlSlug"
|
||||||
}
|
}
|
||||||
val streamUrl = app.get("$monsterMainUrl/$viewSlug").document.select("a.round-button:first-child").attr("href")
|
val streamUrl =
|
||||||
|
app.get("$monsterMainUrl/$viewSlug").document.select("a.round-button:first-child")
|
||||||
|
.attr("href")
|
||||||
val res = app.get(fixUrl(streamUrl, monsterMainUrl)).document
|
val res = app.get(fixUrl(streamUrl, monsterMainUrl)).document
|
||||||
val script = res.selectFirst("script:containsData(hash:)")?.data()
|
val script = res.selectFirst("script:containsData(hash:)")?.data()
|
||||||
val hash =
|
val hash = Regex("hash:\\s*['\"](\\S+)['\"],").find(script ?: return)?.groupValues?.get(1)
|
||||||
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)
|
||||||
|
|
||||||
val videoUrl = if (season == null) {
|
val videoUrl = if (season == null) {
|
||||||
|
@ -2303,8 +2194,9 @@ object SoraExtractor : SoraStream() {
|
||||||
"$monsterMainUrl/api/v1/security/episode-access?id_episode=$episodeId&hash=$hash&expires=$expires"
|
"$monsterMainUrl/api/v1/security/episode-access?id_episode=$episodeId&hash=$hash&expires=$expires"
|
||||||
}
|
}
|
||||||
|
|
||||||
app.get(videoUrl, referer = streamUrl, headers = mapOf("X-Requested-With" to "XMLHttpRequest"))
|
app.get(
|
||||||
.parsedSafe<WatchOnlineResponse>()?.streams?.mapKeys { source ->
|
videoUrl, referer = streamUrl, headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
||||||
|
).parsedSafe<WatchOnlineResponse>()?.streams?.mapKeys { source ->
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
"WatchOnline",
|
"WatchOnline",
|
||||||
|
@ -2347,13 +2239,7 @@ object SoraExtractor : SoraStream() {
|
||||||
app.get("${cryMoviesAPI}/stream/movie/$imdbId.json")
|
app.get("${cryMoviesAPI}/stream/movie/$imdbId.json")
|
||||||
.parsedSafe<CryMoviesResponse>()?.streams?.filter {
|
.parsedSafe<CryMoviesResponse>()?.streams?.filter {
|
||||||
matchingIndex(
|
matchingIndex(
|
||||||
it.title,
|
it.title, null, title, year, null, episode, false
|
||||||
null,
|
|
||||||
title,
|
|
||||||
year,
|
|
||||||
null,
|
|
||||||
episode,
|
|
||||||
false
|
|
||||||
)
|
)
|
||||||
}?.apmap { stream ->
|
}?.apmap { stream ->
|
||||||
val quality = getIndexQuality(stream.title)
|
val quality = getIndexQuality(stream.title)
|
||||||
|
@ -2362,8 +2248,7 @@ object SoraExtractor : SoraStream() {
|
||||||
val headers = stream.behaviorHints?.proxyHeaders?.request ?: mapOf()
|
val headers = stream.behaviorHints?.proxyHeaders?.request ?: mapOf()
|
||||||
|
|
||||||
if (!app.get(
|
if (!app.get(
|
||||||
stream.url ?: return@apmap,
|
stream.url ?: return@apmap, headers = headers
|
||||||
headers = headers
|
|
||||||
).isSuccessful
|
).isSuccessful
|
||||||
) return@apmap
|
) return@apmap
|
||||||
|
|
||||||
|
@ -2454,8 +2339,7 @@ object SoraExtractor : SoraStream() {
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
) {
|
) {
|
||||||
val res = app.get(
|
val res = app.get(
|
||||||
"$host/play/$imdbId",
|
"$host/play/$imdbId", referer = "$referer/"
|
||||||
referer = "$referer/"
|
|
||||||
).document.selectFirst("script:containsData(player =)")?.data()?.substringAfter("{")
|
).document.selectFirst("script:containsData(player =)")?.data()?.substringAfter("{")
|
||||||
?.substringBefore(";")?.substringBefore(")")
|
?.substringBefore(";")?.substringBefore(")")
|
||||||
val json = tryParseJson<NavyPlaylist>("{${res ?: return}")
|
val json = tryParseJson<NavyPlaylist>("{${res ?: return}")
|
||||||
|
@ -2479,15 +2363,11 @@ object SoraExtractor : SoraStream() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val path = app.post(
|
val path = app.post(
|
||||||
"${host}/playlist/${server ?: return}.txt",
|
"${host}/playlist/${server ?: return}.txt", headers = headers, referer = "$referer/"
|
||||||
headers = headers,
|
|
||||||
referer = "$referer/"
|
|
||||||
).text
|
).text
|
||||||
|
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
if (host == navyAPI) "Navy" else "Moment",
|
if (host == navyAPI) "Navy" else "Moment", path, "${referer}/"
|
||||||
path,
|
|
||||||
"${referer}/"
|
|
||||||
).forEach(callback)
|
).forEach(callback)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2520,8 +2400,7 @@ object SoraExtractor : SoraStream() {
|
||||||
}?.attr("href")
|
}?.attr("href")
|
||||||
})?.substringAfter("id=")?.substringBefore("&")
|
})?.substringAfter("id=")?.substringBefore("&")
|
||||||
|
|
||||||
val server =
|
val server = app.get(
|
||||||
app.get(
|
|
||||||
"$emoviesAPI/ajax/v4_get_sources?s=oserver&id=${id ?: return}&_=${APIHolder.unixTimeMS}",
|
"$emoviesAPI/ajax/v4_get_sources?s=oserver&id=${id ?: return}&_=${APIHolder.unixTimeMS}",
|
||||||
headers = mapOf(
|
headers = mapOf(
|
||||||
"X-Requested-With" to "XMLHttpRequest"
|
"X-Requested-With" to "XMLHttpRequest"
|
||||||
|
@ -2529,8 +2408,7 @@ object SoraExtractor : SoraStream() {
|
||||||
).parsedSafe<EMovieServer>()?.value
|
).parsedSafe<EMovieServer>()?.value
|
||||||
|
|
||||||
val script = app.get(
|
val script = app.get(
|
||||||
server ?: return,
|
server ?: return, referer = "$emoviesAPI/"
|
||||||
referer = "$emoviesAPI/"
|
|
||||||
).document.selectFirst("script:containsData(sources:)")?.data() ?: return
|
).document.selectFirst("script:containsData(sources:)")?.data() ?: return
|
||||||
val sources = Regex("sources:\\s*\\[(.*)],").find(script)?.groupValues?.get(1)?.let {
|
val sources = Regex("sources:\\s*\\[(.*)],").find(script)?.groupValues?.get(1)?.let {
|
||||||
tryParseJson<List<EMovieSources>>("[$it]")
|
tryParseJson<List<EMovieSources>>("[$it]")
|
||||||
|
@ -2541,9 +2419,7 @@ object SoraExtractor : SoraStream() {
|
||||||
|
|
||||||
sources?.map { source ->
|
sources?.map { source ->
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
"Emovies",
|
"Emovies", source.file ?: return@map, "https://embed.vodstream.xyz/"
|
||||||
source.file ?: return@map,
|
|
||||||
"https://embed.vodstream.xyz/"
|
|
||||||
).forEach(callback)
|
).forEach(callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2572,9 +2448,11 @@ object SoraExtractor : SoraStream() {
|
||||||
"$susflixAPI/view/tv/$tmdbId/$season/$episode"
|
"$susflixAPI/view/tv/$tmdbId/$season/$episode"
|
||||||
}
|
}
|
||||||
|
|
||||||
val res = app.get(url,cookies = mapOf(
|
val res = app.get(
|
||||||
|
url, cookies = mapOf(
|
||||||
"session" to "eyJfZnJlc2giOmZhbHNlLCJwaG9uZV9udW1iZXIiOiJzdXNoZXg5OCJ9.ZO6CsA.XUs6Y5gna8ExAUX55-myMi1QpYU"
|
"session" to "eyJfZnJlc2giOmZhbHNlLCJwaG9uZV9udW1iZXIiOiJzdXNoZXg5OCJ9.ZO6CsA.XUs6Y5gna8ExAUX55-myMi1QpYU"
|
||||||
)).text.substringAfter("response = {").substringBefore("};").replace("\'", "\"")
|
)
|
||||||
|
).text.substringAfter("response = {").substringBefore("};").replace("\'", "\"")
|
||||||
|
|
||||||
val sources = tryParseJson<SusflixSources>("{$res}")
|
val sources = tryParseJson<SusflixSources>("{$res}")
|
||||||
sources?.qualities?.map { source ->
|
sources?.qualities?.map { source ->
|
||||||
|
@ -2611,7 +2489,10 @@ object SoraExtractor : SoraStream() {
|
||||||
) {
|
) {
|
||||||
val referer = "https://jump1.net/"
|
val referer = "https://jump1.net/"
|
||||||
val res = if (season == null) {
|
val res = if (season == null) {
|
||||||
val body = """{"filters":[{"type":"slug","args":{"slugs":["${title.createSlug()}-$year"]}}],"sort":"addedRecent","skip":0,"limit":100}""".toRequestBody(RequestBodyTypes.JSON.toMediaTypeOrNull())
|
val body =
|
||||||
|
"""{"filters":[{"type":"slug","args":{"slugs":["${title.createSlug()}-$year"]}}],"sort":"addedRecent","skip":0,"limit":100}""".toRequestBody(
|
||||||
|
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
||||||
|
)
|
||||||
app.post("$jump1API/api/movies", requestBody = body, referer = referer)
|
app.post("$jump1API/api/movies", requestBody = body, referer = referer)
|
||||||
} else {
|
} else {
|
||||||
app.get("$jump1API/api/shows/$tvdbId/seasons", referer = referer)
|
app.get("$jump1API/api/shows/$tvdbId/seasons", referer = referer)
|
||||||
|
@ -2620,8 +2501,11 @@ object SoraExtractor : SoraStream() {
|
||||||
val source = if (season == null) {
|
val source = if (season == null) {
|
||||||
tryParseJson<Jump1Movies>(res)?.movies?.find { it.id == tmdbId }?.videoId
|
tryParseJson<Jump1Movies>(res)?.movies?.find { it.id == tmdbId }?.videoId
|
||||||
} else {
|
} else {
|
||||||
val jumpSeason = tryParseJson<ArrayList<Jump1Season>>(res)?.find { it.seasonNumber == season }?.id
|
val jumpSeason =
|
||||||
val seasonRes = app.get("$jump1API/api/shows/seasons/${jumpSeason ?: return}/episodes", referer = referer)
|
tryParseJson<ArrayList<Jump1Season>>(res)?.find { it.seasonNumber == season }?.id
|
||||||
|
val seasonRes = app.get(
|
||||||
|
"$jump1API/api/shows/seasons/${jumpSeason ?: return}/episodes", referer = referer
|
||||||
|
)
|
||||||
tryParseJson<ArrayList<Jump1Episodes>>(seasonRes.text)?.find { it.episodeNumber == episode }?.videoId
|
tryParseJson<ArrayList<Jump1Episodes>>(seasonRes.text)?.find { it.episodeNumber == episode }?.videoId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2653,12 +2537,10 @@ object SoraExtractor : SoraStream() {
|
||||||
media?.title to netflixId
|
media?.title to netflixId
|
||||||
} else {
|
} else {
|
||||||
val seasonId = media?.season?.find { it.s == "$season" }?.id
|
val seasonId = media?.season?.find { it.s == "$season" }?.id
|
||||||
val episodeId =
|
val episodeId = app.get(
|
||||||
app.get(
|
|
||||||
"$netflixAPI/episodes.php?s=${seasonId}&series=$netflixId&t=${APIHolder.unixTime}",
|
"$netflixAPI/episodes.php?s=${seasonId}&series=$netflixId&t=${APIHolder.unixTime}",
|
||||||
headers = headers
|
headers = headers
|
||||||
)
|
).parsedSafe<NetflixResponse>()?.episodes?.find { it.ep == "E$episode" }?.id
|
||||||
.parsedSafe<NetflixResponse>()?.episodes?.find { it.ep == "E$episode" }?.id
|
|
||||||
media?.title to episodeId
|
media?.title to episodeId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -477,7 +477,7 @@ suspend fun invokeSmashyFm(
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
"Smashy [$name]",
|
"Smashy [$name]",
|
||||||
source.removeProxy(),
|
source.removeProxy(),
|
||||||
"https://vidstream.pro/"
|
"https://vidplay.site/"
|
||||||
).forEach(callback)
|
).forEach(callback)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1038,6 +1038,33 @@ fun generateWpKey(r: String, m: String): String {
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun loadCustomTagExtractor(
|
||||||
|
tag: String? = null,
|
||||||
|
url: String,
|
||||||
|
referer: String? = null,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit,
|
||||||
|
quality: Int? = null,
|
||||||
|
) {
|
||||||
|
loadExtractor(url, referer, subtitleCallback) { link ->
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
link.source,
|
||||||
|
"${link.name} $tag",
|
||||||
|
link.url,
|
||||||
|
link.referer,
|
||||||
|
when (link.type) {
|
||||||
|
ExtractorLinkType.M3U8 -> link.quality
|
||||||
|
else -> quality ?: link.quality
|
||||||
|
},
|
||||||
|
link.type,
|
||||||
|
link.headers,
|
||||||
|
link.extractorData
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
suspend fun loadCustomExtractor(
|
suspend fun loadCustomExtractor(
|
||||||
name: String? = null,
|
name: String? = null,
|
||||||
url: String,
|
url: String,
|
||||||
|
|
Loading…
Reference in a new issue