goodstream (#1133)

This commit is contained in:
Stormunblessed 2024-06-15 21:47:30 +00:00 committed by GitHub
parent 4c95610238
commit 4c061edd7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 39 additions and 0 deletions

View file

@ -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,
)
)
}
}
}
}
}

View file

@ -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(),