Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.ExtractorApi
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.getQualityFromName
import com.lagradost.cloudstream3.utils.newExtractorLink
import java.net.URI

class Vidnest : AsianLoad() {
override var name = "Vidnest"
override var mainUrl = "https://vidnest.io"
}

open class AsianLoad : ExtractorApi() {
override var name = "AsianLoad"
Expand All @@ -20,7 +23,7 @@ open class AsianLoad : ExtractorApi() {
sourceRegex.findAll(this.text).forEach { sourceMatch ->
val extractedUrl = sourceMatch.groupValues[1]
// Trusting this isn't mp4, may fuck up stuff
if (URI(extractedUrl).path.endsWith(".m3u8")) {
if (extractedUrl.contains(".m3u8")) {
M3u8Helper.generateM3u8(
name,
extractedUrl,
Expand All @@ -29,15 +32,14 @@ open class AsianLoad : ExtractorApi() {
).forEach { link ->
extractedLinksList.add(link)
}
} else if (extractedUrl.endsWith(".mp4")) {
} else if (extractedUrl.contains(".mp4")) {
extractedLinksList.add(
newExtractorLink(
source = name,
name = name,
url = extractedUrl,
) {
this.referer = url.replace(" ", "%20")
this.quality = getQualityFromName(sourceMatch.groupValues[2])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably never worked because the regex only captures one group, so groupValues[2] is always a NullPointerException

}
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ import com.lagradost.cloudstream3.extractors.Vidguardto3
import com.lagradost.cloudstream3.extractors.VidhideExtractor
import com.lagradost.cloudstream3.extractors.Vidmoly
import com.lagradost.cloudstream3.extractors.Vidmolyme
import com.lagradost.cloudstream3.extractors.Vidnest
import com.lagradost.cloudstream3.extractors.Vido
import com.lagradost.cloudstream3.extractors.Vidstreamz
import com.lagradost.cloudstream3.extractors.VinovoSi
Expand Down Expand Up @@ -1169,6 +1170,7 @@ val extractorApis: MutableList<ExtractorApi> = arrayListOf(
FlaswishCom(),
SfastwishCom(),
Playerwish(),
Vidnest(),
EmturbovidExtractor(),
Vtbe(),
EPlayExtractor(),
Expand Down