Fix DoodExtractor. (#1134)

Fix StreamWishExtractor
This commit is contained in:
Misael Jiménez 2024-06-19 07:40:23 -06:00 committed by GitHub
parent bda6673cfd
commit b702b7b1ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 72 additions and 22 deletions

View file

@ -7,6 +7,18 @@ import com.lagradost.cloudstream3.utils.Qualities
import com.lagradost.cloudstream3.utils.getQualityFromName
import kotlinx.coroutines.delay
class D0000d : DoodLaExtractor() {
override var mainUrl = "https://d0000d.com"
}
class D000dCom : DoodLaExtractor() {
override var mainUrl = "https://d000d.com"
}
class DoodstreamCom : DoodLaExtractor() {
override var mainUrl = "https://doodstream.com"
}
class Dooood : DoodLaExtractor() {
override var mainUrl = "https://dooood.com"
}
@ -56,9 +68,10 @@ open class DoodLaExtractor : ExtractorApi() {
}
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val response0 = app.get(url).text // html of DoodStream page to look for /pass_md5/...
val md5 =mainUrl+(Regex("/pass_md5/[^']*").find(response0)?.value ?: return null) // get https://dood.ws/pass_md5/...
val trueUrl = app.get(md5, referer = url).text + "zUEJeL3mUN?token=" + md5.substringAfterLast("/") //direct link to extract (zUEJeL3mUN is random)
val newUrl= url.replace(mainUrl, "https://d0000d.com")
val response0 = app.get(newUrl).text // html of DoodStream page to look for /pass_md5/...
val md5 ="https://d0000d.com"+(Regex("/pass_md5/[^']*").find(response0)?.value ?: return null) // get https://dood.ws/pass_md5/...
val trueUrl = app.get(md5, referer = newUrl).text + "zUEJeL3mUN?token=" + md5.substringAfterLast("/") //direct link to extract (zUEJeL3mUN is random)
val quality = Regex("\\d{3,4}p").find(response0.substringAfter("<title>").substringBefore("</title>"))?.groupValues?.get(0)
return listOf(
ExtractorLink(

View file

@ -1,34 +1,56 @@
package com.lagradost.cloudstream3.extractors
import com.lagradost.cloudstream3.SubtitleFile
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.Qualities
import com.lagradost.cloudstream3.utils.getQualityFromName
class WishembedPro : StreamWishExtractor() {
override val mainUrl = "https://wishembed.pro"
}
class CdnwishCom : StreamWishExtractor() {
override val mainUrl = "https://cdnwish.com"
}
class FlaswishCom : StreamWishExtractor() {
override val mainUrl = "https://flaswish.com"
}
class SfastwishCom : StreamWishExtractor() {
override val mainUrl = "https://sfastwish.com"
}
open class StreamWishExtractor : ExtractorApi() {
override var name = "StreamWish"
override var mainUrl = "https://streamwish.to"
override val mainUrl = "https://streamwish.to"
override val requiresReferer = false
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val response = app.get(
url, referer = referer ?: "$mainUrl/", interceptor = WebViewResolver(
Regex("""master\.m3u8""")
)
)
val sources = mutableListOf<ExtractorLink>()
if (response.url.contains("m3u8"))
sources.add(
override suspend fun getUrl(
url: String,
referer: String?,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
) {
val doc = app.get(
url,
referer = referer,
allowRedirects = false
).document
var script = doc.select("script").find {
it.html().contains("jwplayer(\"vplayer\").setup(")
}
var scriptContent = script?.html()
val extractedurl = Regex("""sources: \[\{file:"(.*?)"""").find(scriptContent ?: "")?.groupValues?.get(1)
if (!extractedurl.isNullOrBlank()) {
callback(
ExtractorLink(
source = name,
name = name,
url = response.url,
referer = referer ?: "$mainUrl/",
quality = Qualities.Unknown.value,
isM3u8 = true
this.name,
this.name,
extractedurl,
referer ?: "$mainUrl/",
getQualityFromName(""),
extractedurl.contains("m3u8")
)
)
return sources
}
}
}

View file

@ -17,6 +17,7 @@ import com.lagradost.cloudstream3.extractors.BullStream
import com.lagradost.cloudstream3.extractors.ByteShare
import com.lagradost.cloudstream3.extractors.Cda
import com.lagradost.cloudstream3.extractors.Cdnplayer
import com.lagradost.cloudstream3.extractors.CdnwishCom
import com.lagradost.cloudstream3.extractors.Chillx
import com.lagradost.cloudstream3.extractors.CineGrabber
import com.lagradost.cloudstream3.extractors.Cinestart
@ -106,6 +107,9 @@ import com.lagradost.cloudstream3.extractors.Odnoklassniki
import com.lagradost.cloudstream3.extractors.TauVideo
import com.lagradost.cloudstream3.extractors.SibNet
import com.lagradost.cloudstream3.extractors.ContentX
import com.lagradost.cloudstream3.extractors.D0000d
import com.lagradost.cloudstream3.extractors.D000dCom
import com.lagradost.cloudstream3.extractors.DoodstreamCom
import com.lagradost.cloudstream3.extractors.EmturbovidExtractor
import com.lagradost.cloudstream3.extractors.Hotlinger
import com.lagradost.cloudstream3.extractors.FourCX
@ -227,7 +231,10 @@ import com.lagradost.cloudstream3.extractors.Zplayer
import com.lagradost.cloudstream3.extractors.ZplayerV2
import com.lagradost.cloudstream3.extractors.Ztreamhub
import com.lagradost.cloudstream3.extractors.EPlayExtractor
import com.lagradost.cloudstream3.extractors.FlaswishCom
import com.lagradost.cloudstream3.extractors.SfastwishCom
import com.lagradost.cloudstream3.extractors.Vtbe
import com.lagradost.cloudstream3.extractors.WishembedPro
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.mvvm.normalSafeApiCall
import kotlinx.coroutines.delay
@ -777,6 +784,9 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
DoodSoExtractor(),
DoodLaExtractor(),
Dooood(),
D0000d(),
D000dCom(),
DoodstreamCom(),
DoodWsExtractor(),
DoodShExtractor(),
DoodWatchExtractor(),
@ -854,6 +864,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
Guccihide(),
FileMoon(),
FileMoonSx(),
Vido(),
Linkbox(),
Acefile(),
@ -909,6 +920,10 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
Megacloud(),
VidhideExtractor(),
StreamWishExtractor(),
WishembedPro(),
CdnwishCom(),
FlaswishCom(),
SfastwishCom(),
EmturbovidExtractor(),
Vtbe(),
EPlayExtractor(),