AquaStream/app/src/main/java/com/lagradost/cloudstream3/extractors/MixDrop.kt

35 lines
1.1 KiB
Kotlin
Raw Normal View History

package com.lagradost.cloudstream3.extractors
2021-05-19 18:44:02 +00:00
import com.lagradost.cloudstream3.network.get
import com.lagradost.cloudstream3.network.text
2021-05-19 18:44:02 +00:00
import com.lagradost.cloudstream3.utils.*
class MixDrop : ExtractorApi() {
override val name: String = "MixDrop"
override val mainUrl: String = "https://mixdrop.co"
private val srcRegex = Regex("""wurl.*?=.*?"(.*?)";""")
2021-06-14 16:58:43 +00:00
override val requiresReferer = false
2021-05-19 18:44:02 +00:00
override fun getExtractorUrl(id: String): String {
return "$mainUrl/e/$id"
}
override fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
with(get(url)) {
2021-07-23 16:41:37 +00:00
getAndUnpack(this.text)?.let { unpackedText ->
srcRegex.find(unpackedText)?.groupValues?.get(1)?.let { link ->
return listOf(
ExtractorLink(
name,
name,
httpsify(link),
url,
Qualities.Unknown.value,
2021-05-19 18:44:02 +00:00
)
2021-07-23 16:41:37 +00:00
)
2021-05-19 18:44:02 +00:00
}
}
}
2021-07-23 16:41:37 +00:00
return null
2021-05-19 18:44:02 +00:00
}
}