suggestions

This commit is contained in:
RowdyRushya 2024-04-17 10:14:39 -07:00 committed by GitHub
parent c82d2e329e
commit a936fc9ac8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 22 deletions

View file

@ -1,10 +1,9 @@
package com.lagradost.cloudstream3.extractors package com.lagradost.cloudstream3.extractors
import android.util.Base64 import android.util.Base64
import android.util.Log
import com.fasterxml.jackson.annotation.JsonProperty import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.SubtitleFile import com.lagradost.cloudstream3.SubtitleFile
import com.lagradost.cloudstream3.apmap import com.lagradost.cloudstream3.amap
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
@ -23,24 +22,16 @@ class VidSrcTo : ExtractorApi() {
subtitleCallback: (SubtitleFile) -> Unit, subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
) { ) {
val mediaId = app.get(url).document.selectFirst("ul.episodes li a")?.attr("data-id")?.let { mediaId ->
app.get(url).document.selectFirst("ul.episodes li a")?.attr("data-id") ?: return val res = app.get("$mainUrl/ajax/embed/episode/$mediaId/sources").parsedSafe<VidsrctoEpisodeSources>()
val res = if (res?.status == 200) {
app.get("$mainUrl/ajax/embed/episode/$mediaId/sources") res.result?.amap { source ->
.parsedSafe<VidsrctoEpisodeSources>() val embedRes = app.get("$mainUrl/ajax/embed/source/${source.id}").parsedSafe<VidsrctoEmbedSource>()
if (res?.status == 200) { val finalUrl = DecryptUrl(embedRes?.result?.encUrl ?: "")
res.result?.apmap { source -> when (source.title) {
val embedRes = "Vidplay" -> AnyVidplay(finalUrl.substringBefore("/e/")).getUrl(finalUrl, referer, subtitleCallback, callback)
app.get("$mainUrl/ajax/embed/source/${source.id}") "Filemoon" -> FileMoon().getUrl(finalUrl, referer, subtitleCallback, callback)
.parsedSafe<VidsrctoEmbedSource>() }
val finalUrl = DecryptUrl(embedRes?.result?.encUrl ?: "")
Log.d("rowdyTest", source.title + ": " + finalUrl)
when (source.title) {
"Vidplay" ->
AnyVidplay(finalUrl.substringBefore("/e/"))
.getUrl(finalUrl, referer, subtitleCallback, callback)
"Filemoon" -> FileMoon().getUrl(finalUrl, referer, subtitleCallback, callback)
else -> {}
} }
} }
} }

View file

@ -10,7 +10,6 @@ import com.lagradost.cloudstream3.extractors.AStreamHub
import com.lagradost.cloudstream3.extractors.Acefile import com.lagradost.cloudstream3.extractors.Acefile
import com.lagradost.cloudstream3.extractors.Ahvsh import com.lagradost.cloudstream3.extractors.Ahvsh
import com.lagradost.cloudstream3.extractors.Aico import com.lagradost.cloudstream3.extractors.Aico
import com.lagradost.cloudstream3.extractors.AnyVidplay
import com.lagradost.cloudstream3.extractors.AsianLoad import com.lagradost.cloudstream3.extractors.AsianLoad
import com.lagradost.cloudstream3.extractors.Bestx import com.lagradost.cloudstream3.extractors.Bestx
import com.lagradost.cloudstream3.extractors.Blogger import com.lagradost.cloudstream3.extractors.Blogger
@ -876,7 +875,6 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
VidSrcTo(), VidSrcTo(),
PlayLtXyz(), PlayLtXyz(),
AStreamHub(), AStreamHub(),
AnyVidplay(""),
Vidplay(), Vidplay(),
VidplayOnline(), VidplayOnline(),
MyCloud(), MyCloud(),