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,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val id = app.get("$consumetCrunchyrollAPI/$title")
|
||||
.parsedSafe<ConsumetSearchResponse>()?.results?.find {
|
||||
val res = app.get("$consumetCrunchyrollAPI/$title")
|
||||
.parsedSafe<ConsumetSearchResponse>()?.results ?: return
|
||||
|
||||
val id = (if (res.size == 1) {
|
||||
res.firstOrNull()
|
||||
} else {
|
||||
res.find {
|
||||
it.title.equals(
|
||||
title,
|
||||
true
|
||||
) && 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(
|
||||
title,
|
||||
season,
|
||||
|
@ -1904,7 +1910,10 @@ object SoraExtractor : SoraStream() {
|
|||
?.substringAfter("('")?.substringBefore("')")
|
||||
|
||||
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()
|
||||
?.substringAfter("JuicyCodes.Run(")?.substringBefore(");")?.split("+")
|
||||
?.joinToString("") { it.replace("\"", "").trim() }
|
||||
|
|
Loading…
Reference in a new issue