mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: fixed ask4movies
This commit is contained in:
parent
22b5f99e48
commit
c1d59c7f8e
13 changed files with 316 additions and 49 deletions
|
@ -1,37 +0,0 @@
|
|||
package com.hexated
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.lagradost.cloudstream3.SubtitleFile
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.extractors.SpeedoStream
|
||||
import com.lagradost.cloudstream3.utils.AppUtils
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||
import com.lagradost.cloudstream3.utils.getAndUnpack
|
||||
|
||||
class Streamoupload : SpeedoStream() {
|
||||
override val mainUrl = "https://streamoupload.xyz"
|
||||
override val name = "Streamoupload"
|
||||
|
||||
override suspend fun getUrl(
|
||||
url: String,
|
||||
referer: String?,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val script = getAndUnpack(app.get(url, referer = referer).text)
|
||||
val data = script.substringAfter("sources:[")
|
||||
.substringBefore("],").replace("file", "\"file\"").trim()
|
||||
AppUtils.tryParseJson<File>(data)?.let {
|
||||
M3u8Helper.generateM3u8(
|
||||
name,
|
||||
it.file,
|
||||
"$mainUrl/",
|
||||
).forEach(callback)
|
||||
}
|
||||
}
|
||||
|
||||
private data class File(
|
||||
@JsonProperty("file") val file: String,
|
||||
)
|
||||
}
|
|
@ -11,6 +11,5 @@ class YomoviesProviderPlugin: Plugin() {
|
|||
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||
registerMainAPI(YomoviesProvider())
|
||||
registerMainAPI(Watchomovies())
|
||||
registerExtractorAPI(Streamoupload())
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue