mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed :
- Kuramanime - Rebahin - Yomovies added : - Kitanonton
This commit is contained in:
parent
a6cc814294
commit
91f18d14dc
11 changed files with 173 additions and 69 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 6
|
||||
version = 7
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
36
YomoviesProvider/src/main/kotlin/com/hexated/SpeedoStream.kt
Normal file
36
YomoviesProvider/src/main/kotlin/com/hexated/SpeedoStream.kt
Normal file
|
@ -0,0 +1,36 @@
|
|||
package com.hexated
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.AppUtils
|
||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||
|
||||
class SpeedoStream1 : ExtractorApi() {
|
||||
override val name = "SpeedoStream"
|
||||
override val mainUrl = "https://speedostream.nl"
|
||||
override val requiresReferer = true
|
||||
|
||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
|
||||
val sources = mutableListOf<ExtractorLink>()
|
||||
app.get(url, referer = referer).document.select("script").map { script ->
|
||||
if (script.data().contains("jwplayer(\"vplayer\").setup(")) {
|
||||
val data = script.data().substringAfter("sources: [")
|
||||
.substringBefore("],").replace("file", "\"file\"").trim()
|
||||
AppUtils.tryParseJson<File>(data)?.let {
|
||||
M3u8Helper.generateM3u8(
|
||||
name,
|
||||
it.file,
|
||||
"$mainUrl/",
|
||||
).forEach { m3uData -> sources.add(m3uData) }
|
||||
}
|
||||
}
|
||||
}
|
||||
return sources
|
||||
}
|
||||
|
||||
private data class File(
|
||||
@JsonProperty("file") val file: String,
|
||||
)
|
||||
}
|
|
@ -10,5 +10,6 @@ class YomoviesProviderPlugin: Plugin() {
|
|||
override fun load(context: Context) {
|
||||
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||
registerMainAPI(YomoviesProvider())
|
||||
registerExtractorAPI(SpeedoStream1())
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue