mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
added ZippyShare
This commit is contained in:
parent
a7b06dc326
commit
92475c077b
5 changed files with 44 additions and 12 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
32
Nekopoi/src/main/kotlin/com/hexated/Extractors.kt
Normal file
32
Nekopoi/src/main/kotlin/com/hexated/Extractors.kt
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
package com.hexated
|
||||||
|
|
||||||
|
import com.lagradost.cloudstream3.SubtitleFile
|
||||||
|
import com.lagradost.cloudstream3.app
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
|
||||||
|
open class ZippyShare : ExtractorApi() {
|
||||||
|
override val name = "ZippyShare"
|
||||||
|
override val mainUrl = "https://zippysha.re"
|
||||||
|
override val requiresReferer = true
|
||||||
|
|
||||||
|
override suspend fun getUrl(
|
||||||
|
url: String,
|
||||||
|
referer: String?,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
) {
|
||||||
|
val res = app.get(url, referer = referer).document
|
||||||
|
val video = res.selectFirst("a#download-url")?.attr("href")
|
||||||
|
callback.invoke(
|
||||||
|
ExtractorLink(
|
||||||
|
this.name,
|
||||||
|
this.name,
|
||||||
|
video ?: return,
|
||||||
|
"$mainUrl/",
|
||||||
|
Qualities.Unknown.value
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,7 @@ import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.utils.*
|
import com.lagradost.cloudstream3.utils.*
|
||||||
import com.lagradost.nicehttp.Requests
|
import com.lagradost.nicehttp.Requests
|
||||||
import com.lagradost.nicehttp.Session
|
import com.lagradost.nicehttp.Session
|
||||||
|
import kotlinx.coroutines.delay
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
|
|
||||||
|
@ -24,7 +25,6 @@ class Nekopoi : MainAPI() {
|
||||||
"DropApk",
|
"DropApk",
|
||||||
"Racaty",
|
"Racaty",
|
||||||
"ZippyShare",
|
"ZippyShare",
|
||||||
"ZippySha",
|
|
||||||
"VideobinCo",
|
"VideobinCo",
|
||||||
"DropApk",
|
"DropApk",
|
||||||
"SendCm",
|
"SendCm",
|
||||||
|
@ -227,16 +227,15 @@ class Nekopoi : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun bypassMirrored(url: String?): List<String?> {
|
private suspend fun bypassMirrored(url: String?): List<String?> {
|
||||||
val request = app.get(url ?: return emptyList())
|
val request = session.get(url ?: return emptyList())
|
||||||
var nextUrl = request.document.selectFirst("div.row div.centered a")?.attr("href")
|
delay(2000)
|
||||||
nextUrl = app.get(nextUrl ?: return emptyList()).text.substringAfter("\"GET\", \"")
|
val nextUrl = request.text.substringAfter("\"GET\", \"").substringBefore("\"")
|
||||||
.substringBefore("\"")
|
return session.get(fixUrl(nextUrl, mirroredHost)).document.select("table.hoverable tbody tr")
|
||||||
return app.get(fixUrl(nextUrl, mirroredHost)).document.select("table.hoverable tbody tr")
|
|
||||||
.filter { mirror ->
|
.filter { mirror ->
|
||||||
!mirrorIsBlackList(mirror.selectFirst("img")?.attr("alt"))
|
!mirrorIsBlackList(mirror.selectFirst("img")?.attr("alt"))
|
||||||
}.apmap {
|
}.apmap {
|
||||||
val fileLink = it.selectFirst("a")?.attr("href")
|
val fileLink = it.selectFirst("a")?.attr("href")
|
||||||
app.get(
|
session.get(
|
||||||
fixUrl(
|
fixUrl(
|
||||||
fileLink ?: return@apmap null,
|
fileLink ?: return@apmap null,
|
||||||
mirroredHost
|
mirroredHost
|
||||||
|
@ -269,8 +268,10 @@ class Nekopoi : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getIndexQuality(str: String?): Int {
|
private fun getIndexQuality(str: String?): Int {
|
||||||
return Regex("(\\d{3,4})[pP]").find(str ?: "")?.groupValues?.getOrNull(1)?.toIntOrNull()
|
return when (val quality = Regex("""(?i)\[(\d+[pk])]""").find(str ?: "")?.groupValues?.getOrNull(1)?.lowercase()) {
|
||||||
?: Qualities.Unknown.value
|
"2k" -> Qualities.P1440.value
|
||||||
|
else -> getQualityFromName(quality)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -9,5 +9,6 @@ class NekopoiPlugin: Plugin() {
|
||||||
override fun load(context: Context) {
|
override fun load(context: Context) {
|
||||||
// All providers should be added in this manner. Please don't edit the providers list directly.
|
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||||
registerMainAPI(Nekopoi())
|
registerMainAPI(Nekopoi())
|
||||||
|
registerExtractorAPI(ZippyShare())
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -11,7 +11,6 @@ import com.hexated.SoraExtractor.invokeHDMovieBox
|
||||||
import com.hexated.SoraExtractor.invokeIdlix
|
import com.hexated.SoraExtractor.invokeIdlix
|
||||||
import com.hexated.SoraExtractor.invokeKimcartoon
|
import com.hexated.SoraExtractor.invokeKimcartoon
|
||||||
import com.hexated.SoraExtractor.invokeMovieHab
|
import com.hexated.SoraExtractor.invokeMovieHab
|
||||||
import com.hexated.SoraExtractor.invokeNoverse
|
|
||||||
import com.hexated.SoraExtractor.invokeSeries9
|
import com.hexated.SoraExtractor.invokeSeries9
|
||||||
import com.hexated.SoraExtractor.invokeVidSrc
|
import com.hexated.SoraExtractor.invokeVidSrc
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
|
@ -25,7 +24,6 @@ import com.hexated.SoraExtractor.invokeFlixon
|
||||||
import com.hexated.SoraExtractor.invokeFmovies
|
import com.hexated.SoraExtractor.invokeFmovies
|
||||||
import com.hexated.SoraExtractor.invokeFwatayako
|
import com.hexated.SoraExtractor.invokeFwatayako
|
||||||
import com.hexated.SoraExtractor.invokeGMovies
|
import com.hexated.SoraExtractor.invokeGMovies
|
||||||
import com.hexated.SoraExtractor.invokeGdbotMovies
|
|
||||||
import com.hexated.SoraExtractor.invokeGoku
|
import com.hexated.SoraExtractor.invokeGoku
|
||||||
import com.hexated.SoraExtractor.invokeGomovies
|
import com.hexated.SoraExtractor.invokeGomovies
|
||||||
import com.hexated.SoraExtractor.invokeKisskh
|
import com.hexated.SoraExtractor.invokeKisskh
|
||||||
|
|
Loading…
Reference in a new issue