mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
up
This commit is contained in:
parent
1c6c99a4e8
commit
10a9996228
1 changed files with 19 additions and 19 deletions
|
@ -1,5 +1,3 @@
|
||||||
package com.lagradost.cloudstream3.extractors
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
|
@ -24,9 +22,13 @@ open class StreamoUpload : ExtractorApi() {
|
||||||
app.get(url, referer = referer).document.select("script").map { it.data() }
|
app.get(url, referer = referer).document.select("script").map { it.data() }
|
||||||
.filter { it.contains("eval(function(p,a,c,k,e,d)") }
|
.filter { it.contains("eval(function(p,a,c,k,e,d)") }
|
||||||
.map { script ->
|
.map { script ->
|
||||||
val unpacked = if (script.contains("m3u8")) getAndUnpack(script)
|
val unpacked = if (script.contains("m3u8")) {
|
||||||
if (script.data().contains("jwplayer(\"vplayer\").setup(")) {
|
getAndUnpack(script)
|
||||||
val data = script.data().substringAfter("sources: [")
|
} else {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
if (script.contains("jwplayer(\"vplayer\").setup(")) {
|
||||||
|
val data = script.substringAfter("sources: [")
|
||||||
.substringBefore("],").replace("file", "\"file\"").trim()
|
.substringBefore("],").replace("file", "\"file\"").trim()
|
||||||
tryParseJson<File>(data)?.let {
|
tryParseJson<File>(data)?.let {
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
|
@ -43,6 +45,4 @@ 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