34 lines
1.2 KiB
Kotlin
34 lines
1.2 KiB
Kotlin
package com.lagradost.cloudstream3.extractors
|
|
|
|
import com.lagradost.cloudstream3.app
|
|
import com.lagradost.cloudstream3.network.WebViewResolver
|
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
|
import com.lagradost.cloudstream3.utils.Qualities
|
|
|
|
open class StreamWishExtractor : ExtractorApi() {
|
|
override var name = "StreamWish"
|
|
override var mainUrl = "https://streamwish.to"
|
|
override val requiresReferer = false
|
|
|
|
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
|
val response = app.get(
|
|
url, referer = referer ?: "$mainUrl/", interceptor = WebViewResolver(
|
|
Regex("""master\.m3u8""")
|
|
)
|
|
)
|
|
val sources = mutableListOf<ExtractorLink>()
|
|
if (response.url.contains("m3u8"))
|
|
sources.add(
|
|
ExtractorLink(
|
|
source = name,
|
|
name = name,
|
|
url = response.url,
|
|
referer = referer ?: "$mainUrl/",
|
|
quality = Qualities.Unknown.value,
|
|
isM3u8 = true
|
|
)
|
|
)
|
|
return sources
|
|
}
|
|
} |