mirror of
https://github.com/recloudstream/cloudstream.git
synced 2025-05-17 19:25:55 +08:00
feat: add bigwarp extractors (#1650)
This commit is contained in:
@ -0,0 +1,51 @@
|
||||
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
|
||||
import com.lagradost.cloudstream3.utils.newExtractorLink
|
||||
|
||||
open class BigwarpIO : ExtractorApi() {
|
||||
override var name = "Bigwarp"
|
||||
override var mainUrl = "https://bigwarp.io"
|
||||
override val requiresReferer = false
|
||||
|
||||
private val sourceRegex = Regex("""file:\s*['"](.*?)['"],label:\s*['"](.*?)['"]""")
|
||||
private val qualityRegex = Regex("""\d+x(\d+) .*""")
|
||||
|
||||
override suspend fun getUrl(
|
||||
url: String,
|
||||
referer: String?,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
) {
|
||||
val resp = app.get(url).text
|
||||
|
||||
for (sourceMatch in sourceRegex.findAll(resp)) {
|
||||
val label = sourceMatch.groupValues[2]
|
||||
|
||||
callback.invoke(
|
||||
newExtractorLink(
|
||||
name,
|
||||
"$name ${label.split(" ", limit = 2).getOrNull(1)}",
|
||||
sourceMatch.groupValues[1], // streams are usually in mp4 format
|
||||
) {
|
||||
this.referer = url
|
||||
this.quality =
|
||||
qualityRegex.find(label)?.groupValues?.getOrNull(1)?.toIntOrNull()
|
||||
?: Qualities.Unknown.value
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class BgwpCC : BigwarpIO() {
|
||||
override var mainUrl = "https://bgwp.cc"
|
||||
}
|
||||
|
||||
class BigwarpArt : BigwarpIO() {
|
||||
override var mainUrl = "https://bigwarp.art"
|
||||
}
|
@ -16,6 +16,9 @@ import com.lagradost.cloudstream3.extractors.Asnwish
|
||||
import com.lagradost.cloudstream3.extractors.Awish
|
||||
import com.lagradost.cloudstream3.extractors.Beastx
|
||||
import com.lagradost.cloudstream3.extractors.Bestx
|
||||
import com.lagradost.cloudstream3.extractors.BgwpCC
|
||||
import com.lagradost.cloudstream3.extractors.BigwarpArt
|
||||
import com.lagradost.cloudstream3.extractors.BigwarpIO
|
||||
import com.lagradost.cloudstream3.extractors.Blogger
|
||||
import com.lagradost.cloudstream3.extractors.Boltx
|
||||
import com.lagradost.cloudstream3.extractors.Boosterx
|
||||
@ -1146,6 +1149,9 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
||||
Lulustream1(),
|
||||
Lulustream2(),
|
||||
StreamWishExtractor(),
|
||||
BigwarpIO(),
|
||||
BigwarpArt(),
|
||||
BgwpCC(),
|
||||
WishembedPro(),
|
||||
CdnwishCom(),
|
||||
FlaswishCom(),
|
||||
|
Reference in New Issue
Block a user