mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Create Vtbe
This commit is contained in:
parent
0a24661e4c
commit
2c66c808c7
1 changed files with 28 additions and 0 deletions
28
app/src/main/java/com/lagradost/cloudstream3/extractors/Vtbe
Normal file
28
app/src/main/java/com/lagradost/cloudstream3/extractors/Vtbe
Normal file
|
@ -0,0 +1,28 @@
|
|||
open class vtbe : ExtractorApi() {
|
||||
override var name = "Vtbe"
|
||||
override var mainUrl = "https://vtbe.to/"
|
||||
override val requiresReferer = true
|
||||
|
||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||
val response = app.get(url,referer=mainUrl).document
|
||||
//println(response)
|
||||
val extractedpack =response.selectFirst("script:containsData(function(p,a,c,k,e,d))")?.data().toString()
|
||||
//val unpacked= getAndUnpack(extractedpack)
|
||||
println(extractedpack)
|
||||
JsUnpacker(extractedpack).unpack()?.let { unPacked ->
|
||||
Regex("sources:\\[\\{file:\"(.*?)\"").find(unPacked)?.groupValues?.get(1)?.let { link ->
|
||||
return listOf(
|
||||
ExtractorLink(
|
||||
this.name,
|
||||
this.name,
|
||||
link,
|
||||
referer ?: "",
|
||||
Qualities.Unknown.value,
|
||||
URI(link).path.endsWith(".m3u8")
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue