mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fix search in crunchy
This commit is contained in:
parent
f773f00ad5
commit
0f0f680047
1 changed files with 14 additions and 5 deletions
|
@ -1665,15 +1665,21 @@ object SoraExtractor : SoraStream() {
|
||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val id = app.get("$consumetCrunchyrollAPI/$title")
|
val res = app.get("$consumetCrunchyrollAPI/$title")
|
||||||
.parsedSafe<ConsumetSearchResponse>()?.results?.find {
|
.parsedSafe<ConsumetSearchResponse>()?.results ?: return
|
||||||
|
|
||||||
|
val id = (if (res.size == 1) {
|
||||||
|
res.firstOrNull()
|
||||||
|
} else {
|
||||||
|
res.find {
|
||||||
it.title.equals(
|
it.title.equals(
|
||||||
title,
|
title,
|
||||||
true
|
true
|
||||||
) && it.type.equals("series")
|
) && it.type.equals("series")
|
||||||
} ?: return
|
}
|
||||||
|
})?.id ?: return
|
||||||
|
|
||||||
val detail = app.get("$consumetCrunchyrollAPI/info?id=${id.id}&mediaType=series").text
|
val detail = app.get("$consumetCrunchyrollAPI/info?id=$id&mediaType=series").text
|
||||||
val epsId = tryParseJson<CrunchyrollDetails>(detail)?.findCrunchyrollId(
|
val epsId = tryParseJson<CrunchyrollDetails>(detail)?.findCrunchyrollId(
|
||||||
title,
|
title,
|
||||||
season,
|
season,
|
||||||
|
@ -1904,7 +1910,10 @@ object SoraExtractor : SoraStream() {
|
||||||
?.substringAfter("('")?.substringBefore("')")
|
?.substringAfter("('")?.substringBefore("')")
|
||||||
|
|
||||||
val unPacker =
|
val unPacker =
|
||||||
app.get(iframe ?: return, referer = "https://flixon.ru/").document.selectFirst("script:containsData(JuicyCodes.Run)")
|
app.get(
|
||||||
|
iframe ?: return,
|
||||||
|
referer = "https://flixon.ru/"
|
||||||
|
).document.selectFirst("script:containsData(JuicyCodes.Run)")
|
||||||
?.data()
|
?.data()
|
||||||
?.substringAfter("JuicyCodes.Run(")?.substringBefore(");")?.split("+")
|
?.substringAfter("JuicyCodes.Run(")?.substringBefore(");")?.split("+")
|
||||||
?.joinToString("") { it.replace("\"", "").trim() }
|
?.joinToString("") { it.replace("\"", "").trim() }
|
||||||
|
|
Loading…
Reference in a new issue