mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
fix
This commit is contained in:
parent
efaaf044f7
commit
8a2004fa66
1 changed files with 11 additions and 17 deletions
|
@ -25,22 +25,14 @@ open class StreamoUpload : ExtractorApi() {
|
||||||
val scriptElements = response.document.select("script")
|
val scriptElements = response.document.select("script")
|
||||||
for (script in scriptElements) {
|
for (script in scriptElements) {
|
||||||
if (script.data().contains("eval(function(p,a,c,k,e,d)")) {
|
if (script.data().contains("eval(function(p,a,c,k,e,d)")) {
|
||||||
val data = getAndUnpack(script.data())
|
val data = getAndUnpack(script.data()).substringAfter("sources: [")
|
||||||
.substringAfter("sources: [")
|
.substringBefore("],").replace("file", "\"file\"") .trim()
|
||||||
.substringBefore("],")
|
tryParseJson<List<File>>(data)?.let {
|
||||||
.replace("file", "\"file\"")
|
M3u8Helper.generateM3u8(
|
||||||
.trim()
|
name,
|
||||||
|
it.file,
|
||||||
tryParseJson<List<File>>(data)?.let { fileList ->
|
"$mainUrl/",
|
||||||
for (fileData in fileList) {
|
).forEach { m3uData -> sources.add(m3uData) }
|
||||||
M3u8Helper.generateM3u8(
|
|
||||||
name,
|
|
||||||
fileData.file,
|
|
||||||
"$mainUrl/"
|
|
||||||
).forEach { m3uData ->
|
|
||||||
sources.add(m3uData)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,6 +40,8 @@ open class StreamoUpload : ExtractorApi() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private data class File(
|
private data class File(
|
||||||
@JsonProperty("file") val file: String
|
@JsonProperty("file") val file: String,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue