mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
goodstream (#1133)
This commit is contained in:
parent
4c95610238
commit
4c061edd7c
2 changed files with 39 additions and 0 deletions
|
@ -0,0 +1,37 @@
|
|||
package com.lagradost.cloudstream3.extractors
|
||||
|
||||
import com.lagradost.cloudstream3.SubtitleFile
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.Qualities
|
||||
|
||||
class GoodstreamExtractor : ExtractorApi() {
|
||||
override var name = "Goodstream"
|
||||
override val mainUrl = "https://goodstream.uno"
|
||||
override val requiresReferer = false
|
||||
|
||||
override suspend fun getUrl(
|
||||
url: String,
|
||||
referer: String?,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
app.get(url).document.select("script").map { script ->
|
||||
if (script.data().contains(Regex("file|player"))) {
|
||||
val urlRegex = Regex("file: \"(https:\\/\\/[a-z0-9.\\/-_?=&]+)\",")
|
||||
urlRegex.find(script.data())?.groupValues?.get(1).let { link ->
|
||||
callback.invoke(
|
||||
ExtractorLink(
|
||||
name,
|
||||
name,
|
||||
link!!,
|
||||
mainUrl,
|
||||
Qualities.Unknown.value,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -67,6 +67,7 @@ import com.lagradost.cloudstream3.extractors.Gdriveplayerorg
|
|||
import com.lagradost.cloudstream3.extractors.Gdriveplayerus
|
||||
import com.lagradost.cloudstream3.extractors.Gofile
|
||||
import com.lagradost.cloudstream3.extractors.GuardareStream
|
||||
import com.lagradost.cloudstream3.extractors.GoodstreamExtractor
|
||||
import com.lagradost.cloudstream3.extractors.Guccihide
|
||||
import com.lagradost.cloudstream3.extractors.Hxfile
|
||||
import com.lagradost.cloudstream3.extractors.JWPlayer
|
||||
|
@ -879,6 +880,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||
Gdriveplayerorg(),
|
||||
Gdriveplayerus(),
|
||||
Gdriveplayerco(),
|
||||
GoodstreamExtractor(),
|
||||
Gdriveplayer(),
|
||||
DatabaseGdrive(),
|
||||
DatabaseGdrive2(),
|
||||
|
|
Loading…
Reference in a new issue