mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fix dub in crunchy
This commit is contained in:
parent
0e746f4aff
commit
39e12bbbb5
1 changed files with 64 additions and 54 deletions
|
@ -638,7 +638,9 @@ object SoraExtractor : SoraStream() {
|
|||
it.attr("href").contains(Regex("(?i)Episode-0*$episode"))
|
||||
}?.attr("href")
|
||||
} ?: return
|
||||
val servers = app.get(fixUrl(iframe, kimcartoonAPI)).document.select("#selectServer > option").map { fixUrl(it.attr("value"), kimcartoonAPI) }
|
||||
val servers =
|
||||
app.get(fixUrl(iframe, kimcartoonAPI)).document.select("#selectServer > option")
|
||||
.map { fixUrl(it.attr("value"), kimcartoonAPI) }
|
||||
|
||||
servers.apmap {
|
||||
app.get(it).document.select("#my_video_1").attr("src").let { iframe ->
|
||||
|
@ -704,7 +706,8 @@ object SoraExtractor : SoraStream() {
|
|||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
val results =
|
||||
app.get("$soraBackupAPI/api/search?keyword=$title").parsedSafe<ChillSearch>()?.data?.results
|
||||
app.get("$soraBackupAPI/api/search?keyword=$title")
|
||||
.parsedSafe<ChillSearch>()?.data?.results
|
||||
val media = if (results?.size == 1) {
|
||||
results.firstOrNull()
|
||||
} else {
|
||||
|
@ -729,11 +732,15 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
} ?: return
|
||||
|
||||
val episodeId = app.get("$soraBackupAPI/api/detail?id=${media.id}&category=${media.domainType}").parsedSafe<Load>()?.data?.episodeVo?.find {
|
||||
val episodeId =
|
||||
app.get("$soraBackupAPI/api/detail?id=${media.id}&category=${media.domainType}")
|
||||
.parsedSafe<Load>()?.data?.episodeVo?.find {
|
||||
it.seriesNo == (episode ?: 0)
|
||||
}?.id ?: return
|
||||
|
||||
val sources = app.get("$soraBackupAPI/api/episode?id=${media.id}&category=${media.domainType}&episode=$episodeId").parsedSafe<ChillSources>()?.data
|
||||
val sources =
|
||||
app.get("$soraBackupAPI/api/episode?id=${media.id}&category=${media.domainType}&episode=$episodeId")
|
||||
.parsedSafe<ChillSources>()?.data
|
||||
|
||||
sources?.qualities?.map { source ->
|
||||
callback.invoke(
|
||||
|
@ -751,7 +758,8 @@ object SoraExtractor : SoraStream() {
|
|||
sources?.subtitles?.map { sub ->
|
||||
subtitleCallback.invoke(
|
||||
SubtitleFile(
|
||||
getVipLanguage(sub.lang ?: return@map), sub.url?.substringAfter("?url=") ?: return@map
|
||||
getVipLanguage(sub.lang ?: return@map),
|
||||
sub.url?.substringAfter("?url=") ?: return@map
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -1000,17 +1008,14 @@ object SoraExtractor : SoraStream() {
|
|||
val searchQuaery =
|
||||
"""$allanimeAPI/allanimeapi?variables={"search":{"query":"${aniDetail?.title?.romaji ?: return}","allowAdult":false,"allowUnknown":false},"limit":26,"page":1,"translationType":"sub","countryOrigin":"ALL"}&extensions={"persistedQuery":{"version":1,"sha256Hash":"$searchHash"}}"""
|
||||
val id = app.get(searchQuaery)
|
||||
.parsedSafe<AllanimeResponses>()?.data?.shows?.edges?.let { media ->
|
||||
media.find { it.thumbnail == aniDetail.cover || it.thumbnail == aniDetail.image }
|
||||
?: media.find {
|
||||
(it.name?.equals(
|
||||
.parsedSafe<AllanimeResponses>()?.data?.shows?.edges?.find {
|
||||
it.thumbnail == aniDetail.cover || it.thumbnail == aniDetail.image || ((it.name?.equals(
|
||||
aniDetail.title.romaji,
|
||||
true
|
||||
) == true || it.englishName?.equals(
|
||||
aniDetail.title.romaji,
|
||||
true
|
||||
) == true) && it.airedStart?.year == aniDetail.releaseDate
|
||||
}
|
||||
) == true) && it.airedStart?.year == aniDetail.releaseDate)
|
||||
}?._id
|
||||
|
||||
listOf(
|
||||
|
@ -1023,7 +1028,7 @@ object SoraExtractor : SoraStream() {
|
|||
.parsedSafe<AllanimeResponses>()?.data?.episode?.sourceUrls?.find { it.sourceName == "Ac" }
|
||||
val serverUrl = fixUrl(
|
||||
server?.sourceUrl?.replace("/clock", "/clock.json") ?: return@apmap,
|
||||
"https://allanimenews.com"
|
||||
if(tl == "sub") "https://allanimenews.com" else "https://mblog.allanimenews.com"
|
||||
)
|
||||
app.get(serverUrl)
|
||||
.parsedSafe<AllanimeLinks>()?.links?.forEach { link ->
|
||||
|
@ -1320,7 +1325,10 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
|
||||
sources.apmap { (quality, link) ->
|
||||
val driveLink = if(link?.contains("driveleech") == true) bypassDriveleech(link) else bypassTechmny(link ?: return@apmap)
|
||||
val driveLink =
|
||||
if (link?.contains("driveleech") == true) bypassDriveleech(link) else bypassTechmny(
|
||||
link ?: return@apmap
|
||||
)
|
||||
val base = getBaseUrl(driveLink ?: return@apmap)
|
||||
val resDoc = app.get(driveLink).document
|
||||
val bitLink = resDoc.selectFirst("a.btn.btn-outline-success")?.attr("href")
|
||||
|
@ -2791,7 +2799,8 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
val sid = "9k9iupt5sebbnfajrc6ti3ht7l"
|
||||
val sec = "1974bc4a902c4d69fcbab261dcec69094a9b8164"
|
||||
val url = "$monsterMainUrl/$playSlug?mid=1&sid=$sid&sec=$sec&t=${System.currentTimeMillis()}"
|
||||
val url =
|
||||
"$monsterMainUrl/$playSlug?mid=1&sid=$sid&sec=$sec&t=${System.currentTimeMillis()}"
|
||||
val res = app.get(url).document
|
||||
val script = res.selectFirst("script:containsData(window['show_storage'])")?.data()
|
||||
val hash = Regex("hash:\\s*['\"](\\S+)['\"],").find(script ?: return)?.groupValues?.get(1)
|
||||
|
@ -2966,7 +2975,8 @@ object SoraExtractor : SoraStream() {
|
|||
imdbId: String? = null,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
app.get("$cryMoviesAPI/stream/movie/$imdbId.json").parsedSafe<CryMoviesResponse>()?.streams?.map { stream ->
|
||||
app.get("$cryMoviesAPI/stream/movie/$imdbId.json")
|
||||
.parsedSafe<CryMoviesResponse>()?.streams?.map { stream ->
|
||||
val quality = getIndexQuality(stream.title)
|
||||
val tags = getIndexQualityTags(stream.title)
|
||||
val size = stream.title?.substringAfter("\uD83D\uDCBE")?.trim()
|
||||
|
|
Loading…
Reference in a new issue