mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
23 lines
817 B
Kotlin
23 lines
817 B
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.M3u8Helper.Companion.generateM3u8
|
|
|
|
open class WatchSB : ExtractorApi() {
|
|
override var name = "WatchSB"
|
|
override var mainUrl = "https://watchsb.com"
|
|
override val requiresReferer = false
|
|
|
|
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
|
|
val response = app.get(
|
|
url, interceptor = WebViewResolver(
|
|
Regex("""master\.m3u8""")
|
|
)
|
|
)
|
|
|
|
return generateM3u8(name, response.url, url, headers = response.headers.toMap())
|
|
}
|
|
} |