mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
clean up again
This commit is contained in:
parent
73a282f401
commit
75e52aabc0
1 changed files with 0 additions and 69 deletions
|
@ -186,75 +186,6 @@ open class SoraStream : TmdbProvider() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// private 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(
|
|
||||||
// "$twoEmbedAPI/ajax/embed/play?id=$serverID&_token=$token",
|
|
||||||
// referer = url
|
|
||||||
// ).parsedSafe<EmbedJson>()?.let { source ->
|
|
||||||
// Log.i("hexated", "${source.link}")
|
|
||||||
// loadExtractor(
|
|
||||||
// source.link ?: return@let null,
|
|
||||||
// twoEmbedAPI,
|
|
||||||
// subtitleCallback,
|
|
||||||
// callback
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private suspend fun invokeLocalSources(
|
|
||||||
// url: String,
|
|
||||||
// subtitleCallback: (SubtitleFile) -> Unit,
|
|
||||||
// callback: (ExtractorLink) -> Unit
|
|
||||||
// ) {
|
|
||||||
// val doc = app.get(url, headers = mapOf("User-Agent" to 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("],")
|
|
||||||
//
|
|
||||||
// AppUtils.tryParseJson<List<Sources>>("[$sourcesData]")?.map { source ->
|
|
||||||
// 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)
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// AppUtils.tryParseJson<List<Subtitles>>("[$subData]")?.map { sub ->
|
|
||||||
// subtitleCallback.invoke(
|
|
||||||
// SubtitleFile(
|
|
||||||
// sub.lang.toString(),
|
|
||||||
// sub.url ?: return@map null
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
|
|
||||||
override suspend fun loadLinks(
|
override suspend fun loadLinks(
|
||||||
data: String,
|
data: String,
|
||||||
isCasting: Boolean,
|
isCasting: Boolean,
|
||||||
|
|
Loading…
Reference in a new issue