mirror of
https://github.com/recloudstream/cloudstream.git
synced 2025-05-17 19:25:55 +08:00
Update StreamWishExtractor (#1264)
This commit is contained in:
@ -1,28 +1,137 @@
|
|||||||
package com.lagradost.cloudstream3.extractors
|
package com.lagradost.cloudstream3.extractors
|
||||||
|
|
||||||
import com.lagradost.cloudstream3.SubtitleFile
|
import com.lagradost.cloudstream3.SubtitleFile
|
||||||
|
import com.lagradost.cloudstream3.USER_AGENT
|
||||||
import com.lagradost.cloudstream3.app
|
import com.lagradost.cloudstream3.app
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.getQualityFromName
|
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||||
|
import com.lagradost.cloudstream3.utils.getAndUnpack
|
||||||
|
import com.lagradost.cloudstream3.utils.getPacked
|
||||||
|
|
||||||
|
class Mwish : StreamWishExtractor() {
|
||||||
|
override val name = "Mwish"
|
||||||
|
override val mainUrl = "https://mwish.pro"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Dwish : StreamWishExtractor() {
|
||||||
|
override val name = "Dwish"
|
||||||
|
override val mainUrl = "https://dwish.pro"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Ewish : StreamWishExtractor() {
|
||||||
|
override val name = "Embedwish"
|
||||||
|
override val mainUrl = "https://embedwish.com"
|
||||||
|
}
|
||||||
|
|
||||||
class WishembedPro : StreamWishExtractor() {
|
class WishembedPro : StreamWishExtractor() {
|
||||||
|
override val name = "Wishembed"
|
||||||
override val mainUrl = "https://wishembed.pro"
|
override val mainUrl = "https://wishembed.pro"
|
||||||
}
|
}
|
||||||
class CdnwishCom : StreamWishExtractor() {
|
|
||||||
override val mainUrl = "https://cdnwish.com"
|
class Kswplayer : StreamWishExtractor() {
|
||||||
|
override val name = "Kswplayer"
|
||||||
|
override val mainUrl = "https://kswplayer.info"
|
||||||
}
|
}
|
||||||
class FlaswishCom : StreamWishExtractor() {
|
|
||||||
override val mainUrl = "https://flaswish.com"
|
class Wishfast: StreamWishExtractor() {
|
||||||
|
override val name = "Wishfast"
|
||||||
|
override val mainUrl = "https://wishfast.top"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Streamwish2 : StreamWishExtractor() {
|
||||||
|
override val mainUrl = "https://streamwish.site"
|
||||||
|
}
|
||||||
|
|
||||||
class SfastwishCom : StreamWishExtractor() {
|
class SfastwishCom : StreamWishExtractor() {
|
||||||
|
override val name = "Sfastwish"
|
||||||
override val mainUrl = "https://sfastwish.com"
|
override val mainUrl = "https://sfastwish.com"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Strwish : StreamWishExtractor() {
|
||||||
|
override val name = "Strwish"
|
||||||
|
override val mainUrl = "https://strwish.xyz"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Strwish2 : StreamWishExtractor() {
|
||||||
|
override val name = "Strwish"
|
||||||
|
override val mainUrl = "https://strwish.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class FlaswishCom : StreamWishExtractor() {
|
||||||
|
override val name = "Flaswish"
|
||||||
|
override val mainUrl = "https://flaswish.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Awish : StreamWishExtractor() {
|
||||||
|
override val name = "Awish"
|
||||||
|
override val mainUrl = "https://awish.pro"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Obeywish : StreamWishExtractor() {
|
||||||
|
override val name = "Obeywish"
|
||||||
|
override val mainUrl = "https://obeywish.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Jodwish : StreamWishExtractor() {
|
||||||
|
override val name = "Jodwish"
|
||||||
|
override val mainUrl = "https://jodwish.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Swhoi : StreamWishExtractor() {
|
||||||
|
override val name = "Swhoi"
|
||||||
|
override val mainUrl = "https://swhoi.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Multimovies : StreamWishExtractor() {
|
||||||
|
override val name = "Multimovies"
|
||||||
|
override val mainUrl = "https://multimovies.cloud"
|
||||||
|
}
|
||||||
|
|
||||||
|
class UqloadsXyz : StreamWishExtractor() {
|
||||||
|
override val name = "Uqloads"
|
||||||
|
override val mainUrl = "https://uqloads.xyz"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Doodporn : StreamWishExtractor() {
|
||||||
|
override val name = "Doodporn"
|
||||||
|
override val mainUrl = "https://doodporn.xyz"
|
||||||
|
}
|
||||||
|
|
||||||
|
class CdnwishCom : StreamWishExtractor() {
|
||||||
|
override val name = "Cdnwish"
|
||||||
|
override val mainUrl = "https://cdnwish.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Asnwish : StreamWishExtractor() {
|
||||||
|
override val name = "Asnwish"
|
||||||
|
override val mainUrl = "https://asnwish.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Nekowish : StreamWishExtractor() {
|
||||||
|
override val name = "Nekowish"
|
||||||
|
override val mainUrl = "https://nekowish.my.id"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Nekostream : StreamWishExtractor() {
|
||||||
|
override val name = "Nekostream"
|
||||||
|
override val mainUrl = "https://neko-stream.click"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Swdyu : StreamWishExtractor() {
|
||||||
|
override val name = "Swdyu"
|
||||||
|
override val mainUrl = "https://swdyu.com"
|
||||||
|
}
|
||||||
|
|
||||||
|
class Wishonly : StreamWishExtractor() {
|
||||||
|
override val name = "Wishonly"
|
||||||
|
override val mainUrl = "https://wishonly.site"
|
||||||
|
}
|
||||||
|
|
||||||
open class StreamWishExtractor : ExtractorApi() {
|
open class StreamWishExtractor : ExtractorApi() {
|
||||||
override var name = "StreamWish"
|
override val name = "Streamwish"
|
||||||
override val mainUrl = "https://streamwish.to"
|
override val mainUrl = "https://streamwish.to"
|
||||||
override val requiresReferer = false
|
override val requiresReferer = true
|
||||||
|
|
||||||
override suspend fun getUrl(
|
override suspend fun getUrl(
|
||||||
url: String,
|
url: String,
|
||||||
@ -30,27 +139,38 @@ open class StreamWishExtractor : ExtractorApi() {
|
|||||||
subtitleCallback: (SubtitleFile) -> Unit,
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
) {
|
) {
|
||||||
val doc = app.get(
|
val headers = mapOf(
|
||||||
url,
|
"Accept" to "*/*",
|
||||||
referer = referer,
|
"Connection" to "keep-alive",
|
||||||
allowRedirects = false
|
"Sec-Fetch-Dest" to "empty",
|
||||||
).document
|
"Sec-Fetch-Mode" to "cors",
|
||||||
var script = doc.select("script").find {
|
"Sec-Fetch-Site" to "cross-site",
|
||||||
it.html().contains("jwplayer(\"vplayer\").setup(")
|
"Origin" to "$mainUrl/",
|
||||||
|
"User-Agent" to USER_AGENT
|
||||||
|
)
|
||||||
|
val response = app.get(getEmbedUrl(url), referer = referer)
|
||||||
|
val script = if (!getPacked(response.text).isNullOrEmpty()) {
|
||||||
|
getAndUnpack(response.text)
|
||||||
|
} else {
|
||||||
|
response.document.selectFirst("script:containsData(sources:)")?.data()
|
||||||
}
|
}
|
||||||
var scriptContent = script?.html()
|
val m3u8 =
|
||||||
val extractedurl = Regex("""sources: \[\{file:"(.*?)"""").find(scriptContent ?: "")?.groupValues?.get(1)
|
Regex("file:\\s*\"(.*?m3u8.*?)\"").find(script ?: return)?.groupValues?.getOrNull(1)
|
||||||
if (!extractedurl.isNullOrBlank()) {
|
M3u8Helper.generateM3u8(
|
||||||
callback(
|
name,
|
||||||
ExtractorLink(
|
m3u8 ?: return,
|
||||||
this.name,
|
mainUrl,
|
||||||
this.name,
|
headers = headers
|
||||||
extractedurl,
|
).forEach(callback)
|
||||||
referer ?: "$mainUrl/",
|
}
|
||||||
getQualityFromName(""),
|
|
||||||
extractedurl.contains("m3u8")
|
private fun getEmbedUrl(url: String): String {
|
||||||
)
|
return if (url.contains("/f/")) {
|
||||||
)
|
val videoId = url.substringAfter("/f/")
|
||||||
|
"$mainUrl/$videoId"
|
||||||
|
} else {
|
||||||
|
url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
@ -237,6 +237,26 @@ import com.lagradost.cloudstream3.extractors.FlaswishCom
|
|||||||
import com.lagradost.cloudstream3.extractors.SfastwishCom
|
import com.lagradost.cloudstream3.extractors.SfastwishCom
|
||||||
import com.lagradost.cloudstream3.extractors.Vtbe
|
import com.lagradost.cloudstream3.extractors.Vtbe
|
||||||
import com.lagradost.cloudstream3.extractors.WishembedPro
|
import com.lagradost.cloudstream3.extractors.WishembedPro
|
||||||
|
import com.lagradost.cloudstream3.extractors.Mwish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Dwish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Ewish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Kswplayer
|
||||||
|
import com.lagradost.cloudstream3.extractors.Wishfast
|
||||||
|
import com.lagradost.cloudstream3.extractors.Streamwish2
|
||||||
|
import com.lagradost.cloudstream3.extractors.Strwish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Strwish2
|
||||||
|
import com.lagradost.cloudstream3.extractors.Awish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Obeywish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Jodwish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Swhoi
|
||||||
|
import com.lagradost.cloudstream3.extractors.Multimovies
|
||||||
|
import com.lagradost.cloudstream3.extractors.UqloadsXyz
|
||||||
|
import com.lagradost.cloudstream3.extractors.Doodporn
|
||||||
|
import com.lagradost.cloudstream3.extractors.Asnwish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Nekowish
|
||||||
|
import com.lagradost.cloudstream3.extractors.Nekostream
|
||||||
|
import com.lagradost.cloudstream3.extractors.Swdyu
|
||||||
|
import com.lagradost.cloudstream3.extractors.Wishonly
|
||||||
import com.lagradost.cloudstream3.mvvm.logError
|
import com.lagradost.cloudstream3.mvvm.logError
|
||||||
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
|
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
@ -915,6 +935,26 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
|
|||||||
Yipsu(),
|
Yipsu(),
|
||||||
MetaGnathTuggers(),
|
MetaGnathTuggers(),
|
||||||
Geodailymotion(),
|
Geodailymotion(),
|
||||||
|
Mwish(),
|
||||||
|
Dwish(),
|
||||||
|
Ewish(),
|
||||||
|
Kswplayer(),
|
||||||
|
Wishfast(),
|
||||||
|
Streamwish2(),
|
||||||
|
Strwish(),
|
||||||
|
Strwish2(),
|
||||||
|
Awish(),
|
||||||
|
Obeywish(),
|
||||||
|
Jodwish(),
|
||||||
|
Swhoi(),
|
||||||
|
Multimovies(),
|
||||||
|
UqloadsXyz(),
|
||||||
|
Doodporn(),
|
||||||
|
Asnwish(),
|
||||||
|
Nekowish(),
|
||||||
|
Nekostream(),
|
||||||
|
Swdyu(),
|
||||||
|
Wishonly(),
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user