2022-10-17 04:24:09 +00:00
|
|
|
|
package com.hexated
|
|
|
|
|
|
2023-01-29 03:29:15 +00:00
|
|
|
|
import android.util.Log
|
2022-10-27 08:46:19 +00:00
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty
|
2022-10-17 08:03:20 +00:00
|
|
|
|
import com.lagradost.cloudstream3.*
|
|
|
|
|
import com.lagradost.cloudstream3.utils.*
|
2022-10-27 08:46:19 +00:00
|
|
|
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
2022-11-02 06:56:24 +00:00
|
|
|
|
import com.lagradost.nicehttp.Requests
|
|
|
|
|
import com.lagradost.nicehttp.Session
|
|
|
|
|
import com.google.gson.JsonParser
|
2023-01-17 03:55:16 +00:00
|
|
|
|
import com.lagradost.cloudstream3.extractors.StreamSB
|
2022-12-09 08:44:01 +00:00
|
|
|
|
import com.lagradost.cloudstream3.extractors.XStreamCdn
|
2022-11-27 06:41:05 +00:00
|
|
|
|
import com.lagradost.cloudstream3.network.CloudflareKiller
|
2022-12-09 20:54:40 +00:00
|
|
|
|
import com.lagradost.nicehttp.RequestBodyTypes
|
2022-11-09 00:26:07 +00:00
|
|
|
|
import kotlinx.coroutines.delay
|
2022-12-09 20:54:40 +00:00
|
|
|
|
import okhttp3.MediaType.Companion.toMediaTypeOrNull
|
2022-11-02 06:56:24 +00:00
|
|
|
|
import okhttp3.RequestBody.Companion.toRequestBody
|
2023-01-29 03:29:15 +00:00
|
|
|
|
import okio.ByteString.Companion.encode
|
2023-01-11 01:28:46 +00:00
|
|
|
|
import org.jsoup.Jsoup
|
2022-10-17 04:24:09 +00:00
|
|
|
|
|
2022-11-02 06:56:24 +00:00
|
|
|
|
val session = Session(Requests().baseClient)
|
|
|
|
|
|
2022-10-17 04:24:09 +00:00
|
|
|
|
object SoraExtractor : SoraStream() {
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
/*
|
2022-10-17 04:24:09 +00:00
|
|
|
|
suspend fun invokeLocalSources(
|
|
|
|
|
url: String,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val doc = app.get(
|
|
|
|
|
url,
|
|
|
|
|
headers = mapOf("User-Agent" to RandomUserAgent.getRandomUserAgent())
|
|
|
|
|
).document
|
|
|
|
|
val script = doc.select("script").find { it.data().contains("\"sources\":[") }?.data()
|
|
|
|
|
val sourcesData = script?.substringAfter("\"sources\":[")?.substringBefore("],")
|
|
|
|
|
val subData = script?.substringAfter("\"subtitles\":[")?.substringBefore("],")
|
|
|
|
|
|
2022-10-27 08:46:19 +00:00
|
|
|
|
tryParseJson<List<Sources>>("[$sourcesData]")?.map { source ->
|
2022-10-17 04:24:09 +00:00
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
this.name,
|
|
|
|
|
this.name,
|
|
|
|
|
source.url ?: return@map null,
|
|
|
|
|
"$mainServerAPI/",
|
|
|
|
|
source.quality?.toIntOrNull() ?: Qualities.Unknown.value,
|
|
|
|
|
isM3u8 = source.isM3U8,
|
|
|
|
|
headers = mapOf("Origin" to mainServerAPI)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-27 08:46:19 +00:00
|
|
|
|
tryParseJson<List<Subtitles>>("[$subData]")?.map { sub ->
|
2022-10-17 04:24:09 +00:00
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
sub.lang.toString(),
|
|
|
|
|
sub.url ?: return@map null
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2022-11-18 11:00:36 +00:00
|
|
|
|
*/
|
2022-10-17 04:24:09 +00:00
|
|
|
|
|
|
|
|
|
suspend fun invokeTwoEmbed(
|
|
|
|
|
id: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$twoEmbedAPI/embed/tmdb/movie?id=$id"
|
|
|
|
|
} else {
|
|
|
|
|
"$twoEmbedAPI/embed/tmdb/tv?id=$id&s=$season&e=$episode"
|
|
|
|
|
}
|
|
|
|
|
val document = app.get(url).document
|
|
|
|
|
val captchaKey =
|
|
|
|
|
document.select("script[src*=https://www.google.com/recaptcha/api.js?render=]")
|
|
|
|
|
.attr("src").substringAfter("render=")
|
|
|
|
|
|
|
|
|
|
document.select(".dropdown-menu a[data-id]").map { it.attr("data-id") }.apmap { serverID ->
|
|
|
|
|
val token = APIHolder.getCaptchaToken(url, captchaKey)
|
|
|
|
|
app.get(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"$twoEmbedAPI/ajax/embed/play?id=$serverID&_token=$token", referer = url
|
2022-10-17 04:24:09 +00:00
|
|
|
|
).parsedSafe<EmbedJson>()?.let { source ->
|
2022-10-29 19:32:17 +00:00
|
|
|
|
val link = source.link ?: return@let
|
|
|
|
|
if (link.contains("rabbitstream")) {
|
|
|
|
|
val rabbitId = link.substringAfterLast("/").substringBefore("?")
|
|
|
|
|
app.get(
|
|
|
|
|
"https://rabbitstream.net/ajax/embed-5/getSources?id=$rabbitId",
|
|
|
|
|
headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
|
|
|
|
).parsedSafe<RabbitSources>()?.tracks?.map { sub ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
sub.label.toString(), sub.file ?: return@map null
|
2022-10-29 19:32:17 +00:00
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
loadExtractor(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
link, twoEmbedAPI, subtitleCallback, callback
|
2022-10-29 19:32:17 +00:00
|
|
|
|
)
|
|
|
|
|
}
|
2022-10-17 04:24:09 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-17 05:01:44 +00:00
|
|
|
|
suspend fun invokeVidSrc(
|
2022-10-17 04:24:09 +00:00
|
|
|
|
id: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val url = if (season == null) {
|
2022-10-17 04:28:32 +00:00
|
|
|
|
"$vidSrcAPI/embed/$id"
|
2022-10-17 04:24:09 +00:00
|
|
|
|
} else {
|
2022-10-17 04:28:32 +00:00
|
|
|
|
"$vidSrcAPI/embed/$id/${season}-${episode}"
|
2022-10-17 04:24:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-17 09:33:40 +00:00
|
|
|
|
loadExtractor(url, null, subtitleCallback) { link ->
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
link.name,
|
|
|
|
|
link.name,
|
|
|
|
|
link.url,
|
|
|
|
|
link.referer,
|
2022-11-12 12:08:52 +00:00
|
|
|
|
if (link.name == "VidSrc") Qualities.P1080.value else link.quality,
|
2022-10-17 09:33:40 +00:00
|
|
|
|
link.isM3u8,
|
|
|
|
|
link.headers,
|
|
|
|
|
link.extractorData
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
2022-10-17 04:24:09 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-17 08:03:20 +00:00
|
|
|
|
suspend fun invokeOlgply(
|
|
|
|
|
id: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
2022-10-17 05:01:44 +00:00
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-12-21 21:49:12 +00:00
|
|
|
|
val url = "$olgplyAPI/${id}${season?.let { "/$it" } ?: ""}${episode?.let { "/$it" } ?: ""}"
|
2022-10-17 08:03:20 +00:00
|
|
|
|
loadLinksWithWebView(url, callback)
|
2022-10-17 05:01:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-17 08:03:20 +00:00
|
|
|
|
suspend fun invokeDbgo(
|
|
|
|
|
id: String? = null,
|
2022-10-17 05:01:44 +00:00
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
2022-10-17 08:03:20 +00:00
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
2022-10-17 05:01:44 +00:00
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-10-17 09:03:17 +00:00
|
|
|
|
|
2022-11-07 10:16:02 +00:00
|
|
|
|
val iframeDbgo: String?
|
2022-10-17 09:03:17 +00:00
|
|
|
|
val script = if (season == null) {
|
|
|
|
|
val doc = app.get("$dbgoAPI/imdb.php?id=$id").document
|
|
|
|
|
iframeDbgo = doc.select("div.myvideo iframe").attr("src")
|
|
|
|
|
app.get(iframeDbgo, referer = "$dbgoAPI/").document.select("script")
|
|
|
|
|
.find { it.data().contains("CDNplayerConfig =") }?.data()
|
2022-10-17 08:03:20 +00:00
|
|
|
|
} else {
|
2022-10-17 09:03:17 +00:00
|
|
|
|
val doc = app.get("$dbgoAPI/tv-imdb.php?id=$id&s=$season").document
|
|
|
|
|
iframeDbgo = doc.select("div.myvideo iframe").attr("src")
|
|
|
|
|
val token = app.get(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
iframeDbgo, referer = "$dbgoAPI/"
|
2022-10-17 09:03:17 +00:00
|
|
|
|
).document.selectFirst("select#translator-name option")?.attr("data-token")
|
|
|
|
|
app.get("https://voidboost.net/serial/$token/iframe?s=$season&e=$episode&h=dbgo.fun").document.select(
|
|
|
|
|
"script"
|
2022-12-21 21:49:12 +00:00
|
|
|
|
).find { it.data().contains("CDNplayerConfig =") }?.data()
|
2023-01-20 22:06:45 +00:00
|
|
|
|
} ?: return
|
2022-10-17 08:03:20 +00:00
|
|
|
|
|
|
|
|
|
val source =
|
2023-01-20 22:06:45 +00:00
|
|
|
|
Regex("['|\"]file['|\"]:\\s['|\"](#\\S+?)['|\"]").find(script)?.groupValues?.get(
|
2022-10-17 08:03:20 +00:00
|
|
|
|
1
|
2022-11-12 12:08:52 +00:00
|
|
|
|
) ?: return
|
2022-10-17 08:03:20 +00:00
|
|
|
|
val subtitle =
|
2023-01-20 22:06:45 +00:00
|
|
|
|
Regex("['|\"]subtitle['|\"]:\\s['|\"](\\S+?)['|\"]").find(script)?.groupValues?.get(
|
2022-10-17 08:03:20 +00:00
|
|
|
|
1
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-07 10:16:02 +00:00
|
|
|
|
val ref = getBaseUrl(iframeDbgo)
|
2022-11-12 12:08:52 +00:00
|
|
|
|
decryptStreamUrl(source).split(",").map { links ->
|
2022-10-17 08:03:20 +00:00
|
|
|
|
val quality =
|
2023-01-29 04:32:17 +00:00
|
|
|
|
Regex("\\[([0-9]*p.*?)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
|
|
|
|
?: return@map null
|
2022-12-21 21:49:12 +00:00
|
|
|
|
links.replace("[$quality]", "").split(" or ").map { it.trim() }.map { link ->
|
|
|
|
|
val name = if (link.contains(".m3u8")) "Dbgo (Main)" else "Dbgo (Backup)"
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
name,
|
|
|
|
|
name,
|
|
|
|
|
link,
|
|
|
|
|
"$ref/",
|
|
|
|
|
getQuality(quality),
|
|
|
|
|
isM3u8 = link.contains(".m3u8"),
|
|
|
|
|
headers = mapOf(
|
|
|
|
|
"Origin" to ref
|
2022-10-17 08:03:20 +00:00
|
|
|
|
)
|
|
|
|
|
)
|
2022-12-21 21:49:12 +00:00
|
|
|
|
)
|
|
|
|
|
}
|
2022-10-17 08:03:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
subtitle?.split(",")?.map { sub ->
|
2023-01-20 22:06:45 +00:00
|
|
|
|
val language = Regex("\\[(.*)]").find(sub)?.groupValues?.getOrNull(1) ?: return@map null
|
2022-10-17 08:03:20 +00:00
|
|
|
|
val link = sub.replace("[$language]", "").trim()
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
2023-01-20 22:06:45 +00:00
|
|
|
|
getDbgoLanguage(language), link
|
2022-10-17 08:03:20 +00:00
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-18 00:20:30 +00:00
|
|
|
|
suspend fun invoke123Movie(
|
2022-10-18 01:13:02 +00:00
|
|
|
|
tmdbId: Int? = null,
|
|
|
|
|
imdbId: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
2022-10-18 00:20:30 +00:00
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-10-18 16:16:43 +00:00
|
|
|
|
val url = if (season == null) {
|
2022-10-18 01:13:02 +00:00
|
|
|
|
"$movie123API/imdb.php?imdb=$imdbId&server=vcu"
|
|
|
|
|
} else {
|
|
|
|
|
"$movie123API/tmdb_api.php?se=$season&ep=$episode&tmdb=$tmdbId&server_name=vcu"
|
|
|
|
|
}
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val iframe = app.get(url).document.selectFirst("iframe")?.attr("src") ?: return
|
2022-10-18 00:20:30 +00:00
|
|
|
|
|
|
|
|
|
val doc = app.get(
|
2022-11-13 20:02:28 +00:00
|
|
|
|
iframe,
|
2022-10-18 00:20:30 +00:00
|
|
|
|
referer = url,
|
|
|
|
|
headers = mapOf("Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8")
|
|
|
|
|
).document
|
|
|
|
|
|
|
|
|
|
doc.select("ul.list-server-items li.linkserver").mapNotNull { server ->
|
|
|
|
|
server.attr("data-video").let {
|
|
|
|
|
Regex("(.*?)((\\?cap)|(\\?sub)|(#cap)|(#sub))").find(it)?.groupValues?.get(1)
|
|
|
|
|
}
|
|
|
|
|
}.apmap { link ->
|
|
|
|
|
loadExtractor(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
link, "https://123moviesjr.cc/", subtitleCallback, callback
|
2022-10-18 00:20:30 +00:00
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-10-18 16:16:43 +00:00
|
|
|
|
|
|
|
|
|
suspend fun invokeMovieHab(
|
2022-10-28 03:57:14 +00:00
|
|
|
|
imdbId: String? = null,
|
2022-10-18 16:16:43 +00:00
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val url = if (season == null) {
|
2022-10-28 03:57:14 +00:00
|
|
|
|
"$movieHabAPI/embed/movie?imdb=$imdbId"
|
2022-10-18 16:16:43 +00:00
|
|
|
|
} else {
|
2022-10-28 03:57:14 +00:00
|
|
|
|
"$movieHabAPI/embed/series?imdb=$imdbId&sea=$season&epi=$episode"
|
2022-10-18 16:16:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val doc = app.get(url, referer = "$movieHabAPI/").document
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val movieId = doc.selectFirst("div#embed-player")?.attr("data-movie-id") ?: return
|
2022-10-18 16:16:43 +00:00
|
|
|
|
|
|
|
|
|
doc.select("div.dropdown-menu a").apmap {
|
|
|
|
|
val dataId = it.attr("data-id")
|
|
|
|
|
app.get(
|
|
|
|
|
"$movieHabAPI/ajax/get_stream_link?id=$dataId&movie=$movieId&is_init=true&captcha=&ref=",
|
|
|
|
|
referer = url,
|
|
|
|
|
headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
|
|
|
|
).parsedSafe<MovieHabRes>()?.data?.let { res ->
|
|
|
|
|
loadExtractor(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
res.link ?: return@let null, movieHabAPI, subtitleCallback, callback
|
2022-10-18 16:16:43 +00:00
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-10-19 21:46:22 +00:00
|
|
|
|
|
2022-10-27 08:46:19 +00:00
|
|
|
|
suspend fun invokeDatabaseGdrive(
|
|
|
|
|
imdbId: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$databaseGdriveAPI/player.php?imdb=$imdbId"
|
|
|
|
|
} else {
|
|
|
|
|
"$databaseGdriveAPI/player.php?type=series&imdb=$imdbId&season=$season&episode=$episode"
|
|
|
|
|
}
|
|
|
|
|
loadExtractor(url, databaseGdriveAPI, subtitleCallback, callback)
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
/* suspend fun invokeSoraVIP(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
orgTitle: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val apiUrl = base64DecodeAPI("aQ==YXA=cC8=YXA=bC4=Y2U=ZXI=LnY=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=")
|
|
|
|
|
val url = if(season == null) {
|
|
|
|
|
"$apiUrl/search/one?title=$title&orgTitle=$orgTitle&year=$year"
|
|
|
|
|
} else {
|
|
|
|
|
"$apiUrl/search/one?title=$title&orgTitle=$orgTitle&year=$year&season=$season"
|
|
|
|
|
}
|
2022-10-21 04:15:49 +00:00
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
val id = app.get(url).parsedSafe<DetailVipResult>()?.data?.id
|
2022-10-21 04:15:49 +00:00
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
val sourcesUrl = if(season == null) {
|
|
|
|
|
"$apiUrl/movie/detail?id=$id"
|
|
|
|
|
} else {
|
|
|
|
|
"$apiUrl/tv/detail?id=$id&episodeId=${episode?.minus(1)}"
|
|
|
|
|
}
|
2022-10-21 04:15:49 +00:00
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
val json = app.get(sourcesUrl).parsedSafe<LoadVIPLinks>()
|
2022-10-21 04:15:49 +00:00
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
json?.sources?.map { source ->
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"${this.name} (VIP)",
|
|
|
|
|
"${this.name} (VIP)",
|
|
|
|
|
source.url ?: return@map null,
|
|
|
|
|
"$apiUrl/",
|
|
|
|
|
source.quality ?: Qualities.Unknown.value,
|
|
|
|
|
isM3u8 = source.url.contains(".m3u8"),
|
|
|
|
|
)
|
2022-10-21 04:15:49 +00:00
|
|
|
|
)
|
2022-11-18 11:00:36 +00:00
|
|
|
|
}
|
2022-10-19 21:46:22 +00:00
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
json?.subtitles?.map { sub ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
getLanguage(sub.language.toString()),
|
|
|
|
|
sub.url ?: return@map null
|
|
|
|
|
)
|
2022-10-19 21:46:22 +00:00
|
|
|
|
)
|
2022-11-18 11:00:36 +00:00
|
|
|
|
}
|
2022-10-19 21:46:22 +00:00
|
|
|
|
}
|
2022-11-18 11:00:36 +00:00
|
|
|
|
*/
|
2022-10-19 21:46:22 +00:00
|
|
|
|
|
2022-10-27 08:46:19 +00:00
|
|
|
|
suspend fun invokeHDMovieBox(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
2022-12-31 18:06:35 +00:00
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
2022-10-27 08:46:19 +00:00
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-10-28 03:57:14 +00:00
|
|
|
|
val fixTitle = title.fixTitle()
|
2022-12-03 09:27:19 +00:00
|
|
|
|
val request = app.get("$hdMovieBoxAPI/watch/$fixTitle")
|
|
|
|
|
if (!request.isSuccessful) return
|
|
|
|
|
val doc = request.document
|
2022-10-27 08:46:19 +00:00
|
|
|
|
val id = if (season == null) {
|
|
|
|
|
doc.selectFirst("div.player div#not-loaded")?.attr("data-whatwehave")
|
|
|
|
|
} else {
|
|
|
|
|
doc.select("div.season-list-column div[data-season=$season] div.list div.item")[episode?.minus(
|
|
|
|
|
1
|
|
|
|
|
) ?: 0].selectFirst("div.ui.checkbox")?.attr("data-episode")
|
2022-12-03 09:27:19 +00:00
|
|
|
|
} ?: return
|
2022-10-27 08:46:19 +00:00
|
|
|
|
|
|
|
|
|
val iframeUrl = app.post(
|
|
|
|
|
"$hdMovieBoxAPI/ajax/service", data = mapOf(
|
2022-12-03 09:27:19 +00:00
|
|
|
|
"e_id" to id,
|
2022-10-27 08:46:19 +00:00
|
|
|
|
"v_lang" to "en",
|
|
|
|
|
"type" to "get_whatwehave",
|
|
|
|
|
), headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
|
|
|
|
).parsedSafe<HdMovieBoxIframe>()?.apiIframe ?: return
|
|
|
|
|
|
2022-11-13 20:02:28 +00:00
|
|
|
|
delay(1000)
|
2022-10-27 08:46:19 +00:00
|
|
|
|
val iframe = app.get(iframeUrl, referer = "$hdMovieBoxAPI/").document.selectFirst("iframe")
|
|
|
|
|
?.attr("src")
|
2022-12-31 18:06:35 +00:00
|
|
|
|
val base = getBaseUrl(iframe ?: return)
|
2022-10-27 08:46:19 +00:00
|
|
|
|
|
|
|
|
|
val script = app.get(
|
2022-12-31 18:06:35 +00:00
|
|
|
|
iframe, referer = "$hdMovieBoxAPI/"
|
2022-10-27 08:46:19 +00:00
|
|
|
|
).document.selectFirst("script:containsData(var vhash =)")?.data()
|
|
|
|
|
?.substringAfter("vhash, {")?.substringBefore("}, false")
|
|
|
|
|
|
|
|
|
|
tryParseJson<HdMovieBoxSource>("{$script}").let { source ->
|
2022-10-29 19:32:17 +00:00
|
|
|
|
val disk = if (source?.videoDisk == null) {
|
2022-10-27 09:58:50 +00:00
|
|
|
|
""
|
|
|
|
|
} else {
|
|
|
|
|
base64Encode(source.videoDisk.toString().toByteArray())
|
|
|
|
|
}
|
2022-10-27 08:46:19 +00:00
|
|
|
|
val link = getBaseUrl(iframe) + source?.videoUrl?.replace(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"\\", ""
|
2022-10-27 09:58:50 +00:00
|
|
|
|
) + "?s=${source?.videoServer}&d=$disk"
|
2022-10-27 08:46:19 +00:00
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"HDMovieBox",
|
|
|
|
|
"HDMovieBox",
|
|
|
|
|
link,
|
|
|
|
|
iframe,
|
|
|
|
|
Qualities.P1080.value,
|
|
|
|
|
isM3u8 = true,
|
|
|
|
|
)
|
|
|
|
|
)
|
2022-12-31 18:06:35 +00:00
|
|
|
|
|
|
|
|
|
source?.tracks?.map { sub ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
sub.label ?: "",
|
|
|
|
|
fixUrl(sub.file ?: return@map null, base),
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
2022-10-27 08:46:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
suspend fun invokeSeries9(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-10-28 03:57:14 +00:00
|
|
|
|
val fixTitle = title.fixTitle()
|
2022-10-27 08:46:19 +00:00
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$series9API/film/$fixTitle/watching.html"
|
|
|
|
|
} else {
|
|
|
|
|
"$series9API/film/$fixTitle-season-$season/watching.html"
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val request = app.get(url)
|
2022-11-18 11:00:36 +00:00
|
|
|
|
if (!request.isSuccessful) return
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val res = request.document
|
2022-10-29 19:32:17 +00:00
|
|
|
|
val sources: ArrayList<String?> = arrayListOf()
|
2022-10-27 08:46:19 +00:00
|
|
|
|
|
|
|
|
|
if (season == null) {
|
2022-10-29 19:32:17 +00:00
|
|
|
|
val xstreamcdn =
|
|
|
|
|
res.selectFirst("div#list-eps div#server-29 a")?.attr("player-data")?.let {
|
|
|
|
|
Regex("(.*?)((\\?cap)|(\\?sub)|(#cap)|(#sub))").find(it)?.groupValues?.get(1)
|
|
|
|
|
}
|
2022-10-27 08:46:19 +00:00
|
|
|
|
val streamsb = res.selectFirst("div#list-eps div#server-13 a")?.attr("player-data")
|
|
|
|
|
val doodstream = res.selectFirst("div#list-eps div#server-14 a")?.attr("player-data")
|
|
|
|
|
sources.addAll(listOf(xstreamcdn, streamsb, doodstream))
|
|
|
|
|
} else {
|
2022-10-29 19:32:17 +00:00
|
|
|
|
val xstreamcdn = res.selectFirst("div#list-eps div#server-29 a[episode-data=$episode]")
|
|
|
|
|
?.attr("player-data")?.let {
|
|
|
|
|
Regex("(.*?)((\\?cap)|(\\?sub)|(#cap)|(#sub))").find(it)?.groupValues?.get(1)
|
|
|
|
|
}
|
|
|
|
|
val streamsb = res.selectFirst("div#list-eps div#server-13 a[episode-data=$episode]")
|
|
|
|
|
?.attr("player-data")
|
|
|
|
|
val doodstream = res.selectFirst("div#list-eps div#server-14 a[episode-data=$episode]")
|
|
|
|
|
?.attr("player-data")
|
2022-10-27 08:46:19 +00:00
|
|
|
|
sources.addAll(listOf(xstreamcdn, streamsb, doodstream))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sources.apmap { link ->
|
|
|
|
|
loadExtractor(link ?: return@apmap null, url, subtitleCallback, callback)
|
|
|
|
|
}
|
2022-10-28 03:57:14 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
suspend fun invokeIdlix(
|
|
|
|
|
title: String? = null,
|
2022-10-30 05:29:18 +00:00
|
|
|
|
year: Int? = null,
|
2022-10-28 03:57:14 +00:00
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title.fixTitle()
|
2022-10-29 19:32:17 +00:00
|
|
|
|
val url = if (season == null) {
|
2022-10-30 05:29:18 +00:00
|
|
|
|
"$idlixAPI/movie/$fixTitle-$year"
|
2022-10-28 03:57:14 +00:00
|
|
|
|
} else {
|
|
|
|
|
"$idlixAPI/episode/$fixTitle-season-$season-episode-$episode"
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val res = app.get(url)
|
2022-11-18 11:00:36 +00:00
|
|
|
|
if (!res.isSuccessful) return
|
2022-12-05 22:13:58 +00:00
|
|
|
|
val referer = getBaseUrl(res.url)
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val document = res.document
|
2022-10-28 03:57:14 +00:00
|
|
|
|
val id = document.select("meta#dooplay-ajax-counter").attr("data-postid")
|
|
|
|
|
val type = if (url.contains("/movie/")) "movie" else "tv"
|
|
|
|
|
|
|
|
|
|
document.select("ul#playeroptionsul > li").map {
|
|
|
|
|
it.attr("data-nume")
|
|
|
|
|
}.apmap { nume ->
|
|
|
|
|
val source = app.post(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
url = "$referer/wp-admin/admin-ajax.php", data = mapOf(
|
|
|
|
|
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
|
|
|
|
|
), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), referer = url
|
2022-10-28 03:57:14 +00:00
|
|
|
|
).parsed<ResponseHash>().embed_url
|
2022-10-27 08:46:19 +00:00
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
if (!source.contains("youtube")) {
|
2022-12-05 22:13:58 +00:00
|
|
|
|
loadExtractor(source, "$referer/", subtitleCallback, callback)
|
2022-11-08 11:06:03 +00:00
|
|
|
|
}
|
2022-10-28 03:57:14 +00:00
|
|
|
|
}
|
2022-10-27 08:46:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-01 04:37:30 +00:00
|
|
|
|
suspend fun invokeUniqueStream(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title.fixTitle()
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$uniqueStreamAPI/movies/$fixTitle-$year"
|
|
|
|
|
} else {
|
|
|
|
|
"$uniqueStreamAPI/episodes/$fixTitle-season-$season-episode-$episode"
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val res = app.get(url)
|
2022-11-18 11:00:36 +00:00
|
|
|
|
if (!res.isSuccessful) return
|
2023-01-09 01:46:00 +00:00
|
|
|
|
val baseApi = getBaseUrl(res.url)
|
|
|
|
|
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val document = res.document
|
2022-11-19 05:03:37 +00:00
|
|
|
|
val type = if (url.contains("/movies/")) "movie" else "tv"
|
2022-11-01 04:37:30 +00:00
|
|
|
|
document.select("ul#playeroptionsul > li").apmap { el ->
|
|
|
|
|
val id = el.attr("data-post")
|
|
|
|
|
val nume = el.attr("data-nume")
|
|
|
|
|
val source = app.post(
|
2023-01-09 01:46:00 +00:00
|
|
|
|
url = "$baseApi/wp-admin/admin-ajax.php", data = mapOf(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
|
|
|
|
|
), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), referer = url
|
2022-11-01 04:37:30 +00:00
|
|
|
|
).parsed<ResponseHash>().embed_url.let { fixUrl(it) }
|
|
|
|
|
|
2022-11-19 05:48:25 +00:00
|
|
|
|
when {
|
|
|
|
|
source.contains("uniquestream") -> {
|
|
|
|
|
val resDoc = app.get(
|
2023-01-09 01:46:00 +00:00
|
|
|
|
source, referer = "$baseApi/", headers = mapOf(
|
2022-11-19 05:48:25 +00:00
|
|
|
|
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"
|
|
|
|
|
)
|
|
|
|
|
).document
|
2023-01-11 01:28:46 +00:00
|
|
|
|
val srcm3u8 =
|
|
|
|
|
resDoc.selectFirst("script:containsData(let url =)")?.data()?.let {
|
2022-11-28 10:29:41 +00:00
|
|
|
|
Regex("['|\"](.*?.m3u8)['|\"]").find(it)?.groupValues?.getOrNull(1)
|
2023-01-08 20:23:44 +00:00
|
|
|
|
}
|
2022-11-19 05:48:25 +00:00
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"UniqueStream",
|
|
|
|
|
"UniqueStream",
|
2023-01-08 20:23:44 +00:00
|
|
|
|
srcm3u8 ?: return@apmap null,
|
2022-11-19 05:48:25 +00:00
|
|
|
|
source,
|
2023-01-08 20:23:44 +00:00
|
|
|
|
Qualities.P1080.value,
|
2022-11-19 05:48:25 +00:00
|
|
|
|
true,
|
|
|
|
|
)
|
2022-11-01 04:37:30 +00:00
|
|
|
|
)
|
2022-11-19 05:48:25 +00:00
|
|
|
|
}
|
2022-11-28 10:29:41 +00:00
|
|
|
|
!source.contains("youtube") -> loadExtractor(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
source, "$uniqueStreamAPI/", subtitleCallback, callback
|
2022-11-28 10:29:41 +00:00
|
|
|
|
)
|
2022-11-19 05:48:25 +00:00
|
|
|
|
else -> {
|
|
|
|
|
// pass
|
|
|
|
|
}
|
2022-11-01 04:37:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-29 19:32:17 +00:00
|
|
|
|
suspend fun invokeNoverse(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title.fixTitle()
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$noverseAPI/movie/$fixTitle/download/"
|
|
|
|
|
} else {
|
|
|
|
|
"$noverseAPI/serie/$fixTitle/season-$season"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val doc = app.get(url).document
|
|
|
|
|
|
|
|
|
|
val links = if (season == null) {
|
|
|
|
|
doc.select("table.table-striped tbody tr").map {
|
|
|
|
|
it.select("a").attr("href") to it.selectFirst("td")?.text()
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
doc.select("table.table-striped tbody tr")
|
2022-12-21 21:49:12 +00:00
|
|
|
|
.find { it.text().contains("Episode $episode") }?.select("td")?.map {
|
2022-10-29 19:32:17 +00:00
|
|
|
|
it.select("a").attr("href") to it.select("a").text()
|
|
|
|
|
}
|
2022-11-13 20:02:28 +00:00
|
|
|
|
} ?: return
|
2022-10-29 19:32:17 +00:00
|
|
|
|
|
2022-11-13 20:02:28 +00:00
|
|
|
|
delay(4000)
|
|
|
|
|
links.map { (link, quality) ->
|
2022-10-29 19:32:17 +00:00
|
|
|
|
val name =
|
|
|
|
|
quality?.replace(Regex("[0-9]{3,4}p"), "Noverse")?.replace(".", " ") ?: "Noverse"
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
name,
|
|
|
|
|
name,
|
|
|
|
|
link,
|
2022-11-10 04:28:02 +00:00
|
|
|
|
"",
|
2022-10-29 19:32:17 +00:00
|
|
|
|
getQualityFromName("${quality?.substringBefore("p")?.trim()}p"),
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-02 06:56:24 +00:00
|
|
|
|
suspend fun invokeFilmxy(
|
|
|
|
|
imdbId: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"${filmxyAPI}/movie/$imdbId"
|
|
|
|
|
} else {
|
|
|
|
|
"${filmxyAPI}/tv/$imdbId"
|
|
|
|
|
}
|
2022-11-18 11:00:36 +00:00
|
|
|
|
val filmxyCookies =
|
|
|
|
|
getFilmxyCookies(imdbId, season) ?: throw ErrorLoadingException("No Cookies Found")
|
2022-11-02 06:56:24 +00:00
|
|
|
|
|
|
|
|
|
val cookiesDoc = mapOf(
|
|
|
|
|
"G_ENABLED_IDPS" to "google",
|
2022-11-10 05:06:59 +00:00
|
|
|
|
"wordpress_logged_in_8bf9d5433ac88cc9a3a396d6b154cd01" to "${filmxyCookies.wLog}",
|
|
|
|
|
"PHPSESSID" to "${filmxyCookies.phpsessid}"
|
2022-11-02 06:56:24 +00:00
|
|
|
|
)
|
|
|
|
|
|
2022-11-10 04:28:02 +00:00
|
|
|
|
val request = session.get(url, cookies = cookiesDoc)
|
2022-11-18 11:00:36 +00:00
|
|
|
|
if (!request.isSuccessful) return
|
2022-11-10 04:28:02 +00:00
|
|
|
|
|
|
|
|
|
val doc = request.document
|
2022-11-02 06:56:24 +00:00
|
|
|
|
val script = doc.selectFirst("script:containsData(var isSingle)")?.data().toString()
|
|
|
|
|
val sourcesData = Regex("listSE\\s*=\\s?(.*?),[\\n|\\s]").find(script)?.groupValues?.get(1)
|
2023-01-03 23:01:24 +00:00
|
|
|
|
val sourcesDetail =
|
|
|
|
|
Regex("linkDetails\\s*=\\s?(.*?),[\\n|\\s]").find(script)?.groupValues?.get(1)
|
|
|
|
|
val subSources =
|
|
|
|
|
Regex("dSubtitles\\s*=\\s?(.*?),[\\n|\\s]").find(script)?.groupValues?.get(1)
|
2022-11-02 06:56:24 +00:00
|
|
|
|
|
|
|
|
|
//Gson is shit, but i don't care
|
|
|
|
|
val sourcesJson = JsonParser().parse(sourcesData).asJsonObject
|
|
|
|
|
val sourcesDetailJson = JsonParser().parse(sourcesDetail).asJsonObject
|
2022-12-30 22:16:30 +00:00
|
|
|
|
val subJson = JsonParser().parse(subSources).asJsonObject
|
2022-11-02 06:56:24 +00:00
|
|
|
|
|
|
|
|
|
val sources = if (season == null && episode == null) {
|
|
|
|
|
sourcesJson.getAsJsonObject("movie").getAsJsonArray("movie")
|
|
|
|
|
} else {
|
|
|
|
|
val eps = if (episode!! < 10) "0$episode" else episode
|
|
|
|
|
val sson = if (season!! < 10) "0$season" else season
|
|
|
|
|
sourcesJson.getAsJsonObject("s$sson").getAsJsonArray("e$eps")
|
|
|
|
|
}.asJsonArray
|
|
|
|
|
|
2022-12-30 22:16:30 +00:00
|
|
|
|
val subSource = if (season == null && episode == null) {
|
|
|
|
|
subJson.getAsJsonObject("movie").getAsJsonObject("movie")
|
|
|
|
|
} else {
|
|
|
|
|
val eps = if (episode!! < 10) "0$episode" else episode
|
|
|
|
|
val sson = if (season!! < 10) "0$season" else season
|
|
|
|
|
subJson.getAsJsonObject("s$sson").getAsJsonObject("e$eps")
|
|
|
|
|
}.asJsonObject
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
val scriptUser =
|
|
|
|
|
doc.select("script").find { it.data().contains("var userNonce") }?.data().toString()
|
|
|
|
|
val userNonce =
|
|
|
|
|
Regex("var\\suserNonce.*?[\"|'](\\S+?)[\"|'];").find(scriptUser)?.groupValues?.get(1)
|
|
|
|
|
val userId =
|
|
|
|
|
Regex("var\\suser_id.*?[\"|'](\\S+?)[\"|'];").find(scriptUser)?.groupValues?.get(1)
|
2022-11-02 06:56:24 +00:00
|
|
|
|
val linkIDs = sources.joinToString("") {
|
|
|
|
|
"&linkIDs%5B%5D=$it"
|
|
|
|
|
}.replace("\"", "")
|
|
|
|
|
|
|
|
|
|
val body = "action=get_vid_links$linkIDs&user_id=$userId&nonce=$userNonce".toRequestBody()
|
|
|
|
|
val cookiesJson = mapOf(
|
|
|
|
|
"G_ENABLED_IDPS" to "google",
|
2022-11-10 05:06:59 +00:00
|
|
|
|
"PHPSESSID" to "${filmxyCookies.phpsessid}",
|
|
|
|
|
"wordpress_logged_in_8bf9d5433ac88cc9a3a396d6b154cd01" to "${filmxyCookies.wLog}",
|
|
|
|
|
"wordpress_sec_8bf9d5433ac88cc9a3a396d6b154cd01" to "${filmxyCookies.wSec}"
|
2022-11-02 06:56:24 +00:00
|
|
|
|
)
|
|
|
|
|
val json = app.post(
|
|
|
|
|
"$filmxyAPI/wp-admin/admin-ajax.php",
|
|
|
|
|
requestBody = body,
|
|
|
|
|
referer = url,
|
|
|
|
|
headers = mapOf(
|
|
|
|
|
"Accept" to "*/*",
|
|
|
|
|
"DNT" to "1",
|
|
|
|
|
"Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8",
|
|
|
|
|
"Origin" to filmxyAPI,
|
|
|
|
|
"X-Requested-With" to "XMLHttpRequest",
|
|
|
|
|
),
|
|
|
|
|
cookies = cookiesJson
|
2022-11-10 04:49:36 +00:00
|
|
|
|
).text.let { JsonParser().parse(it).asJsonObject }
|
2022-11-02 06:56:24 +00:00
|
|
|
|
|
|
|
|
|
sources.map { source ->
|
|
|
|
|
val src = source.asString
|
|
|
|
|
val link = json.getAsJsonPrimitive(src).asString
|
2022-11-18 11:00:36 +00:00
|
|
|
|
val quality =
|
|
|
|
|
sourcesDetailJson.getAsJsonObject(src).getAsJsonPrimitive("resolution").asString
|
|
|
|
|
val server =
|
|
|
|
|
sourcesDetailJson.getAsJsonObject(src).getAsJsonPrimitive("server").asString
|
2022-11-02 06:56:24 +00:00
|
|
|
|
val size = sourcesDetailJson.getAsJsonObject(src).getAsJsonPrimitive("size").asString
|
|
|
|
|
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"Filmxy $size ($server)",
|
|
|
|
|
"Filmxy $size ($server)",
|
|
|
|
|
link,
|
|
|
|
|
"$filmxyAPI/",
|
|
|
|
|
getQualityFromName(quality)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-30 22:16:30 +00:00
|
|
|
|
subSource.toString().removeSurrounding("{", "}").split(",").map {
|
|
|
|
|
val slug = Regex("\"(\\w+)\":\"(\\d+)\"").find(it)?.groupValues
|
|
|
|
|
slug?.getOrNull(1) to slug?.getOrNull(2)
|
|
|
|
|
}.map { (lang, id) ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
SubtitleHelper.fromTwoLettersToLanguage(lang ?: "") ?: "$lang",
|
|
|
|
|
"https://www.mysubs.org/get-subtitle/$id"
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2022-11-02 06:56:24 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-07 10:16:02 +00:00
|
|
|
|
suspend fun invokeKimcartoon(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-11-12 12:08:52 +00:00
|
|
|
|
val fixTitle = title.fixTitle()
|
2023-01-20 10:10:37 +00:00
|
|
|
|
val doc = if (season == null || season == 1) {
|
|
|
|
|
app.get("$kimcartoonAPI/Cartoon/$fixTitle").document
|
2022-11-07 10:16:02 +00:00
|
|
|
|
} else {
|
2023-01-20 10:10:37 +00:00
|
|
|
|
val res = app.get("$kimcartoonAPI/Cartoon/$fixTitle-Season-$season")
|
|
|
|
|
if (res.url == "$kimcartoonAPI/")
|
|
|
|
|
app.get("$kimcartoonAPI/Cartoon/$fixTitle-Season-0$season").document else res.document
|
2022-11-07 10:16:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val iframe = if (season == null) {
|
|
|
|
|
doc.select("table.listing tr td a").firstNotNullOf { it.attr("href") }
|
|
|
|
|
} else {
|
2023-01-20 10:10:37 +00:00
|
|
|
|
doc.select("table.listing tr td a").find {
|
|
|
|
|
it.attr("href").contains(Regex("(?i)Episode-0*$episode"))
|
|
|
|
|
}?.attr("href")
|
2022-11-07 10:16:02 +00:00
|
|
|
|
} ?: return
|
2022-11-18 11:00:36 +00:00
|
|
|
|
val source =
|
2023-01-20 10:10:37 +00:00
|
|
|
|
app.get(
|
|
|
|
|
fixUrl(iframe, kimcartoonAPI)
|
|
|
|
|
).document.selectFirst("div#divContentVideo iframe")
|
|
|
|
|
?.attr("src") ?: return
|
2022-11-07 10:16:02 +00:00
|
|
|
|
loadExtractor(source, "$kimcartoonAPI/", subtitleCallback) { link ->
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
2023-01-20 10:10:37 +00:00
|
|
|
|
"Kimcartoon",
|
|
|
|
|
"Kimcartoon",
|
2022-11-07 10:16:02 +00:00
|
|
|
|
link.url,
|
|
|
|
|
link.referer,
|
|
|
|
|
link.quality,
|
|
|
|
|
link.isM3u8,
|
|
|
|
|
link.headers,
|
|
|
|
|
link.extractorData
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
private suspend fun invokeNetMovies(
|
|
|
|
|
id: String? = null,
|
|
|
|
|
type: String? = null,
|
2022-11-08 09:08:34 +00:00
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2023-01-09 04:31:31 +00:00
|
|
|
|
val epsId = app.get(
|
2023-01-08 20:23:44 +00:00
|
|
|
|
"$netMoviesAPI/detail?category=$type&id=$id",
|
2023-01-09 04:31:31 +00:00
|
|
|
|
).parsedSafe<Load>()?.data?.episodeVo?.find {
|
2023-01-08 20:23:44 +00:00
|
|
|
|
it.seriesNo == (episode ?: 0)
|
2023-01-09 04:31:31 +00:00
|
|
|
|
}?.id ?: return
|
2022-11-08 09:08:34 +00:00
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
val sources = app.get("$netMoviesAPI/episode?category=$type&id=$id&episode=$epsId")
|
|
|
|
|
.parsedSafe<NetMoviesSources>()?.data ?: return
|
|
|
|
|
|
|
|
|
|
sources.subtitles?.map { sub ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
2023-01-09 03:55:20 +00:00
|
|
|
|
getVipLanguage(sub.lang ?: return@map null),
|
2023-01-08 20:23:44 +00:00
|
|
|
|
sub.url ?: return@map null
|
|
|
|
|
)
|
2022-11-08 09:08:34 +00:00
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
sources.qualities?.map { source ->
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"NetMovies",
|
|
|
|
|
"NetMovies",
|
|
|
|
|
source.url ?: return@map null,
|
|
|
|
|
"",
|
|
|
|
|
source.quality?.toIntOrNull() ?: Qualities.Unknown.value,
|
|
|
|
|
isM3u8 = true,
|
|
|
|
|
)
|
|
|
|
|
)
|
2022-11-08 09:08:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-09 03:55:20 +00:00
|
|
|
|
suspend fun invokeSoraStream(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
2023-01-08 20:23:44 +00:00
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val headers = mapOf(
|
|
|
|
|
"lang" to "en",
|
|
|
|
|
"versioncode" to "11",
|
|
|
|
|
"clienttype" to "ios_jike_default"
|
|
|
|
|
)
|
2023-01-11 01:28:46 +00:00
|
|
|
|
val vipAPI =
|
|
|
|
|
base64DecodeAPI("cA==YXA=cy8=Y20=di8=LnQ=b2s=a2w=bG8=aS4=YXA=ZS0=aWw=b2I=LW0=Z2E=Ly8=czo=dHA=aHQ=")
|
2023-01-08 20:23:44 +00:00
|
|
|
|
val searchUrl = base64DecodeAPI("b20=LmM=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=")
|
|
|
|
|
val doc = app.get(
|
|
|
|
|
"$searchUrl/search?keyword=$title",
|
|
|
|
|
).document
|
|
|
|
|
|
|
|
|
|
val scriptData = doc.select("div.search-list div.search-video-card").map {
|
|
|
|
|
Triple(
|
|
|
|
|
it.selectFirst("h2.title")?.text().toString(),
|
|
|
|
|
it.selectFirst("div.desc")?.text()
|
|
|
|
|
?.substringBefore(".")?.toIntOrNull(),
|
|
|
|
|
it.selectFirst("a")?.attr("href")?.split("/")
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val script = if (scriptData.size == 1) {
|
|
|
|
|
scriptData.firstOrNull()
|
|
|
|
|
} else {
|
|
|
|
|
scriptData.find {
|
|
|
|
|
when (season) {
|
|
|
|
|
null -> {
|
|
|
|
|
it.first.equals(
|
|
|
|
|
title,
|
|
|
|
|
true
|
|
|
|
|
) && it.second == year
|
|
|
|
|
}
|
|
|
|
|
1 -> {
|
|
|
|
|
it.first.contains(
|
|
|
|
|
"$title",
|
|
|
|
|
true
|
|
|
|
|
) && (it.second == year || it.first.contains("Season $season", true))
|
|
|
|
|
}
|
|
|
|
|
else -> {
|
|
|
|
|
it.first.contains(
|
|
|
|
|
"$title",
|
|
|
|
|
true
|
|
|
|
|
) && it.second == year && it.first.contains("Season $season", true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val id = script?.third?.last() ?: return
|
|
|
|
|
val type = script.third?.get(2) ?: return
|
|
|
|
|
|
2023-01-09 03:55:20 +00:00
|
|
|
|
val jsonResponse = app.get(
|
|
|
|
|
"$vipAPI/movieDrama/get?id=${id}&category=${type}",
|
|
|
|
|
headers = headers
|
2023-01-09 04:31:31 +00:00
|
|
|
|
).parsedSafe<Load>()?.data
|
2023-01-12 05:00:45 +00:00
|
|
|
|
?: return invokeNetMovies(id, type, episode, subtitleCallback, callback)
|
2023-01-08 20:23:44 +00:00
|
|
|
|
|
2023-01-12 05:00:45 +00:00
|
|
|
|
val json = jsonResponse.episodeVo?.find {
|
2023-01-09 03:55:20 +00:00
|
|
|
|
it.seriesNo == (episode ?: 0)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
json?.subtitlingList?.map { sub ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
getVipLanguage(sub.languageAbbr ?: return@map),
|
|
|
|
|
sub.subtitlingUrl ?: return@map
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
json?.definitionList?.apmap { video ->
|
|
|
|
|
val body =
|
|
|
|
|
"""[{"category":$type,"contentId":"$id","episodeId":${json.id},"definition":"${video.code}"}]""".toRequestBody(
|
|
|
|
|
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
|
|
|
|
)
|
|
|
|
|
val response = app.post(
|
|
|
|
|
"${vipAPI}/media/bathGetplayInfo",
|
|
|
|
|
requestBody = body,
|
|
|
|
|
headers = headers,
|
|
|
|
|
).text.let { tryParseJson<PreviewResponse>(it)?.data?.firstOrNull() }
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
this.name,
|
|
|
|
|
this.name,
|
|
|
|
|
response?.mediaUrl ?: return@apmap null,
|
|
|
|
|
"",
|
|
|
|
|
getSoraQuality(response.currentDefinition ?: ""),
|
|
|
|
|
isM3u8 = true,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-12 12:08:52 +00:00
|
|
|
|
suspend fun invokeXmovies(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-12-12 17:28:45 +00:00
|
|
|
|
val fixTitle = title.fixTitle()
|
2023-01-29 04:32:17 +00:00
|
|
|
|
val doc = if (season == null) {
|
2023-01-20 10:10:37 +00:00
|
|
|
|
val res = app.get("$xMovieAPI/movies/$fixTitle/watch")
|
2023-01-29 04:32:17 +00:00
|
|
|
|
if (res.url == "$xMovieAPI/") app.get("$xMovieAPI/movies/$fixTitle-$year/watch").document else res.document
|
2022-11-12 12:08:52 +00:00
|
|
|
|
} else {
|
2023-01-20 10:10:37 +00:00
|
|
|
|
app.get("$xMovieAPI/series/$fixTitle-season-$season-episode-$episode/watch").document
|
2022-11-12 12:08:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-12-31 18:06:35 +00:00
|
|
|
|
val script = doc.selectFirst("script:containsData(const player =)")?.data() ?: return
|
2023-01-03 23:01:24 +00:00
|
|
|
|
val link =
|
|
|
|
|
Regex("[\"|']file[\"|']:\\s?[\"|'](http.*?.(mp4|m3u8))[\"|'],").find(script)?.groupValues?.getOrNull(
|
2022-12-15 12:30:01 +00:00
|
|
|
|
1
|
2022-12-31 18:06:35 +00:00
|
|
|
|
) ?: return
|
2022-11-12 12:08:52 +00:00
|
|
|
|
|
2023-01-03 23:01:24 +00:00
|
|
|
|
if (link.contains(".m3u8")) {
|
2022-12-31 18:06:35 +00:00
|
|
|
|
M3u8Helper.generateM3u8(
|
2022-11-12 12:08:52 +00:00
|
|
|
|
"Xmovie",
|
2022-12-31 18:06:35 +00:00
|
|
|
|
link,
|
2022-11-12 12:08:52 +00:00
|
|
|
|
"",
|
2022-12-31 18:06:35 +00:00
|
|
|
|
).forEach(callback)
|
|
|
|
|
} else {
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"Xmovie",
|
|
|
|
|
"Xmovie",
|
|
|
|
|
link,
|
|
|
|
|
"",
|
|
|
|
|
Qualities.P720.value,
|
|
|
|
|
)
|
2022-11-12 12:08:52 +00:00
|
|
|
|
)
|
2022-12-31 18:06:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-03 23:01:24 +00:00
|
|
|
|
Regex(""""file":\s+?"(\S+\.(vtt|srt))""").find(script)?.groupValues?.getOrNull(1)
|
|
|
|
|
?.let { sub ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
"English",
|
|
|
|
|
sub,
|
|
|
|
|
)
|
2022-12-31 18:06:35 +00:00
|
|
|
|
)
|
2023-01-03 23:01:24 +00:00
|
|
|
|
}
|
2022-11-12 12:08:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-13 20:02:28 +00:00
|
|
|
|
suspend fun invokeFlixhq(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title?.replace("–", "-")
|
2022-12-21 21:49:12 +00:00
|
|
|
|
val id = app.get("$consumetFlixhqAPI/$title")
|
|
|
|
|
.parsedSafe<ConsumetSearchResponse>()?.results?.find {
|
|
|
|
|
if (season == null) {
|
|
|
|
|
it.title?.equals(
|
|
|
|
|
"$fixTitle", true
|
|
|
|
|
) == true && it.releaseDate?.equals("$year") == true && it.type == "Movie"
|
|
|
|
|
} else {
|
|
|
|
|
it.title?.equals("$fixTitle", true) == true && it.type == "TV Series"
|
|
|
|
|
}
|
|
|
|
|
}?.id ?: return
|
2022-11-18 11:00:36 +00:00
|
|
|
|
|
|
|
|
|
val episodeId =
|
|
|
|
|
app.get("$consumetFlixhqAPI/info?id=$id").parsedSafe<ConsumetDetails>()?.let {
|
2022-11-13 20:02:28 +00:00
|
|
|
|
if (season == null) {
|
2022-11-18 11:00:36 +00:00
|
|
|
|
it.episodes?.first()?.id
|
2022-11-13 20:02:28 +00:00
|
|
|
|
} else {
|
2022-11-18 11:00:36 +00:00
|
|
|
|
it.episodes?.find { ep -> ep.number == episode && ep.season == season }?.id
|
2022-11-13 20:02:28 +00:00
|
|
|
|
}
|
2022-11-18 11:00:36 +00:00
|
|
|
|
} ?: return
|
2022-11-13 20:02:28 +00:00
|
|
|
|
|
|
|
|
|
listOf(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"vidcloud", "upcloud"
|
2022-11-13 20:02:28 +00:00
|
|
|
|
).apmap { server ->
|
2022-12-21 21:49:12 +00:00
|
|
|
|
val sources = app.get(
|
|
|
|
|
"$consumetFlixhqAPI/watch?episodeId=$episodeId&mediaId=$id&server=$server",
|
|
|
|
|
).parsedSafe<ConsumetSourcesResponse>()
|
2022-11-13 20:02:28 +00:00
|
|
|
|
val name = fixTitle(server)
|
|
|
|
|
sources?.sources?.map {
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
name,
|
|
|
|
|
name,
|
|
|
|
|
it.url ?: return@map null,
|
|
|
|
|
sources.headers?.referer ?: "",
|
|
|
|
|
it.quality?.toIntOrNull() ?: Qualities.Unknown.value,
|
|
|
|
|
it.isM3U8 ?: true
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sources?.subtitles?.map {
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
it.lang ?: "", it.url ?: return@map null
|
2022-11-13 20:02:28 +00:00
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-14 09:35:04 +00:00
|
|
|
|
suspend fun invokeKisskh(
|
2022-11-13 20:02:28 +00:00
|
|
|
|
title: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title?.replace("–", "-")
|
|
|
|
|
val res = app.get(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"$kissKhAPI/api/DramaList/Search?q=$title&type=0", referer = "$kissKhAPI/"
|
2022-11-13 20:02:28 +00:00
|
|
|
|
).text.let {
|
|
|
|
|
tryParseJson<ArrayList<KisskhResults>>(it)
|
|
|
|
|
} ?: return
|
|
|
|
|
|
|
|
|
|
val (id, contentTitle) = if (res.size == 1) {
|
|
|
|
|
res.first().id to res.first().title
|
|
|
|
|
} else {
|
|
|
|
|
if (season == null) {
|
|
|
|
|
val data = res.find { it.title.equals(fixTitle, true) }
|
|
|
|
|
data?.id to data?.title
|
|
|
|
|
} else {
|
|
|
|
|
val data = res.find {
|
|
|
|
|
it.title?.contains(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"$fixTitle", true
|
2022-11-13 20:02:28 +00:00
|
|
|
|
) == true && it.title.contains("Season $season", true)
|
|
|
|
|
}
|
|
|
|
|
data?.id to data?.title
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val resDetail = app.get(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"$kissKhAPI/api/DramaList/Drama/$id?isq=false", referer = "$kissKhAPI/Drama/${
|
2022-11-13 20:02:28 +00:00
|
|
|
|
getKisskhTitle(contentTitle)
|
|
|
|
|
}?id=$id"
|
|
|
|
|
).parsedSafe<KisskhDetail>() ?: return
|
|
|
|
|
|
|
|
|
|
val epsId = if (season == null) {
|
|
|
|
|
resDetail.episodes?.first()?.id
|
|
|
|
|
} else {
|
|
|
|
|
resDetail.episodes?.find { it.number == episode }?.id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
delay(2000)
|
|
|
|
|
app.get(
|
|
|
|
|
"$kissKhAPI/api/DramaList/Episode/$epsId.png?err=false&ts=&time=",
|
|
|
|
|
referer = "$kissKhAPI/Drama/${getKisskhTitle(contentTitle)}/Episode-${episode ?: 0}?id=$id&ep=$epsId&page=0&pageSize=100"
|
|
|
|
|
).parsedSafe<KisskhSources>()?.let { source ->
|
|
|
|
|
listOf(source.video, source.thirdParty).apmap { link ->
|
|
|
|
|
if (link?.contains(".m3u8") == true) {
|
|
|
|
|
M3u8Helper.generateM3u8(
|
|
|
|
|
"Kisskh",
|
|
|
|
|
link,
|
|
|
|
|
referer = "$kissKhAPI/",
|
|
|
|
|
headers = mapOf("Origin" to kissKhAPI)
|
|
|
|
|
).forEach(callback)
|
|
|
|
|
} else {
|
|
|
|
|
loadExtractor(
|
|
|
|
|
link?.substringBefore("=http") ?: return@apmap null,
|
|
|
|
|
"$kissKhAPI/",
|
|
|
|
|
subtitleCallback,
|
2022-11-19 04:37:28 +00:00
|
|
|
|
callback
|
|
|
|
|
)
|
2022-11-13 20:02:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
app.get("$kissKhAPI/api/Sub/$epsId").text.let { resSub ->
|
|
|
|
|
tryParseJson<List<KisskhSubtitle>>(resSub)?.map { sub ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
getLanguage(sub.label ?: return@map), sub.src ?: return@map
|
2022-11-13 20:02:28 +00:00
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-11 01:28:46 +00:00
|
|
|
|
suspend fun invokeAnimes(
|
2022-11-18 11:00:36 +00:00
|
|
|
|
id: Int? = null,
|
2023-01-11 01:28:46 +00:00
|
|
|
|
title: String? = null,
|
2023-01-11 12:42:59 +00:00
|
|
|
|
epsTitle: String? = null,
|
2023-01-11 08:08:53 +00:00
|
|
|
|
year: Int? = null,
|
2022-11-18 11:00:36 +00:00
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2023-01-11 08:08:53 +00:00
|
|
|
|
val malId =
|
|
|
|
|
if (season != null) app.get("$tmdb2mal/?id=$id&s=$season").text.trim()
|
|
|
|
|
else app.get("${jikanAPI}/anime?q=${title}&start_date=${year}&type=movie&limit=1")
|
|
|
|
|
.parsedSafe<JikanResponse>()?.data?.firstOrNull()?.mal_id
|
|
|
|
|
|
|
|
|
|
val aniId = app.post(
|
|
|
|
|
"https://graphql.anilist.co/", data = mapOf(
|
|
|
|
|
"query" to "{Media(idMal:$malId,type:ANIME){id}}",
|
|
|
|
|
)
|
|
|
|
|
).parsedSafe<DataAni>()?.data?.media?.id
|
2023-01-11 01:28:46 +00:00
|
|
|
|
|
|
|
|
|
argamap(
|
|
|
|
|
{
|
2023-01-11 08:08:53 +00:00
|
|
|
|
invokeZoro(aniId, episode, subtitleCallback, callback)
|
2023-01-11 01:28:46 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
2023-01-11 12:42:59 +00:00
|
|
|
|
invokeAnimeKaizoku(malId, epsTitle, season, episode, callback)
|
2023-01-11 01:28:46 +00:00
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private suspend fun invokeZoro(
|
2023-01-11 08:08:53 +00:00
|
|
|
|
aniId: String? = null,
|
2023-01-11 01:28:46 +00:00
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2023-01-11 08:08:53 +00:00
|
|
|
|
val episodeId = app.get("$consumetAnilistAPI/info/$aniId?provider=zoro")
|
2022-11-18 11:00:36 +00:00
|
|
|
|
.parsedSafe<ConsumetDetails>()?.episodes?.find {
|
2023-01-11 08:08:53 +00:00
|
|
|
|
it.number == (episode ?: 1)
|
2022-12-23 12:02:01 +00:00
|
|
|
|
}?.id?.substringBeforeLast("$") ?: return
|
2022-11-18 11:00:36 +00:00
|
|
|
|
|
2022-12-23 12:02:01 +00:00
|
|
|
|
listOf(
|
2023-01-19 03:03:12 +00:00
|
|
|
|
"$episodeId\$sub" to "Raw",
|
2022-12-23 12:02:01 +00:00
|
|
|
|
"$episodeId\$dub" to "English Dub",
|
|
|
|
|
).apmap { (id, type) ->
|
|
|
|
|
val sources = app.get("$consumetZoroAPI/watch?episodeId=$id")
|
|
|
|
|
.parsedSafe<ConsumetSourcesResponse>() ?: return@apmap null
|
2022-11-18 11:00:36 +00:00
|
|
|
|
|
2022-12-23 12:02:01 +00:00
|
|
|
|
sources.sources?.map sources@{
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"Zoro [$type]",
|
|
|
|
|
"Zoro [$type]",
|
|
|
|
|
it.url ?: return@sources null,
|
|
|
|
|
"",
|
|
|
|
|
getQualityFromName(it.quality),
|
|
|
|
|
it.isM3U8 ?: true
|
|
|
|
|
)
|
2022-11-18 11:00:36 +00:00
|
|
|
|
)
|
2022-12-23 12:02:01 +00:00
|
|
|
|
}
|
2022-11-18 11:00:36 +00:00
|
|
|
|
|
2022-12-23 12:02:01 +00:00
|
|
|
|
sources.subtitles?.map subtitles@{
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
it.lang ?: "",
|
|
|
|
|
it.url ?: return@subtitles null
|
|
|
|
|
)
|
2022-11-18 11:00:36 +00:00
|
|
|
|
)
|
2022-12-23 12:02:01 +00:00
|
|
|
|
}
|
2022-11-18 11:00:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-11 01:28:46 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private suspend fun invokeAnimeKaizoku(
|
|
|
|
|
malId: String? = null,
|
2023-01-11 12:42:59 +00:00
|
|
|
|
epsTitle: String? = null,
|
2023-01-11 01:28:46 +00:00
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2023-01-11 08:53:47 +00:00
|
|
|
|
val search = app.get("$animeKaizokuAPI/?s=$malId").document
|
2023-01-11 01:28:46 +00:00
|
|
|
|
val detailHref =
|
|
|
|
|
search.select("ul#posts-container li").map { it.selectFirst("a")?.attr("href") }
|
|
|
|
|
.find {
|
2023-01-11 08:08:53 +00:00
|
|
|
|
it?.contains(malId ?: return) == true
|
2023-01-11 01:28:46 +00:00
|
|
|
|
}?.let { fixUrl(it, animeKaizokuAPI) }
|
|
|
|
|
|
|
|
|
|
val detail = app.get(detailHref ?: return).document
|
|
|
|
|
val postId =
|
|
|
|
|
detail.selectFirst("link[rel=shortlink]")?.attr("href")?.substringAfter("?p=") ?: return
|
|
|
|
|
val script = detail.selectFirst("script:containsData(DDL)")?.data()?.splitData() ?: return
|
|
|
|
|
|
|
|
|
|
val media = fetchingKaizoku(animeKaizokuAPI, postId, script, detailHref).document
|
|
|
|
|
val iframe = media.select("tbody td[colspan=2]").map { it.attr("onclick") to it.text() }
|
|
|
|
|
.filter { it.second.contains("1080p", true) }
|
|
|
|
|
|
|
|
|
|
val eps = if (season == null) {
|
|
|
|
|
null
|
|
|
|
|
} else {
|
|
|
|
|
if (episode!! < 10) "0$episode" else episode
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
iframe.apmap { (data, name) ->
|
|
|
|
|
val worker =
|
|
|
|
|
fetchingKaizoku(animeKaizokuAPI, postId, data.splitData(), detailHref).document
|
|
|
|
|
.select("tbody td")
|
|
|
|
|
.map { Triple(it.attr("onclick"), it.text(), it.nextElementSibling()?.text()) }
|
2022-11-18 11:00:36 +00:00
|
|
|
|
|
2023-01-11 01:28:46 +00:00
|
|
|
|
val episodeData = worker.let { list ->
|
|
|
|
|
if (season == null) list.firstOrNull() else list.find {
|
|
|
|
|
it.second.contains(
|
|
|
|
|
Regex("($eps\\.)|(-\\s$eps)")
|
2023-01-11 12:42:59 +00:00
|
|
|
|
) || it.second.contains("$epsTitle", true)
|
2023-01-11 01:28:46 +00:00
|
|
|
|
}
|
|
|
|
|
} ?: return@apmap null
|
|
|
|
|
|
|
|
|
|
val ouo = fetchingKaizoku(
|
|
|
|
|
animeKaizokuAPI,
|
|
|
|
|
postId,
|
|
|
|
|
episodeData.first.splitData(),
|
|
|
|
|
detailHref
|
|
|
|
|
).text.substringAfter("openInNewTab(\"")
|
|
|
|
|
.substringBefore("\")").let { base64Decode(it) }
|
|
|
|
|
|
2023-01-11 08:08:53 +00:00
|
|
|
|
if (!ouo.startsWith("https://ouo")) return@apmap null
|
2023-01-11 01:28:46 +00:00
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"AnimeKaizoku [${episodeData.third}]",
|
|
|
|
|
"AnimeKaizoku [${episodeData.third}]",
|
|
|
|
|
bypassOuo(ouo) ?: return@apmap null,
|
|
|
|
|
"$animeKaizokuAPI/",
|
|
|
|
|
Qualities.P1080.value,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
2022-11-18 11:00:36 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-11-19 04:37:28 +00:00
|
|
|
|
suspend fun invokeLing(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title?.replace("–", "-")
|
2022-11-28 10:29:41 +00:00
|
|
|
|
val url = if (season == null) {
|
2022-11-19 04:37:28 +00:00
|
|
|
|
"$lingAPI/en/videos/films/?title=$fixTitle"
|
|
|
|
|
} else {
|
|
|
|
|
"$lingAPI/en/videos/serials/?title=$fixTitle"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val scriptData = app.get(url).document.select("div.blk.padding_b0 div.col-sm-30").map {
|
|
|
|
|
Triple(
|
|
|
|
|
it.selectFirst("div.video-body h5")?.text(),
|
|
|
|
|
it.selectFirst("div.video-body > p")?.text(),
|
|
|
|
|
it.selectFirst("div.video-body a")?.attr("href"),
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val script = if (scriptData.size == 1) {
|
|
|
|
|
scriptData.first()
|
|
|
|
|
} else {
|
|
|
|
|
scriptData.find {
|
2022-11-28 10:29:41 +00:00
|
|
|
|
it.first?.contains(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"$fixTitle", true
|
2022-11-28 10:29:41 +00:00
|
|
|
|
) == true && it.second?.contains("$year") == true
|
2022-11-19 04:37:28 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val doc = app.get(fixUrl(script?.third ?: return, lingAPI)).document
|
2022-11-28 10:29:41 +00:00
|
|
|
|
val iframe = (if (season == null) {
|
2022-11-19 04:37:28 +00:00
|
|
|
|
doc.selectFirst("a.video-js.vjs-default-skin")?.attr("data-href")
|
|
|
|
|
} else {
|
2022-11-28 10:29:41 +00:00
|
|
|
|
doc.select("div.blk div#tab_$season li")[episode!!.minus(1)].select("h5 a")
|
|
|
|
|
.attr("data-href")
|
2022-11-19 04:37:28 +00:00
|
|
|
|
})?.let { fixUrl(it, lingAPI) }
|
|
|
|
|
|
|
|
|
|
val source = app.get(iframe ?: return)
|
|
|
|
|
val link = Regex("((https:|http:)//.*\\.mp4)").find(source.text)?.value ?: return
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"Ling", "Ling", link, "$lingAPI/", Qualities.Unknown.value, headers = mapOf(
|
2022-11-19 04:37:28 +00:00
|
|
|
|
"Range" to "bytes=0-"
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
source.document.select("div#player-tracks track").map {
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
SubtitleHelper.fromTwoLettersToLanguage(it.attr("srclang")) ?: return@map null,
|
|
|
|
|
it.attr("src")
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-21 10:27:07 +00:00
|
|
|
|
suspend fun invokeUhdmovies(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
lastSeason: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-12-29 03:34:20 +00:00
|
|
|
|
val url = if (season == null) {
|
2022-12-25 17:53:20 +00:00
|
|
|
|
"$uhdmoviesAPI/download-${title.fixTitle()}-$year"
|
2022-11-21 10:27:07 +00:00
|
|
|
|
} else {
|
2022-12-25 17:53:20 +00:00
|
|
|
|
val url = "$uhdmoviesAPI/?s=$title"
|
|
|
|
|
var doc = app.get(url).document
|
|
|
|
|
if (doc.select("title").text() == "Just a moment...") {
|
|
|
|
|
doc = app.get(url, interceptor = CloudflareKiller()).document
|
|
|
|
|
}
|
|
|
|
|
val scriptData = doc.select("div.row.gridlove-posts article").map {
|
|
|
|
|
it.selectFirst("a")?.attr("href") to it.selectFirst("h1")?.text()
|
|
|
|
|
}
|
|
|
|
|
(if (scriptData.size == 1) {
|
|
|
|
|
scriptData.first()
|
|
|
|
|
} else {
|
|
|
|
|
scriptData.find { it.second?.filterMedia(title, year, lastSeason) == true }
|
|
|
|
|
})?.first
|
2022-11-21 10:27:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-12-25 17:53:20 +00:00
|
|
|
|
val detailDoc = app.get(url ?: return).document
|
2022-11-21 10:27:07 +00:00
|
|
|
|
|
2022-12-15 12:30:01 +00:00
|
|
|
|
val iframeList = detailDoc.select("div.entry-content p").map { it }
|
2022-12-21 21:49:12 +00:00
|
|
|
|
.filter { it.text().filterIframe(season, lastSeason, year) }.mapNotNull {
|
2022-12-15 12:30:01 +00:00
|
|
|
|
if (season == null) {
|
|
|
|
|
it.text() to it.nextElementSibling()?.select("a")?.attr("href")
|
|
|
|
|
} else {
|
|
|
|
|
it.text() to it.nextElementSibling()?.select("a:contains(Episode $episode)")
|
|
|
|
|
?.attr("href")
|
|
|
|
|
}
|
|
|
|
|
}.filter { it.second?.contains(Regex("(https:)|(http:)")) == true }
|
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
val sources = mutableListOf<Pair<String, String?>>()
|
|
|
|
|
if (iframeList.any {
|
|
|
|
|
it.first.contains(
|
|
|
|
|
"2160p",
|
|
|
|
|
true
|
|
|
|
|
)
|
|
|
|
|
}) {
|
|
|
|
|
sources.addAll(iframeList.filter {
|
|
|
|
|
it.first.contains(
|
|
|
|
|
"2160p",
|
|
|
|
|
true
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
sources.add(iframeList.first {
|
|
|
|
|
it.first.contains(
|
|
|
|
|
"1080p",
|
|
|
|
|
true
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
sources.addAll(iframeList.filter { it.first.contains("1080p", true) })
|
|
|
|
|
}
|
2022-11-21 10:27:07 +00:00
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
sources.apmap { (quality, link) ->
|
2022-11-27 06:41:05 +00:00
|
|
|
|
delay(2000)
|
2022-12-15 12:30:01 +00:00
|
|
|
|
val driveLink = bypassHrefli(link ?: return@apmap null)
|
2023-01-14 09:40:35 +00:00
|
|
|
|
val base = getBaseUrl(driveLink ?: return@apmap null)
|
|
|
|
|
val resDoc = app.get(driveLink).text.substringAfter("replace(\"")
|
|
|
|
|
.substringBefore("\")").let {
|
2022-11-26 21:25:36 +00:00
|
|
|
|
app.get(fixUrl(it, base)).document
|
|
|
|
|
}
|
2022-12-07 19:17:24 +00:00
|
|
|
|
val bitLink = resDoc?.selectFirst("a.btn.btn-outline-success")?.attr("href")
|
2022-12-15 12:30:01 +00:00
|
|
|
|
val downloadLink = if (bitLink.isNullOrEmpty()) {
|
2022-12-07 19:17:24 +00:00
|
|
|
|
val backupIframe = resDoc?.select("a.btn.btn-outline-warning")?.attr("href")
|
|
|
|
|
extractBackupUHD(backupIframe ?: return@apmap null)
|
|
|
|
|
} else {
|
|
|
|
|
extractMirrorUHD(bitLink, base)
|
2022-11-22 00:47:52 +00:00
|
|
|
|
}
|
2022-12-12 17:28:45 +00:00
|
|
|
|
|
2022-12-15 12:30:01 +00:00
|
|
|
|
val videoQuality =
|
2023-01-19 02:51:04 +00:00
|
|
|
|
Regex("\\d{3,4}[Pp]\\.?(.*?)\\[").find(quality)?.groupValues?.getOrNull(1)?.trim()
|
2022-12-15 12:30:01 +00:00
|
|
|
|
?: ""
|
|
|
|
|
val qualities =
|
2023-01-19 02:51:04 +00:00
|
|
|
|
Regex("(\\d{3,4})[Pp]").find(quality)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
2022-11-28 10:29:41 +00:00
|
|
|
|
?: Qualities.Unknown.value
|
2022-12-15 12:30:01 +00:00
|
|
|
|
val size =
|
|
|
|
|
Regex("(?i)\\[(\\S+\\s?(gb|mb))[]/]").find(quality)?.groupValues?.getOrNull(1)
|
2022-12-12 17:28:45 +00:00
|
|
|
|
?.let { "[$it]" } ?: quality
|
2022-11-21 10:27:07 +00:00
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
2022-12-12 17:28:45 +00:00
|
|
|
|
"UHDMovies $videoQuality $size",
|
|
|
|
|
"UHDMovies $videoQuality $size",
|
2022-11-22 00:47:52 +00:00
|
|
|
|
downloadLink ?: return@apmap null,
|
2022-11-21 10:27:07 +00:00
|
|
|
|
"",
|
2022-12-12 17:28:45 +00:00
|
|
|
|
qualities
|
2022-11-21 10:27:07 +00:00
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-22 13:50:37 +00:00
|
|
|
|
suspend fun invokeFwatayako(
|
|
|
|
|
imdbId: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val request = app.get("$fwatayakoAPI/IAF0wWTdNYZm?imdb_id=$imdbId")
|
|
|
|
|
if (!request.isSuccessful) return
|
2022-12-21 21:49:12 +00:00
|
|
|
|
val files = request.document.selectFirst("input#files")?.attr("value").let {
|
|
|
|
|
if (season == null) {
|
|
|
|
|
it?.replace("\"381\"", "\"movie\"")
|
|
|
|
|
} else {
|
|
|
|
|
it?.replace("\"381\"", "\"tv\"")
|
|
|
|
|
}
|
|
|
|
|
}.let { tryParseJson<SourcesFwatayako>(it) } ?: return
|
2022-11-22 13:50:37 +00:00
|
|
|
|
|
|
|
|
|
val sourcesLink = if (season == null) {
|
|
|
|
|
files.sourcesMovie
|
|
|
|
|
} else {
|
|
|
|
|
files.sourcesTv?.find { it.id == season }?.folder?.find { it.id == "${season}_${episode}" }?.file
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sourcesLink?.split(",")?.map {
|
|
|
|
|
val source = it.substringBefore("or").trim()
|
|
|
|
|
val quality =
|
|
|
|
|
Regex("\\[([0-9]{3,4})p]").find(source)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
|
|
|
|
val link = httpsify(source.replace("[${quality}p]", "").trim())
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"Fwatayako",
|
|
|
|
|
"Fwatayako",
|
|
|
|
|
link,
|
|
|
|
|
"$fwatayakoAPI/",
|
|
|
|
|
quality ?: Qualities.Unknown.value,
|
|
|
|
|
isM3u8 = true
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-02 16:50:56 +00:00
|
|
|
|
suspend fun invokeGMovies(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title.fixTitle()
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$gMoviesAPI/$fixTitle-$year"
|
|
|
|
|
} else {
|
|
|
|
|
"$gMoviesAPI/$fixTitle-$year-season-$season"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val doc = app.get(url).document
|
|
|
|
|
|
|
|
|
|
val iframe = (if (season == null) {
|
|
|
|
|
doc.select("div.is-content-justification-center div.wp-block-button").map {
|
|
|
|
|
it.select("a").attr("href") to it.text()
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
doc.select("div.is-content-justification-center").find {
|
|
|
|
|
it.previousElementSibling()?.text()?.contains("episode $episode", true) == true
|
|
|
|
|
}?.select("div.wp-block-button")?.map {
|
|
|
|
|
it.select("a").attr("href") to it.text()
|
|
|
|
|
}
|
2022-12-11 03:39:03 +00:00
|
|
|
|
})?.filter {
|
|
|
|
|
it.first.contains("gdtot") && (it.second.contains(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"1080p", true
|
2022-12-11 03:39:03 +00:00
|
|
|
|
) || it.second.contains("4k", true))
|
|
|
|
|
} ?: return
|
2022-12-02 16:50:56 +00:00
|
|
|
|
|
|
|
|
|
iframe.apmap { (iframeLink, title) ->
|
2022-12-07 15:06:48 +00:00
|
|
|
|
val size = Regex("(?i)\\s(\\S+gb|mb)").find(title)?.groupValues?.getOrNull(1)
|
2022-12-02 16:50:56 +00:00
|
|
|
|
val gdBotLink = extractGdbot(iframeLink)
|
2022-12-20 15:24:47 +00:00
|
|
|
|
val videoLink = extractGdflix(gdBotLink ?: return@apmap null)
|
2022-12-07 15:06:48 +00:00
|
|
|
|
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"GMovies [$size]",
|
|
|
|
|
"GMovies [$size]",
|
|
|
|
|
videoLink ?: return@apmap null,
|
|
|
|
|
"",
|
|
|
|
|
getGMoviesQuality(title)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
suspend fun invokeFDMovies(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title.fixTitle()
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$fdMoviesAPI/movies/$fixTitle"
|
|
|
|
|
} else {
|
|
|
|
|
"$fdMoviesAPI/episodes/$fixTitle-s${season}xe${episode}/"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val request = app.get(url)
|
2022-12-12 13:24:46 +00:00
|
|
|
|
if (!request.isSuccessful) return
|
|
|
|
|
|
|
|
|
|
val iframe = request.document.select("div#download tbody tr").map {
|
|
|
|
|
FDMovieIFrame(
|
|
|
|
|
it.select("a").attr("href"),
|
|
|
|
|
it.select("strong.quality").text(),
|
|
|
|
|
it.select("td:nth-child(4)").text(),
|
|
|
|
|
it.select("img").attr("src")
|
|
|
|
|
)
|
|
|
|
|
}.filter {
|
|
|
|
|
(it.quality.contains("1080p", true) || it.quality.contains(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"4k", true
|
2022-12-12 13:24:46 +00:00
|
|
|
|
)) && (it.type.contains("gdtot") || it.type.contains("oiya"))
|
|
|
|
|
}
|
|
|
|
|
iframe.apmap { (link, quality, size, type) ->
|
|
|
|
|
val qualities = getFDoviesQuality(quality)
|
2022-12-07 15:06:48 +00:00
|
|
|
|
val fdLink = bypassFdAds(link)
|
2022-12-12 13:24:46 +00:00
|
|
|
|
val videoLink = when {
|
|
|
|
|
type.contains("gdtot") -> {
|
|
|
|
|
val gdBotLink = extractGdbot(fdLink ?: return@apmap null)
|
2022-12-20 15:24:47 +00:00
|
|
|
|
extractGdflix(gdBotLink ?: return@apmap null)
|
2022-12-12 13:24:46 +00:00
|
|
|
|
}
|
|
|
|
|
type.contains("oiya") -> {
|
|
|
|
|
extractOiya(fdLink ?: return@apmap null, qualities)
|
|
|
|
|
}
|
|
|
|
|
else -> {
|
|
|
|
|
return@apmap null
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-12-07 15:06:48 +00:00
|
|
|
|
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"FDMovies [$size]",
|
|
|
|
|
"FDMovies [$size]",
|
|
|
|
|
videoLink ?: return@apmap null,
|
|
|
|
|
"",
|
2022-12-12 13:24:46 +00:00
|
|
|
|
getQualityFromName(qualities)
|
2022-12-07 15:06:48 +00:00
|
|
|
|
)
|
|
|
|
|
)
|
2022-12-02 16:50:56 +00:00
|
|
|
|
}
|
2022-12-07 15:06:48 +00:00
|
|
|
|
|
2022-12-02 16:50:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-12-09 08:44:01 +00:00
|
|
|
|
suspend fun invokeM4uhd(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val res = app.get("$m4uhdAPI/search/${title.fixTitle()}.html").document
|
|
|
|
|
val scriptData = res.select("div.row div.item").map {
|
|
|
|
|
Triple(
|
|
|
|
|
it.selectFirst("img.imagecover")?.attr("title"),
|
|
|
|
|
it.selectFirst("div.jtip-top div:last-child")?.text(),
|
|
|
|
|
it.selectFirst("a")?.attr("href")
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val script = if (scriptData.size == 1) {
|
|
|
|
|
scriptData.firstOrNull()
|
|
|
|
|
} else {
|
|
|
|
|
scriptData.find {
|
|
|
|
|
it.first?.contains(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"Watch Free ${title?.replace(":", "")}", true
|
2022-12-09 08:44:01 +00:00
|
|
|
|
) == true && (it.first?.contains("$year") == true || it.second?.contains(
|
|
|
|
|
"$year"
|
|
|
|
|
) == true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val link = fixUrl(script?.third ?: return, m4uhdAPI)
|
|
|
|
|
val request = app.get(link)
|
|
|
|
|
var cookiesSet = request.headers.filter { it.first == "set-cookie" }
|
2022-12-15 12:30:01 +00:00
|
|
|
|
var xsrf =
|
|
|
|
|
cookiesSet.find { it.second.contains("XSRF-TOKEN") }?.second?.substringAfter("XSRF-TOKEN=")
|
|
|
|
|
?.substringBefore(";")
|
|
|
|
|
var session =
|
|
|
|
|
cookiesSet.find { it.second.contains("laravel_session") }?.second?.substringAfter("laravel_session=")
|
|
|
|
|
?.substringBefore(";")
|
2022-12-09 08:44:01 +00:00
|
|
|
|
|
|
|
|
|
val doc = request.document
|
|
|
|
|
val token = doc.selectFirst("meta[name=csrf-token]")?.attr("content")
|
|
|
|
|
val m4uData = if (season == null) {
|
|
|
|
|
doc.select("div.le-server span#fem").attr("data")
|
|
|
|
|
} else {
|
2022-12-15 12:30:01 +00:00
|
|
|
|
val episodeData =
|
|
|
|
|
doc.selectFirst("div.col-lg-9.col-xl-9 p:matches((?i)S0?$season-E0?$episode$)")
|
|
|
|
|
?: return
|
2022-12-09 08:44:01 +00:00
|
|
|
|
val idepisode = episodeData.select("button").attr("idepisode") ?: return
|
|
|
|
|
val requestEmbed = app.post(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"$m4uhdAPI/ajaxtv", data = mapOf(
|
|
|
|
|
"idepisode" to idepisode, "_token" to "$token"
|
|
|
|
|
), referer = link, headers = mapOf(
|
2022-12-09 08:44:01 +00:00
|
|
|
|
"X-Requested-With" to "XMLHttpRequest",
|
2022-12-21 21:49:12 +00:00
|
|
|
|
), cookies = mapOf(
|
2022-12-09 08:44:01 +00:00
|
|
|
|
"laravel_session" to "$session",
|
|
|
|
|
"XSRF-TOKEN" to "$xsrf",
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
cookiesSet = requestEmbed.headers.filter { it.first == "set-cookie" }
|
2022-12-15 12:30:01 +00:00
|
|
|
|
xsrf =
|
|
|
|
|
cookiesSet.find { it.second.contains("XSRF-TOKEN") }?.second?.substringAfter("XSRF-TOKEN=")
|
|
|
|
|
?.substringBefore(";")
|
|
|
|
|
session =
|
|
|
|
|
cookiesSet.find { it.second.contains("laravel_session") }?.second?.substringAfter("laravel_session=")
|
|
|
|
|
?.substringBefore(";")
|
2022-12-09 08:44:01 +00:00
|
|
|
|
requestEmbed.document.select("span#fem").attr("data")
|
|
|
|
|
}
|
2022-12-02 16:50:56 +00:00
|
|
|
|
|
2022-12-09 08:44:01 +00:00
|
|
|
|
val iframe = app.post(
|
|
|
|
|
"$m4uhdAPI/ajax",
|
|
|
|
|
data = mapOf(
|
2022-12-21 21:49:12 +00:00
|
|
|
|
"m4u" to m4uData, "_token" to "$token"
|
2022-12-09 08:44:01 +00:00
|
|
|
|
),
|
|
|
|
|
referer = link,
|
|
|
|
|
headers = mapOf(
|
|
|
|
|
"Accept" to "*/*",
|
|
|
|
|
"X-Requested-With" to "XMLHttpRequest",
|
|
|
|
|
),
|
|
|
|
|
cookies = mapOf(
|
|
|
|
|
"laravel_session" to "$session",
|
|
|
|
|
"XSRF-TOKEN" to "$xsrf",
|
|
|
|
|
),
|
|
|
|
|
).document.select("iframe").attr("src")
|
|
|
|
|
|
|
|
|
|
loadExtractor(iframe, m4uhdAPI, subtitleCallback, callback)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-10 12:25:28 +00:00
|
|
|
|
suspend fun invokeTvMovies(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val fixTitle = title.fixTitle()
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$tvMoviesAPI/show/$fixTitle"
|
|
|
|
|
} else {
|
|
|
|
|
"$tvMoviesAPI/show/index-of-$fixTitle"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val server = getTvMoviesServer(url, season, episode) ?: return
|
2022-12-15 17:30:38 +00:00
|
|
|
|
val videoData = extractCovyn(server.second ?: return)
|
2022-12-21 21:49:12 +00:00
|
|
|
|
val quality =
|
|
|
|
|
Regex("([0-9]{3,4})p").find(server.first)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
2022-12-10 12:25:28 +00:00
|
|
|
|
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
2022-12-15 17:30:38 +00:00
|
|
|
|
"TVMovies [${videoData?.second}]",
|
|
|
|
|
"TVMovies [${videoData?.second}]",
|
|
|
|
|
videoData?.first ?: return,
|
2022-12-10 12:25:28 +00:00
|
|
|
|
"",
|
|
|
|
|
quality ?: Qualities.Unknown.value
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-14 09:35:04 +00:00
|
|
|
|
suspend fun invokeCrunchyroll(
|
2022-12-14 05:05:18 +00:00
|
|
|
|
title: String? = null,
|
|
|
|
|
epsTitle: String? = null,
|
2022-12-22 07:01:10 +00:00
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
2022-12-14 05:05:18 +00:00
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2023-01-20 00:33:01 +00:00
|
|
|
|
val id = searchCrunchyrollAnimeId(title ?: return) ?: searchKamyrollAnimeId(title) ?: return
|
2023-01-19 04:55:14 +00:00
|
|
|
|
val detail = app.get("$consumetCrunchyrollAPI/info?id=$id&mediaType=series").text
|
2023-01-19 02:51:04 +00:00
|
|
|
|
val epsId = tryParseJson<CrunchyrollDetails>(detail)?.findCrunchyrollId(
|
|
|
|
|
title,
|
|
|
|
|
season,
|
|
|
|
|
episode,
|
|
|
|
|
epsTitle
|
|
|
|
|
) ?: return
|
|
|
|
|
|
|
|
|
|
epsId.apmap {
|
2022-12-29 03:34:20 +00:00
|
|
|
|
val json =
|
2023-01-19 02:51:04 +00:00
|
|
|
|
app.get("$consumetCrunchyrollAPI/watch?episodeId=${it?.first ?: return@apmap null}")
|
2022-12-29 03:34:20 +00:00
|
|
|
|
.parsedSafe<ConsumetSourcesResponse>()
|
2022-12-14 05:05:18 +00:00
|
|
|
|
|
2022-12-23 12:02:01 +00:00
|
|
|
|
json?.sources?.map source@{ source ->
|
2023-01-19 02:51:04 +00:00
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"Crunchyroll [${it.second ?: ""}]",
|
|
|
|
|
"Crunchyroll [${it.second ?: ""}]",
|
|
|
|
|
source.url ?: return@source null,
|
|
|
|
|
"https://static.crunchyroll.com/",
|
|
|
|
|
getQualityFromName(source.quality),
|
|
|
|
|
true
|
|
|
|
|
)
|
|
|
|
|
)
|
2022-12-23 12:02:01 +00:00
|
|
|
|
}
|
2022-12-14 05:05:18 +00:00
|
|
|
|
|
2022-12-23 12:02:01 +00:00
|
|
|
|
json?.subtitles?.map subtitle@{ sub ->
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
2023-01-19 02:51:04 +00:00
|
|
|
|
sub.lang ?: "",
|
2022-12-23 12:02:01 +00:00
|
|
|
|
sub.url ?: return@subtitle null
|
|
|
|
|
)
|
2022-12-14 05:05:18 +00:00
|
|
|
|
)
|
2022-12-23 12:02:01 +00:00
|
|
|
|
}
|
2022-12-14 05:05:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-29 02:48:08 +00:00
|
|
|
|
suspend fun invokeMoviesbay(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val url =
|
|
|
|
|
"https://sheets.googleapis.com/v4/spreadsheets/12RD3HX3NkSiCyqQJxemyS8W0R9B7J4VBl35uLBa5W0E/values/main?alt=json&key=AIzaSyA_ZY8GYxyUZYlcKGkDIHuku_gmE4z-AHQ"
|
|
|
|
|
val json = app.get(url, referer = "$moviesbayAPI/")
|
|
|
|
|
.parsedSafe<MoviesbayValues>()?.values
|
|
|
|
|
|
|
|
|
|
val media = json?.find { it.first() == "${title.fixTitle()}-$year" }
|
|
|
|
|
|
|
|
|
|
media?.filter { it.startsWith("https://drive.google.com") }?.apmap {
|
|
|
|
|
val index = media.indexOf(it)
|
|
|
|
|
val size = media[index.minus(1)]
|
|
|
|
|
val quality = media[index.minus(2)]
|
|
|
|
|
val qualityName = media[index.minus(3)]
|
2022-12-29 13:19:16 +00:00
|
|
|
|
val gdriveLink = getDirectGdrive(it)
|
2022-12-29 02:48:08 +00:00
|
|
|
|
|
2022-12-29 13:19:16 +00:00
|
|
|
|
val doc = app.get(gdriveLink).document
|
2022-12-29 02:48:08 +00:00
|
|
|
|
val form = doc.select("form#download-form").attr("action")
|
|
|
|
|
val uc = doc.select("input#uc-download-link").attr("value")
|
|
|
|
|
val link = app.post(
|
|
|
|
|
form, data = mapOf(
|
|
|
|
|
"uc-download-link" to uc
|
|
|
|
|
)
|
|
|
|
|
).url
|
|
|
|
|
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"Moviesbay $qualityName [$size]",
|
|
|
|
|
"Moviesbay $qualityName [$size]",
|
|
|
|
|
link,
|
|
|
|
|
"",
|
|
|
|
|
getQualityFromName(quality)
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
suspend fun invokeMoviezAdd(
|
2023-01-04 17:45:21 +00:00
|
|
|
|
apiUrl: String? = null,
|
|
|
|
|
api: String? = null,
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
invokeBloginguru(apiUrl, api, title, year, season, episode, callback)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
suspend fun invokeBollyMaza(
|
|
|
|
|
apiUrl: String? = null,
|
|
|
|
|
api: String? = null,
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
invokeBloginguru(apiUrl, api, title, year, season, episode, callback)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private suspend fun invokeBloginguru(
|
|
|
|
|
apiUrl: String? = null,
|
|
|
|
|
api: String? = null,
|
2022-12-29 02:48:08 +00:00
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
2022-12-30 22:16:30 +00:00
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
2022-12-29 02:48:08 +00:00
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2022-12-29 11:48:41 +00:00
|
|
|
|
val fixTitle = title?.fixTitle()?.replace("-", " ")
|
2023-01-04 17:45:21 +00:00
|
|
|
|
val doc = app.get("$apiUrl/?s=$fixTitle").document
|
2022-12-29 02:48:08 +00:00
|
|
|
|
|
|
|
|
|
val matchMedia = doc.select("article.mh-loop-item").map {
|
|
|
|
|
it.select("a").attr("href") to it.select("a").text()
|
2022-12-29 03:34:20 +00:00
|
|
|
|
}.find {
|
2023-01-03 23:01:24 +00:00
|
|
|
|
if (season == null) {
|
2022-12-31 00:06:18 +00:00
|
|
|
|
it.second.contains(Regex("(?i)($fixTitle)|($title)")) && it.first.contains("$year")
|
|
|
|
|
} else {
|
|
|
|
|
it.second.contains(Regex("(?i)($fixTitle)|($title)")) && it.second.contains(Regex("(?i)(Season\\s?$season)|(S0?$season)"))
|
|
|
|
|
}
|
2022-12-29 03:34:20 +00:00
|
|
|
|
}
|
2022-12-29 02:48:08 +00:00
|
|
|
|
|
2023-01-03 23:01:24 +00:00
|
|
|
|
val mediaLink =
|
|
|
|
|
app.get(matchMedia?.first ?: return).document.selectFirst("a#jake1")?.attr("href")
|
2022-12-30 22:16:30 +00:00
|
|
|
|
val detailDoc = app.get(mediaLink ?: return).document
|
|
|
|
|
val media = detailDoc.selectFirst("div.entry-content pre span")?.text()
|
|
|
|
|
?.split("|")
|
2022-12-29 02:48:08 +00:00
|
|
|
|
?.map { it.trim() }
|
|
|
|
|
|
2023-01-04 17:45:21 +00:00
|
|
|
|
val iframe = (if (season == null) {
|
2022-12-30 22:16:30 +00:00
|
|
|
|
media?.mapIndexed { index, name ->
|
|
|
|
|
detailDoc.select("div.entry-content > pre")[index.plus(1)].selectFirst("a")
|
|
|
|
|
?.attr("href") to name
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
media?.mapIndexed { index, name ->
|
|
|
|
|
val linkMedia =
|
|
|
|
|
detailDoc.select("div.entry-content > pre")[index.plus(1)].selectFirst("a")
|
|
|
|
|
?.attr("href")
|
|
|
|
|
app.get(
|
|
|
|
|
linkMedia ?: return@mapIndexed null
|
|
|
|
|
).document.selectFirst("div.entry-content strong:matches((?i)S0?${season}E0?${episode}) a")
|
|
|
|
|
?.attr("href") to name
|
|
|
|
|
}
|
2023-01-04 17:45:21 +00:00
|
|
|
|
})?.filter { it?.first?.startsWith("http") == true }
|
2022-12-30 22:16:30 +00:00
|
|
|
|
|
|
|
|
|
iframe?.apmap {
|
|
|
|
|
val token = app.get(
|
|
|
|
|
it?.first ?: return@apmap null
|
|
|
|
|
).document.select("input[name=_csrf_token_645a83a41868941e4692aa31e7235f2]")
|
|
|
|
|
.attr("value")
|
2022-12-29 02:48:08 +00:00
|
|
|
|
val shortLink = app.post(
|
2022-12-30 22:16:30 +00:00
|
|
|
|
it.first ?: return@apmap null,
|
2022-12-29 02:48:08 +00:00
|
|
|
|
data = mapOf("_csrf_token_645a83a41868941e4692aa31e7235f2" to token)
|
|
|
|
|
).document.selectFirst("a[rel=nofollow]")?.attr("href")
|
|
|
|
|
|
|
|
|
|
// val videoUrl = extractRebrandly(shortLink ?: return@apmapIndexed null )
|
2023-01-03 23:01:24 +00:00
|
|
|
|
val quality =
|
|
|
|
|
Regex("([0-9]{3,4})p").find(it.second)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
2022-12-30 22:16:30 +00:00
|
|
|
|
val qualityName = it.second.replace("${quality}p", "").trim()
|
2022-12-29 02:48:08 +00:00
|
|
|
|
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
2023-01-04 17:45:21 +00:00
|
|
|
|
"$api $qualityName",
|
|
|
|
|
"$api $qualityName",
|
2022-12-30 22:16:30 +00:00
|
|
|
|
shortLink ?: return@apmap null,
|
2022-12-29 02:48:08 +00:00
|
|
|
|
"",
|
|
|
|
|
quality ?: Qualities.Unknown.value
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-04 18:04:11 +00:00
|
|
|
|
suspend fun invokeRStream(
|
|
|
|
|
id: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
2023-01-11 01:28:46 +00:00
|
|
|
|
val url = if (season == null) {
|
2023-01-04 18:04:11 +00:00
|
|
|
|
"$rStreamAPI/Movies/$id/$id.mp4"
|
|
|
|
|
} else {
|
|
|
|
|
"$rStreamAPI/Shows/$id/$season/$episode.mp4"
|
|
|
|
|
}
|
2023-01-18 05:49:15 +00:00
|
|
|
|
val referer = "https://remotestre.am/"
|
2023-01-04 18:04:11 +00:00
|
|
|
|
|
2023-01-18 05:49:15 +00:00
|
|
|
|
if (!app.get(url, referer = referer).isSuccessful) return
|
2023-01-04 19:26:26 +00:00
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
delay(4000)
|
2023-01-04 18:04:11 +00:00
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"RStream",
|
|
|
|
|
"RStream",
|
|
|
|
|
url,
|
2023-01-18 05:49:15 +00:00
|
|
|
|
referer,
|
2023-01-04 18:04:11 +00:00
|
|
|
|
Qualities.P720.value
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-11 01:28:46 +00:00
|
|
|
|
suspend fun invokeFlixon(
|
|
|
|
|
tmdbId: Int? = null,
|
|
|
|
|
imdbId: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit
|
|
|
|
|
) {
|
|
|
|
|
val onionUrl = "https://onionplay.se/"
|
|
|
|
|
val request = if (season == null) {
|
|
|
|
|
val res = app.get("$flixonAPI/$imdbId", referer = onionUrl)
|
|
|
|
|
if (res.text.contains("BEGIN PGP SIGNED MESSAGE")
|
|
|
|
|
) app.get("$flixonAPI/$imdbId-1", referer = onionUrl) else res
|
|
|
|
|
} else {
|
|
|
|
|
app.get("$flixonAPI/$tmdbId-$season-$episode", referer = onionUrl)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val script = request.document.selectFirst("script:containsData(= \"\";)")?.data()
|
|
|
|
|
val collection = script?.substringAfter("= [")?.substringBefore("];")
|
|
|
|
|
val num = script?.substringAfterLast("(value) -")?.substringBefore(");")?.trim()?.toInt()
|
|
|
|
|
?: return
|
|
|
|
|
|
|
|
|
|
val iframe = collection?.split(",")?.map { it.trim().toInt() }?.map { nums ->
|
|
|
|
|
nums.minus(num).toChar()
|
|
|
|
|
}?.joinToString("")?.let { Jsoup.parse(it) }?.selectFirst("button.redirect")
|
|
|
|
|
?.attr("onclick")
|
|
|
|
|
?.substringAfter("('")?.substringBefore("')")
|
|
|
|
|
|
|
|
|
|
val unPacker =
|
2023-01-19 04:55:14 +00:00
|
|
|
|
app.get(
|
|
|
|
|
iframe ?: return,
|
|
|
|
|
referer = "https://flixon.ru/"
|
|
|
|
|
).document.selectFirst("script:containsData(JuicyCodes.Run)")
|
2023-01-11 01:28:46 +00:00
|
|
|
|
?.data()
|
|
|
|
|
?.substringAfter("JuicyCodes.Run(")?.substringBefore(");")?.split("+")
|
|
|
|
|
?.joinToString("") { it.replace("\"", "").trim() }
|
|
|
|
|
?.let { getAndUnpack(base64Decode(it)) }
|
|
|
|
|
|
|
|
|
|
val ref = "https://onionflix.ru/"
|
|
|
|
|
val link = Regex("[\"']file[\"']:[\"'](.+?)[\"'],").find(
|
|
|
|
|
unPacker ?: return
|
2023-01-11 07:35:13 +00:00
|
|
|
|
)?.groupValues?.getOrNull(1)
|
2023-01-11 01:28:46 +00:00
|
|
|
|
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"Flixon",
|
|
|
|
|
"Flixon",
|
|
|
|
|
link ?: return,
|
|
|
|
|
ref,
|
|
|
|
|
Qualities.P720.value,
|
|
|
|
|
link.contains(".m3u8")
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-17 03:55:16 +00:00
|
|
|
|
suspend fun invokeMovie123(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit,
|
|
|
|
|
) {
|
|
|
|
|
val server = "https://vidcloud9.org"
|
|
|
|
|
val fixTitle = title.fixTitle()
|
|
|
|
|
val m = app.get("$movie123NetAPI/searching?q=$title&limit=40")
|
|
|
|
|
.parsedSafe<Movie123Search>()?.data?.find {
|
|
|
|
|
if (season == null) {
|
|
|
|
|
(it.t.equals(title, true) || it.t.fixTitle()
|
|
|
|
|
.equals(fixTitle)) && it.t?.contains("season", true) == false
|
|
|
|
|
} else {
|
|
|
|
|
it.t?.equals(
|
|
|
|
|
"$title - Season $season",
|
|
|
|
|
true
|
|
|
|
|
) == true || it.s?.contains("$fixTitle-season-$season", true) == true
|
|
|
|
|
}
|
|
|
|
|
}?.s?.substringAfterLast("-") ?: return
|
|
|
|
|
|
|
|
|
|
listOf(
|
|
|
|
|
"1",
|
|
|
|
|
"2"
|
|
|
|
|
).apmap { serverNum ->
|
|
|
|
|
val media = app.post(
|
|
|
|
|
"$movie123NetAPI/datas",
|
|
|
|
|
requestBody = """{"m":$m,"e":${episode ?: 1},"s":$serverNum}""".toRequestBody(
|
|
|
|
|
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
|
|
|
|
)
|
|
|
|
|
).parsedSafe<Movie123Media>()?.url ?: return@apmap null
|
|
|
|
|
|
|
|
|
|
val serverUrl = "$server/watch?v=$media"
|
|
|
|
|
val token =
|
|
|
|
|
app.get(serverUrl).document.selectFirst("script:containsData(setRequestHeader)")
|
|
|
|
|
?.data()?.let {
|
|
|
|
|
Regex("\\('0x1f2'\\),'(\\S+?)'\\)").find(it)?.groupValues?.getOrNull(1)
|
|
|
|
|
} ?: return@apmap null
|
|
|
|
|
|
|
|
|
|
val videoUrl = app.post(
|
|
|
|
|
"$server/data",
|
|
|
|
|
requestBody = """{"doc":"$media"}""".toRequestBody(
|
|
|
|
|
RequestBodyTypes.JSON.toMediaTypeOrNull()
|
|
|
|
|
),
|
|
|
|
|
headers = mapOf(
|
|
|
|
|
"x-csrf-token" to token
|
|
|
|
|
),
|
|
|
|
|
).parsedSafe<Movie123Media>()?.url ?: return@apmap null
|
|
|
|
|
|
|
|
|
|
if (videoUrl.startsWith("https")) {
|
|
|
|
|
loadExtractor(videoUrl, movie123NetAPI, subtitleCallback, callback)
|
|
|
|
|
} else {
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"123Movies",
|
|
|
|
|
"123Movies",
|
|
|
|
|
fixUrl(base64Decode(videoUrl), server),
|
|
|
|
|
serverUrl,
|
|
|
|
|
Qualities.P720.value,
|
|
|
|
|
true
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
"English",
|
|
|
|
|
"https://sub.vxdn.net/sub/$m-${episode ?: 1}.vtt"
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-21 06:25:04 +00:00
|
|
|
|
suspend fun invokeSmashyStream(
|
|
|
|
|
id: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
callback: (ExtractorLink) -> Unit,
|
|
|
|
|
) {
|
|
|
|
|
val url = if (season == null) {
|
|
|
|
|
"$smashyStreamAPI/playere.php?tmdb=$id"
|
|
|
|
|
} else {
|
|
|
|
|
"$smashyStreamAPI/playere.php?tmdb=$id&season=$season&episode=$episode"
|
|
|
|
|
}
|
|
|
|
|
app.get(url).document.select("div.dropdown.servers a").map {
|
|
|
|
|
it.text() to it.attr("data-id")
|
|
|
|
|
}.apmap { (server, link) ->
|
|
|
|
|
when (val player = server.replace("Server", "Player").trim()) {
|
|
|
|
|
"Player 1" -> invokeSmashy1(player, link, subtitleCallback, callback)
|
|
|
|
|
"Player 2" -> invokeSmashy2(player, link, callback)
|
|
|
|
|
else -> return@apmap null
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-29 03:29:15 +00:00
|
|
|
|
//TODO only subs
|
|
|
|
|
suspend fun invokeWatchsomuch(
|
|
|
|
|
imdbId: String? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
subtitleCallback: (SubtitleFile) -> Unit,
|
|
|
|
|
) {
|
|
|
|
|
val watchSomuchAPI = "https://watchsomuch.tv"
|
|
|
|
|
val id = imdbId?.removePrefix("tt")
|
|
|
|
|
val epsId = app.post(
|
|
|
|
|
"$watchSomuchAPI/Watch/ajMovieTorrents.aspx",
|
|
|
|
|
data = mapOf(
|
|
|
|
|
"index" to "0",
|
|
|
|
|
"mid" to "$id",
|
|
|
|
|
"wsk" to "f6ea6cde-e42b-4c26-98d3-b4fe48cdd4fb",
|
|
|
|
|
"lid" to "",
|
|
|
|
|
"liu" to ""
|
|
|
|
|
), headers = mapOf("X-Requested-With" to "XMLHttpRequest")
|
|
|
|
|
).parsedSafe<WatchsomuchResponses>()?.movie?.torrents?.let { eps ->
|
|
|
|
|
if (season == null) {
|
|
|
|
|
eps.firstOrNull()?.id
|
|
|
|
|
} else {
|
|
|
|
|
eps.find { it.episode == episode && it.season == season }?.id
|
|
|
|
|
}
|
|
|
|
|
} ?: return
|
|
|
|
|
|
|
|
|
|
val subUrl = if (season == null) {
|
|
|
|
|
"$watchSomuchAPI/Watch/ajMovieSubtitles.aspx?mid=$id&tid=$epsId&part="
|
|
|
|
|
} else {
|
|
|
|
|
"$watchSomuchAPI/Watch/ajMovieSubtitles.aspx?mid=$id&tid=$epsId&part=S0${season}E0${episode}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
app.get(subUrl)
|
|
|
|
|
.parsedSafe<WatchsomuchSubResponses>()?.subtitles
|
|
|
|
|
?.filter { it.url?.startsWith("https") == true }
|
|
|
|
|
?.map { sub ->
|
|
|
|
|
Log.i("hexated", "${sub.label} => ${sub.url}")
|
|
|
|
|
subtitleCallback.invoke(
|
|
|
|
|
SubtitleFile(
|
|
|
|
|
sub.label ?: "",
|
|
|
|
|
sub.url ?: return@map null
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
suspend fun invokeBaymovies(
|
|
|
|
|
title: String? = null,
|
|
|
|
|
year: Int? = null,
|
|
|
|
|
season: Int? = null,
|
|
|
|
|
episode: Int? = null,
|
|
|
|
|
callback: (ExtractorLink) -> Unit,
|
|
|
|
|
) {
|
|
|
|
|
val key = base64DecodeAPI("ZW0=c3Q=c3k=b28=YWQ=Ymg=")
|
|
|
|
|
val headers = mapOf(
|
|
|
|
|
"Referer" to "$baymovies/",
|
|
|
|
|
"Origin" to baymovies,
|
|
|
|
|
"cf_cache_token" to "UKsVpQqBMxB56gBfhYKbfCVkRIXMh42pk6G4DdkXXoVh7j4BjV"
|
|
|
|
|
)
|
|
|
|
|
|
2023-01-29 04:32:17 +00:00
|
|
|
|
val dotSlug = title.fixTitle()?.replace("-", ".") ?: return
|
|
|
|
|
val spaceSlug = title.fixTitle()?.replace("-", " ") ?: return
|
2023-01-29 03:29:15 +00:00
|
|
|
|
val (episodeSlug, seasonSlug) = if (season == null) {
|
|
|
|
|
listOf("", "")
|
|
|
|
|
} else {
|
|
|
|
|
listOf(
|
|
|
|
|
if (episode!! < 10) "0$episode" else episode,
|
|
|
|
|
if (season < 10) "0$season" else season
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val query = if (season == null) {
|
|
|
|
|
"$title $year"
|
|
|
|
|
} else {
|
2023-01-29 03:54:33 +00:00
|
|
|
|
"$title S${seasonSlug}E${episodeSlug}"
|
2023-01-29 03:29:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val media =
|
|
|
|
|
app.get("$baymoviesAPI//0:search?q=$query&page_token=&page_index=0", headers = headers)
|
|
|
|
|
.parsedSafe<BaymoviesSearch>()?.data?.files?.filter { media ->
|
|
|
|
|
(if (season == null) {
|
|
|
|
|
media.name?.contains("$year") == true
|
|
|
|
|
} else {
|
2023-01-29 03:54:33 +00:00
|
|
|
|
media.name?.contains(Regex("(?i)S${seasonSlug}E${episodeSlug}")) == true
|
2023-01-29 03:29:15 +00:00
|
|
|
|
}) && media.name?.contains(
|
|
|
|
|
"720p",
|
|
|
|
|
true
|
|
|
|
|
) == false && (media.mimeType == "video/x-matroska" || media.mimeType == "video/mp4") && (media.name.contains(
|
2023-01-29 04:32:17 +00:00
|
|
|
|
dotSlug,
|
2023-01-29 03:29:15 +00:00
|
|
|
|
true
|
2023-01-29 04:32:17 +00:00
|
|
|
|
) || media.name.contains(spaceSlug, true))
|
2023-01-29 03:29:15 +00:00
|
|
|
|
}?.distinctBy { it.name } ?: return
|
|
|
|
|
|
|
|
|
|
media.apmap { file ->
|
|
|
|
|
val expiry = (System.currentTimeMillis() + 345600000).toString()
|
|
|
|
|
val hmacSign = "${file.id}@$expiry".encode()
|
|
|
|
|
.hmacSha256(key.encode()).base64().replace("+", "-")
|
|
|
|
|
val encryptedId =
|
|
|
|
|
base64Encode(CryptoAES.encrypt(key, file.id ?: return@apmap null).toByteArray())
|
|
|
|
|
val encryptedExpiry = base64Encode(CryptoAES.encrypt(key, expiry).toByteArray())
|
|
|
|
|
val worker = getConfig().workers.randomOrNull() ?: return@apmap null
|
|
|
|
|
|
2023-01-29 04:32:17 +00:00
|
|
|
|
val link =
|
|
|
|
|
"https://api.$worker.workers.dev/download.aspx?file=$encryptedId&expiry=$encryptedExpiry&mac=$hmacSign"
|
2023-01-29 03:29:15 +00:00
|
|
|
|
val size = file.size?.toDouble() ?: return@apmap null
|
|
|
|
|
val sizeFile = "%.2f GB".format(bytesToGigaBytes(size))
|
|
|
|
|
val tags = Regex("\\d{3,4}[pP]\\.?(.*?)\\.(mkv|mp4)").find(
|
|
|
|
|
file.name ?: return@apmap null
|
|
|
|
|
)?.groupValues?.getOrNull(1)?.replace(".", " ")?.trim()
|
|
|
|
|
?: ""
|
|
|
|
|
val quality =
|
|
|
|
|
Regex("(\\d{3,4})[pP]").find(file.name)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
|
|
|
|
?: Qualities.Unknown.value
|
|
|
|
|
|
|
|
|
|
callback.invoke(
|
|
|
|
|
ExtractorLink(
|
|
|
|
|
"Baymovies $tags [$sizeFile]",
|
|
|
|
|
"Baymovies $tags [$sizeFile]",
|
|
|
|
|
link,
|
|
|
|
|
"",
|
|
|
|
|
quality,
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-09 08:44:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-12-15 12:30:01 +00:00
|
|
|
|
class StreamM4u : XStreamCdn() {
|
2022-12-09 08:44:01 +00:00
|
|
|
|
override val name: String = "StreamM4u"
|
|
|
|
|
override val mainUrl: String = "https://streamm4u.club"
|
2022-10-17 08:03:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-01-17 03:55:16 +00:00
|
|
|
|
class Sblongvu : StreamSB() {
|
|
|
|
|
override var name = "Sblongvu"
|
|
|
|
|
override var mainUrl = "https://sblongvu.com"
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-12 13:24:46 +00:00
|
|
|
|
data class FDMovieIFrame(
|
|
|
|
|
val link: String,
|
|
|
|
|
val quality: String,
|
|
|
|
|
val size: String,
|
|
|
|
|
val type: String,
|
|
|
|
|
)
|
|
|
|
|
|
2023-01-29 03:29:15 +00:00
|
|
|
|
data class BaymoviesConfig(
|
|
|
|
|
val country: String,
|
|
|
|
|
val downloadTime: String,
|
|
|
|
|
val workers: List<String>
|
|
|
|
|
)
|
|
|
|
|
|
2023-01-17 03:55:16 +00:00
|
|
|
|
data class Movie123Media(
|
|
|
|
|
@JsonProperty("url") val url: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class Movie123Data(
|
|
|
|
|
@JsonProperty("t") val t: String? = null,
|
|
|
|
|
@JsonProperty("s") val s: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class Movie123Search(
|
|
|
|
|
@JsonProperty("data") val data: ArrayList<Movie123Data>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
2022-12-07 19:17:24 +00:00
|
|
|
|
data class UHDBackupUrl(
|
2022-12-02 16:50:56 +00:00
|
|
|
|
@JsonProperty("url") val url: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-12-29 02:48:08 +00:00
|
|
|
|
data class MoviesbayValues(
|
|
|
|
|
@JsonProperty("values") val values: List<List<String>>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
2022-12-31 18:06:35 +00:00
|
|
|
|
data class HdMovieBoxTracks(
|
|
|
|
|
@JsonProperty("label") val label: String? = null,
|
|
|
|
|
@JsonProperty("file") val file: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-10-27 08:46:19 +00:00
|
|
|
|
data class HdMovieBoxSource(
|
|
|
|
|
@JsonProperty("videoUrl") val videoUrl: String? = null,
|
|
|
|
|
@JsonProperty("videoServer") val videoServer: String? = null,
|
2022-10-27 09:58:50 +00:00
|
|
|
|
@JsonProperty("videoDisk") val videoDisk: Any? = null,
|
2022-12-31 18:06:35 +00:00
|
|
|
|
@JsonProperty("tracks") val tracks: ArrayList<HdMovieBoxTracks>? = arrayListOf(),
|
2022-10-27 08:46:19 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class HdMovieBoxIframe(
|
|
|
|
|
@JsonProperty("api_iframe") val apiIframe: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-10-28 03:57:14 +00:00
|
|
|
|
data class ResponseHash(
|
|
|
|
|
@JsonProperty("embed_url") val embed_url: String,
|
|
|
|
|
@JsonProperty("type") val type: String?,
|
|
|
|
|
)
|
|
|
|
|
|
2022-10-29 19:32:17 +00:00
|
|
|
|
data class Track(
|
|
|
|
|
@JsonProperty("file") val file: String? = null,
|
|
|
|
|
@JsonProperty("label") val label: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class RabbitSources(
|
|
|
|
|
@JsonProperty("sources") val sources: String? = null,
|
|
|
|
|
@JsonProperty("tracks") val tracks: ArrayList<Track>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-08 09:08:34 +00:00
|
|
|
|
data class SubtitlingList(
|
|
|
|
|
@JsonProperty("languageAbbr") val languageAbbr: String? = null,
|
|
|
|
|
@JsonProperty("language") val language: String? = null,
|
|
|
|
|
@JsonProperty("subtitlingUrl") val subtitlingUrl: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class DefinitionList(
|
|
|
|
|
@JsonProperty("code") val code: String? = null,
|
|
|
|
|
@JsonProperty("description") val description: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class EpisodeVo(
|
|
|
|
|
@JsonProperty("id") val id: Int? = null,
|
|
|
|
|
@JsonProperty("seriesNo") val seriesNo: Int? = null,
|
|
|
|
|
@JsonProperty("definitionList") val definitionList: ArrayList<DefinitionList>? = arrayListOf(),
|
|
|
|
|
@JsonProperty("subtitlingList") val subtitlingList: ArrayList<SubtitlingList>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class MediaDetail(
|
|
|
|
|
@JsonProperty("episodeVo") val episodeVo: ArrayList<EpisodeVo>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class Load(
|
|
|
|
|
@JsonProperty("data") val data: MediaDetail? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2023-01-08 20:23:44 +00:00
|
|
|
|
data class NetMoviesSubtitles(
|
|
|
|
|
@JsonProperty("lang") val lang: String? = null,
|
|
|
|
|
@JsonProperty("language") val language: String? = null,
|
|
|
|
|
@JsonProperty("url") val url: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class NetMoviesQualities(
|
|
|
|
|
@JsonProperty("quality") val quality: String? = null,
|
|
|
|
|
@JsonProperty("url") val url: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class NetMoviesData(
|
|
|
|
|
@JsonProperty("subtitles") val subtitles: ArrayList<NetMoviesSubtitles>? = arrayListOf(),
|
|
|
|
|
@JsonProperty("qualities") val qualities: ArrayList<NetMoviesQualities>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class NetMoviesSources(
|
|
|
|
|
@JsonProperty("data") val data: NetMoviesData? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
data class ConsumetHeaders(
|
2022-11-13 20:02:28 +00:00
|
|
|
|
@JsonProperty("Referer") val referer: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
data class ConsumetSubtitles(
|
2022-11-13 20:02:28 +00:00
|
|
|
|
@JsonProperty("url") val url: String? = null,
|
|
|
|
|
@JsonProperty("lang") val lang: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
data class ConsumetSources(
|
2022-11-13 20:02:28 +00:00
|
|
|
|
@JsonProperty("url") val url: String? = null,
|
|
|
|
|
@JsonProperty("quality") val quality: String? = null,
|
|
|
|
|
@JsonProperty("isM3U8") val isM3U8: Boolean? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
data class ConsumetSourcesResponse(
|
|
|
|
|
@JsonProperty("headers") val headers: ConsumetHeaders? = null,
|
|
|
|
|
@JsonProperty("sources") val sources: ArrayList<ConsumetSources>? = arrayListOf(),
|
|
|
|
|
@JsonProperty("subtitles") val subtitles: ArrayList<ConsumetSubtitles>? = arrayListOf(),
|
2022-11-13 20:02:28 +00:00
|
|
|
|
)
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
data class ConsumetEpisodes(
|
2022-11-13 20:02:28 +00:00
|
|
|
|
@JsonProperty("id") val id: String? = null,
|
2022-12-14 05:05:18 +00:00
|
|
|
|
@JsonProperty("type") val type: String? = null,
|
|
|
|
|
@JsonProperty("title") val title: String? = null,
|
2022-11-13 20:02:28 +00:00
|
|
|
|
@JsonProperty("number") val number: Int? = null,
|
|
|
|
|
@JsonProperty("season") val season: Int? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
data class ConsumetDetails(
|
|
|
|
|
@JsonProperty("episodes") val episodes: ArrayList<ConsumetEpisodes>? = arrayListOf(),
|
2022-11-13 20:02:28 +00:00
|
|
|
|
)
|
|
|
|
|
|
2023-01-19 02:51:04 +00:00
|
|
|
|
data class CrunchyrollDetails(
|
|
|
|
|
@JsonProperty("episodes") val episodes: HashMap<String, List<HashMap<String, String>>>? = hashMapOf(),
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
data class ConsumetResults(
|
2022-11-13 20:02:28 +00:00
|
|
|
|
@JsonProperty("id") val id: String? = null,
|
|
|
|
|
@JsonProperty("title") val title: String? = null,
|
|
|
|
|
@JsonProperty("releaseDate") val releaseDate: String? = null,
|
|
|
|
|
@JsonProperty("type") val type: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-18 11:00:36 +00:00
|
|
|
|
data class ConsumetSearchResponse(
|
|
|
|
|
@JsonProperty("results") val results: ArrayList<ConsumetResults>? = arrayListOf(),
|
2022-11-13 20:02:28 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KisskhSources(
|
|
|
|
|
@JsonProperty("Video") val video: String?,
|
|
|
|
|
@JsonProperty("ThirdParty") val thirdParty: String?,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KisskhSubtitle(
|
|
|
|
|
@JsonProperty("src") val src: String?,
|
|
|
|
|
@JsonProperty("label") val label: String?,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KisskhEpisodes(
|
|
|
|
|
@JsonProperty("id") val id: Int?,
|
|
|
|
|
@JsonProperty("number") val number: Int?,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KisskhDetail(
|
|
|
|
|
@JsonProperty("episodes") val episodes: ArrayList<KisskhEpisodes>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KisskhResults(
|
|
|
|
|
@JsonProperty("id") val id: Int?,
|
|
|
|
|
@JsonProperty("title") val title: String?,
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-22 13:50:37 +00:00
|
|
|
|
data class EpisodesFwatayako(
|
|
|
|
|
@JsonProperty("id") val id: String? = null,
|
|
|
|
|
@JsonProperty("file") val file: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class SeasonFwatayako(
|
|
|
|
|
@JsonProperty("id") val id: Int? = null,
|
|
|
|
|
@JsonProperty("folder") val folder: ArrayList<EpisodesFwatayako>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class SourcesFwatayako(
|
|
|
|
|
@JsonProperty("movie") val sourcesMovie: String? = null,
|
|
|
|
|
@JsonProperty("tv") val sourcesTv: ArrayList<SeasonFwatayako>? = arrayListOf(),
|
2022-12-07 15:06:48 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class DriveBotLink(
|
|
|
|
|
@JsonProperty("url") val url: String? = null,
|
2022-12-09 08:44:01 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class DirectDl(
|
|
|
|
|
@JsonProperty("download_url") val download_url: String? = null,
|
2022-12-09 20:54:40 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class PreviewResponse(
|
|
|
|
|
@JsonProperty("data") val data: ArrayList<PreviewVideos>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class PreviewVideos(
|
|
|
|
|
@JsonProperty("mediaUrl") val mediaUrl: String? = null,
|
|
|
|
|
@JsonProperty("currentDefinition") val currentDefinition: String? = null,
|
2022-12-21 21:49:12 +00:00
|
|
|
|
)
|
|
|
|
|
|
2023-01-03 16:42:50 +00:00
|
|
|
|
data class Safelink(
|
|
|
|
|
@JsonProperty("safelink") val safelink: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class FDAds(
|
|
|
|
|
@JsonProperty("linkr") val linkr: String? = null,
|
2023-01-11 08:08:53 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class DataMal(
|
|
|
|
|
@JsonProperty("mal_id") val mal_id: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class JikanResponse(
|
|
|
|
|
@JsonProperty("data") val data: ArrayList<DataMal>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class IdAni(
|
|
|
|
|
@JsonProperty("id") val id: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class MediaAni(
|
|
|
|
|
@JsonProperty("Media") val media: IdAni? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class DataAni(
|
|
|
|
|
@JsonProperty("data") val data: MediaAni? = null,
|
2023-01-20 00:33:01 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KamyrollSearch(
|
|
|
|
|
@JsonProperty("items") var items: ArrayList<KamyrollItems> = arrayListOf()
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KamyrollItems(
|
|
|
|
|
@JsonProperty("type") var type: String? = null,
|
|
|
|
|
@JsonProperty("items") var items: ArrayList<KamyrollAnimes> = arrayListOf()
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KamyrollAnimes(
|
|
|
|
|
@JsonProperty("id") var id: String? = null,
|
|
|
|
|
@JsonProperty("slug_title") var slugTitle: String? = null,
|
|
|
|
|
@JsonProperty("title") var title: String? = null,
|
|
|
|
|
@JsonProperty("media_type") var mediaType: String? = null
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class KamyrollToken(
|
|
|
|
|
@JsonProperty("access_token") val access_token: String? = null,
|
|
|
|
|
@JsonProperty("token_type") val token_type: String? = null,
|
2023-01-21 06:25:04 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class Smashy1Tracks(
|
|
|
|
|
@JsonProperty("file") val file: String? = null,
|
|
|
|
|
@JsonProperty("label") val label: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class Smashy1Source(
|
|
|
|
|
@JsonProperty("file") val file: String? = null,
|
|
|
|
|
@JsonProperty("tracks") val tracks: ArrayList<Smashy1Tracks>? = arrayListOf(),
|
2023-01-29 03:29:15 +00:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class WatchsomuchTorrents(
|
|
|
|
|
@JsonProperty("id") val id: Int? = null,
|
|
|
|
|
@JsonProperty("movieId") val movieId: Int? = null,
|
|
|
|
|
@JsonProperty("season") val season: Int? = null,
|
|
|
|
|
@JsonProperty("episode") val episode: Int? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class WatchsomuchMovies(
|
|
|
|
|
@JsonProperty("torrents") val torrents: ArrayList<WatchsomuchTorrents>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class WatchsomuchResponses(
|
|
|
|
|
@JsonProperty("movie") val movie: WatchsomuchMovies? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class WatchsomuchSubtitles(
|
|
|
|
|
@JsonProperty("url") val url: String? = null,
|
|
|
|
|
@JsonProperty("label") val label: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class WatchsomuchSubResponses(
|
|
|
|
|
@JsonProperty("subtitles") val subtitles: ArrayList<WatchsomuchSubtitles>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class Baymovies(
|
|
|
|
|
@JsonProperty("id") val id: String? = null,
|
|
|
|
|
@JsonProperty("driveId") val driveId: String? = null,
|
|
|
|
|
@JsonProperty("mimeType") val mimeType: String? = null,
|
|
|
|
|
@JsonProperty("size") val size: String? = null,
|
|
|
|
|
@JsonProperty("name") val name: String? = null,
|
|
|
|
|
@JsonProperty("modifiedTime") val modifiedTime: String? = null,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class BaymoviesData(
|
|
|
|
|
@JsonProperty("files") val files: ArrayList<Baymovies>? = arrayListOf(),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
data class BaymoviesSearch(
|
|
|
|
|
@JsonProperty("data") val data: BaymoviesData? = null,
|
2022-11-22 13:50:37 +00:00
|
|
|
|
)
|