feat: add bigwarp extractors (#1650)

This commit is contained in:
Bnyro
2025-04-08 21:58:26 +02:00
committed by GitHub
parent 18c87c9361
commit 706581c4a2
2 changed files with 57 additions and 0 deletions

View File

@ -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"
}

View File

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