mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
d879a8aaf3
19 changed files with 916 additions and 31 deletions
|
@ -87,6 +87,8 @@ object APIHolder {
|
|||
TheFlixToProvider(),
|
||||
StreamingcommunityProvider(),
|
||||
TantifilmProvider(),
|
||||
Cb01Provider(),
|
||||
AltadefinizioneProvider(),
|
||||
HDMovie5(),
|
||||
RebahinProvider(),
|
||||
LayarKacaProvider(),
|
||||
|
|
|
@ -283,7 +283,8 @@ class NineAnimeProvider : MainAPI() {
|
|||
jsonservers.vidstream,
|
||||
jsonservers.mcloud,
|
||||
jsonservers.mp4upload,
|
||||
jsonservers.streamtape
|
||||
jsonservers.streamtape,
|
||||
jsonservers.videovard
|
||||
).mapNotNull {
|
||||
try {
|
||||
val epserver = app.get("$mainUrl/ajax/anime/episode?id=$it").text
|
||||
|
|
|
@ -47,7 +47,6 @@ class TenshiProvider : MainAPI() {
|
|||
override suspend fun getMainPage(): HomePageResponse {
|
||||
val items = ArrayList<HomePageList>()
|
||||
val soup = app.get(mainUrl, interceptor = ddosGuardKiller).document
|
||||
println(soup)
|
||||
for (section in soup.select("#content > section")) {
|
||||
try {
|
||||
if (section.attr("id") == "toplist-tabs") {
|
||||
|
|
|
@ -11,6 +11,10 @@ class DoodCxExtractor : DoodLaExtractor() {
|
|||
override var mainUrl = "https://dood.cx"
|
||||
}
|
||||
|
||||
class DoodShExtractor : DoodLaExtractor() {
|
||||
override var mainUrl = "https://dood.sh"
|
||||
}
|
||||
|
||||
class DoodPmExtractor : DoodLaExtractor() {
|
||||
override var mainUrl = "https://dood.pm"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package com.lagradost.cloudstream3.extractors
|
||||
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
|
||||
open class Maxstream : ExtractorApi() {
|
||||
override var name = "Maxstream"
|
||||
override var mainUrl = "https://maxstream.video/"
|
||||
override val requiresReferer = false
|
||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||
val extractedLinksList: MutableList<ExtractorLink> = mutableListOf()
|
||||
val response = app.get(url).text
|
||||
val jstounpack = Regex("cript\">eval((.|\\n)*?)</script>").find(response)?.groups?.get(1)?.value
|
||||
val unpacjed = JsUnpacker(jstounpack).unpack()
|
||||
val extractedUrl = unpacjed?.let { Regex("""src:"((.|\n)*?)",type""").find(it) }?.groups?.get(1)?.value.toString()
|
||||
|
||||
M3u8Helper.generateM3u8(
|
||||
name,
|
||||
extractedUrl,
|
||||
url,
|
||||
headers = mapOf("referer" to url)
|
||||
).forEach { link ->
|
||||
extractedLinksList.add(link)
|
||||
}
|
||||
|
||||
return extractedLinksList
|
||||
}
|
||||
}
|
|
@ -34,8 +34,9 @@ open class Mcloud : ExtractorApi() {
|
|||
private val key = "LCbu3iYC7ln24K7P" // key credits @Modder4869
|
||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||
val id = url.substringAfter("e/").substringAfter("embed/").substringBefore("?")
|
||||
keytwo = getWcoKey() ?: return null
|
||||
val encryptedid = encrypt(cipher(key, encrypt(id))).replace("/", "_").replace("=","")
|
||||
val keys = getWcoKey()
|
||||
keytwo = keys?.wcoKey ?: return null
|
||||
val encryptedid = encrypt(cipher(keys.wcocipher!!, encrypt(id))).replace("/", "_").replace("=","")
|
||||
val link = "$mainUrl/info/$encryptedid"
|
||||
val response = app.get(link, headers = headers).text
|
||||
if(response.startsWith("<!DOCTYPE html>")) {
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.lagradost.cloudstream3.extractors
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||
|
||||
data class Files(
|
||||
@JsonProperty("file") val id: String,
|
||||
@JsonProperty("label") val label: String? = null,
|
||||
)
|
||||
|
||||
open class Supervideo : ExtractorApi() {
|
||||
override var name = "Supervideo"
|
||||
override var mainUrl = "https://supervideo.tv"
|
||||
override val requiresReferer = false
|
||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||
val extractedLinksList: MutableList<ExtractorLink> = mutableListOf()
|
||||
val response = app.get(url).text
|
||||
val jstounpack = Regex("eval((.|\\n)*?)</script>").find(response)?.groups?.get(1)?.value
|
||||
val unpacjed = JsUnpacker(jstounpack).unpack()
|
||||
val extractedUrl = unpacjed?.let { Regex("""sources:((.|\n)*?)image""").find(it) }?.groups?.get(1)?.value.toString().replace("file",""""file"""").replace("label",""""label"""").substringBeforeLast(",")
|
||||
val parsedlinks = parseJson<List<Files>>(extractedUrl)
|
||||
parsedlinks.forEach { data ->
|
||||
if (data.label.isNullOrBlank()){ // mp4 links (with labels) are slow. Use only m3u8 link.
|
||||
M3u8Helper.generateM3u8(
|
||||
name,
|
||||
data.id,
|
||||
url,
|
||||
headers = mapOf("referer" to url)
|
||||
).forEach { link ->
|
||||
extractedLinksList.add(link)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return extractedLinksList
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
package com.lagradost.cloudstream3.extractors
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
|
||||
open class Tantifilm : ExtractorApi() {
|
||||
override var name = "Tantifilm"
|
||||
override var mainUrl = "https://cercafilm.net"
|
||||
override val requiresReferer = false
|
||||
|
||||
data class TantifilmJsonData (
|
||||
@JsonProperty("success") val success : Boolean,
|
||||
@JsonProperty("data") val data : List<TantifilmData>,
|
||||
@JsonProperty("captions")val captions : List<String>,
|
||||
@JsonProperty("is_vr") val is_vr : Boolean
|
||||
)
|
||||
|
||||
data class TantifilmData (
|
||||
@JsonProperty("file") val file : String,
|
||||
@JsonProperty("label") val label : String,
|
||||
@JsonProperty("type") val type : String
|
||||
)
|
||||
|
||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||
val link = "$mainUrl/api/source/${url.substringAfterLast("/")}"
|
||||
val response = app.post(link).text.replace("""\""","")
|
||||
val jsonvideodata = parseJson<TantifilmJsonData>(response)
|
||||
return jsonvideodata.data.map {
|
||||
ExtractorLink(
|
||||
it.file+".${it.type}",
|
||||
this.name,
|
||||
it.file+".${it.type}",
|
||||
mainUrl,
|
||||
it.label.filter{ it.isDigit() }.toInt(),
|
||||
false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
package com.lagradost.cloudstream3.extractors
|
||||
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
import org.mozilla.javascript.Context
|
||||
import org.mozilla.javascript.EvaluatorException
|
||||
import org.mozilla.javascript.Scriptable
|
||||
import java.util.*
|
||||
|
||||
|
||||
open class Userload : ExtractorApi() {
|
||||
override var name = "Userload"
|
||||
override var mainUrl = "https://userload.co"
|
||||
override val requiresReferer = false
|
||||
|
||||
private fun splitInput(input: String): List<String> {
|
||||
var counter = 0
|
||||
val array = ArrayList<String>()
|
||||
var buffer = ""
|
||||
for (c in input) {
|
||||
when (c) {
|
||||
'(' -> counter++
|
||||
')' -> counter--
|
||||
else -> {}
|
||||
}
|
||||
buffer += c
|
||||
if (counter == 0) {
|
||||
if (buffer.isNotBlank() && buffer != "+")
|
||||
array.add(buffer)
|
||||
buffer = ""
|
||||
}
|
||||
}
|
||||
return array
|
||||
}
|
||||
|
||||
private fun evaluateMath(mathExpression : String): String {
|
||||
val rhino = Context.enter()
|
||||
rhino.initStandardObjects()
|
||||
rhino.optimizationLevel = -1
|
||||
val scope: Scriptable = rhino.initStandardObjects()
|
||||
return try {
|
||||
rhino.evaluateString(scope, "eval($mathExpression)", "JavaScript", 1, null).toString()
|
||||
}
|
||||
catch (e: EvaluatorException){
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
private fun decodeVideoJs(text: String): List<String> {
|
||||
text.replace("""\s+|/\*.*?\*/""".toRegex(), "")
|
||||
val data = text.split("""+(゚Д゚)[゚o゚]""")[1]
|
||||
val chars = data.split("""+ (゚Д゚)[゚ε゚]+""").drop(1)
|
||||
val newchars = chars.map { char ->
|
||||
char.replace("(o゚ー゚o)", "u")
|
||||
.replace("c", "0")
|
||||
.replace("(゚Д゚)['0']", "c")
|
||||
.replace("゚Θ゚", "1")
|
||||
.replace("!+[]", "1")
|
||||
.replace("-~", "1+")
|
||||
.replace("o", "3")
|
||||
.replace("_", "3")
|
||||
.replace("゚ー゚", "4")
|
||||
.replace("(+", "(")
|
||||
}
|
||||
|
||||
val subchar = mutableListOf<String>()
|
||||
|
||||
newchars.dropLast(1).forEach { v ->
|
||||
subchar.add(splitInput(v).map { evaluateMath(it).substringBefore(".") }.toString().filter { it.isDigit() })
|
||||
}
|
||||
var txtresult = ""
|
||||
subchar.forEach{
|
||||
txtresult = txtresult.plus(Char(it.toInt(8)))
|
||||
}
|
||||
val val1 = Regex(""""morocco="((.|\\n)*?)"&mycountry="""").find(txtresult)?.groups?.get(1)?.value.toString().drop(1).dropLast(1)
|
||||
val val2 = txtresult.substringAfter("""&mycountry="+""").substringBefore(")")
|
||||
|
||||
return listOf(
|
||||
val1,
|
||||
val2
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
|
||||
|
||||
val extractedLinksList: MutableList<ExtractorLink> = mutableListOf()
|
||||
|
||||
val response = app.get(url).text
|
||||
val jsToUnpack = Regex("ext/javascript\">eval((.|\\n)*?)</script>").find(response)?.groups?.get(1)?.value
|
||||
val unpacked = JsUnpacker(jsToUnpack).unpack()
|
||||
val videoJs = app.get("$mainUrl/api/assets/userload/js/videojs.js")
|
||||
val videoJsToDecode = videoJs.text
|
||||
val values = decodeVideoJs(videoJsToDecode)
|
||||
val morocco = unpacked!!.split(";").filter { it.contains(values[0]) }[0].split("=")[1].drop(1).dropLast(1)
|
||||
val mycountry = unpacked.split(";").filter { it.contains(values[1]) }[0].split("=")[1].drop(1).dropLast(1)
|
||||
val videoLinkPage = app.post("$mainUrl/api/request/", data = mapOf(
|
||||
"morocco" to morocco,
|
||||
"mycountry" to mycountry
|
||||
))
|
||||
val videoLink = videoLinkPage.text
|
||||
val nameSource = app.get(url).document.head().selectFirst("title")!!.text()
|
||||
extractedLinksList.add(
|
||||
ExtractorLink(
|
||||
name,
|
||||
name,
|
||||
videoLink,
|
||||
mainUrl,
|
||||
getQualityFromName(nameSource),
|
||||
)
|
||||
)
|
||||
|
||||
return extractedLinksList
|
||||
}
|
||||
}
|
|
@ -0,0 +1,271 @@
|
|||
package com.lagradost.cloudstream3.extractors
|
||||
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.ExtractorApi
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.M3u8Helper.Companion.generateM3u8
|
||||
import kotlinx.coroutines.delay
|
||||
import java.math.BigInteger
|
||||
|
||||
class VideovardSX : WcoStream() {
|
||||
override var mainUrl = "https://videovard.sx"
|
||||
}
|
||||
|
||||
class VideoVard : ExtractorApi() {
|
||||
override var name = "Videovard" // Cause works for animekisa and wco
|
||||
override var mainUrl = "https://videovard.to"
|
||||
override val requiresReferer = false
|
||||
|
||||
//The following code was extracted from https://github.com/saikou-app/saikou/blob/main/app/src/main/java/ani/saikou/parsers/anime/extractors/VideoVard.kt
|
||||
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink> {
|
||||
val id = url.substringAfter("e/").substringBefore("/")
|
||||
val sources = mutableListOf<ExtractorLink>()
|
||||
val hash = app.get("$mainUrl/api/make/download/$id").parsed<HashResponse>()
|
||||
delay(11_000)
|
||||
val resm3u8 = app.post(
|
||||
"$mainUrl/api/player/setup",
|
||||
mapOf("Referer" to "$mainUrl/"),
|
||||
data = mapOf(
|
||||
"cmd" to "get_stream",
|
||||
"file_code" to id,
|
||||
"hash" to hash.hash!!
|
||||
)
|
||||
).parsed<SetupResponse>()
|
||||
val m3u8 = decode(resm3u8.src!!, resm3u8.seed)
|
||||
sources.addAll(
|
||||
generateM3u8(
|
||||
name,
|
||||
m3u8,
|
||||
mainUrl,
|
||||
headers = mapOf("Referer" to mainUrl)
|
||||
)
|
||||
)
|
||||
return sources
|
||||
}
|
||||
|
||||
companion object {
|
||||
private val big0 = 0.toBigInteger()
|
||||
private val big3 = 3.toBigInteger()
|
||||
private val big4 = 4.toBigInteger()
|
||||
private val big15 = 15.toBigInteger()
|
||||
private val big16 = 16.toBigInteger()
|
||||
private val big255 = 255.toBigInteger()
|
||||
|
||||
private fun decode(dataFile: String, seed: String): String {
|
||||
val dataSeed = replace(seed)
|
||||
val newDataSeed = binaryDigest(dataSeed)
|
||||
val newDataFile = bytes2blocks(ascii2bytes(dataFile))
|
||||
var list = listOf(1633837924, 1650680933).map { it.toBigInteger() }
|
||||
val xorList = mutableListOf<BigInteger>()
|
||||
for (i in newDataFile.indices step 2) {
|
||||
val temp = newDataFile.slice(i..i + 1)
|
||||
xorList += xorBlocks(list, tearDecode(temp, newDataSeed))
|
||||
list = temp
|
||||
}
|
||||
|
||||
val result = replace(unPad(blocks2bytes(xorList)).map { it.toInt().toChar() }.joinToString(""))
|
||||
return padLastChars(result)
|
||||
}
|
||||
|
||||
private fun binaryDigest(input: String): List<BigInteger> {
|
||||
val keys = listOf(1633837924, 1650680933, 1667523942, 1684366951).map { it.toBigInteger() }
|
||||
var list1 = keys.slice(0..1)
|
||||
var list2 = list1
|
||||
val blocks = bytes2blocks(digestPad(input))
|
||||
|
||||
for (i in blocks.indices step 4) {
|
||||
list1 = tearCode(xorBlocks(blocks.slice(i..i + 1), list1), keys).toMutableList()
|
||||
list2 = tearCode(xorBlocks(blocks.slice(i + 2..i + 3), list2), keys).toMutableList()
|
||||
|
||||
val temp = list1[0]
|
||||
list1[0] = list1[1]
|
||||
list1[1] = list2[0]
|
||||
list2[0] = list2[1]
|
||||
list2[1] = temp
|
||||
}
|
||||
|
||||
return listOf(list1[0], list1[1], list2[0], list2[1])
|
||||
}
|
||||
|
||||
private fun tearDecode(a90: List<BigInteger>, a91: List<BigInteger>): MutableList<BigInteger> {
|
||||
var (a95, a96) = a90
|
||||
|
||||
var a97 = (-957401312).toBigInteger()
|
||||
for (_i in 0 until 32) {
|
||||
a96 -= ((((a95 shl 4) xor rShift(a95, 5)) + a95) xor (a97 + a91[rShift(a97, 11).and(3.toBigInteger()).toInt()]))
|
||||
a97 += 1640531527.toBigInteger()
|
||||
a95 -= ((((a96 shl 4) xor rShift(a96, 5)) + a96) xor (a97 + a91[a97.and(3.toBigInteger()).toInt()]))
|
||||
|
||||
}
|
||||
|
||||
return mutableListOf(a95, a96)
|
||||
}
|
||||
|
||||
private fun digestPad(string: String): List<BigInteger> {
|
||||
val empList = mutableListOf<BigInteger>()
|
||||
val length = string.length
|
||||
val extra = big15 - (length.toBigInteger() % big16)
|
||||
empList.add(extra)
|
||||
for (i in 0 until length) {
|
||||
empList.add(string[i].code.toBigInteger())
|
||||
}
|
||||
for (i in 0 until extra.toInt()) {
|
||||
empList.add(big0)
|
||||
}
|
||||
|
||||
return empList
|
||||
}
|
||||
|
||||
private fun bytes2blocks(a22: List<BigInteger>): List<BigInteger> {
|
||||
val empList = mutableListOf<BigInteger>()
|
||||
val length = a22.size
|
||||
var listIndex = 0
|
||||
|
||||
for (i in 0 until length) {
|
||||
val subIndex = i % 4
|
||||
val shiftedByte = a22[i] shl (3 - subIndex) * 8
|
||||
|
||||
if (subIndex == 0) {
|
||||
empList.add(shiftedByte)
|
||||
} else {
|
||||
empList[listIndex] = empList[listIndex] or shiftedByte
|
||||
}
|
||||
|
||||
if (subIndex == 3) listIndex += 1
|
||||
}
|
||||
|
||||
return empList
|
||||
}
|
||||
|
||||
private fun blocks2bytes(inp: List<BigInteger>): List<BigInteger> {
|
||||
val tempList = mutableListOf<BigInteger>()
|
||||
inp.indices.forEach { i ->
|
||||
tempList += (big255 and rShift(inp[i], 24))
|
||||
tempList += (big255 and rShift(inp[i], 16))
|
||||
tempList += (big255 and rShift(inp[i], 8))
|
||||
tempList += (big255 and inp[i])
|
||||
}
|
||||
return tempList
|
||||
}
|
||||
|
||||
private fun unPad(a46: List<BigInteger>): List<BigInteger> {
|
||||
val evenOdd = a46[0].toInt().mod(2)
|
||||
return (1 until (a46.size - evenOdd)).map {
|
||||
a46[it]
|
||||
}
|
||||
}
|
||||
|
||||
private fun xorBlocks(a76: List<BigInteger>, a77: List<BigInteger>): List<BigInteger> {
|
||||
return listOf(a76[0] xor a77[0], a76[1] xor a77[1])
|
||||
}
|
||||
|
||||
private fun rShift(input: BigInteger, by: Int): BigInteger {
|
||||
return (input.mod(4294967296.toBigInteger()) shr by)
|
||||
}
|
||||
|
||||
private fun tearCode(list1: List<BigInteger>, list2: List<BigInteger>): MutableList<BigInteger> {
|
||||
var a1 = list1[0]
|
||||
var a2 = list1[1]
|
||||
var temp = big0
|
||||
|
||||
for (_i in 0 until 32) {
|
||||
a1 += (a2 shl 4 xor rShift(a2, 5)) + a2 xor temp + list2[(temp and big3).toInt()]
|
||||
temp -= 1640531527.toBigInteger()
|
||||
a2 += (a1 shl 4 xor rShift(a1, 5)) + a1 xor temp + list2[(rShift(temp, 11) and big3).toInt()]
|
||||
}
|
||||
return mutableListOf(a1, a2)
|
||||
}
|
||||
|
||||
private fun ascii2bytes(input: String): List<BigInteger> {
|
||||
val abc = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||
val abcMap = abc.mapIndexed { i, c -> c to i.toBigInteger() }.toMap()
|
||||
var index = -1
|
||||
val length = input.length
|
||||
var listIndex = 0
|
||||
val bytes = mutableListOf<BigInteger>()
|
||||
|
||||
while (true) {
|
||||
for (i in input) {
|
||||
if (abc.contains(i)) {
|
||||
index++
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
bytes.add((abcMap[input.getOrNull(index)?:return bytes]!! * big4))
|
||||
|
||||
while (true) {
|
||||
index++
|
||||
if (abc.contains(input[index])) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
var temp = abcMap[input[index]]!!
|
||||
|
||||
bytes[listIndex] = bytes[listIndex] or rShift(temp, 4)
|
||||
listIndex++
|
||||
temp = (big15.and(temp))
|
||||
|
||||
if ((temp == big0) && (index == (length - 1))) return bytes
|
||||
|
||||
bytes.add((temp * big4 * big4))
|
||||
|
||||
while (true) {
|
||||
index++
|
||||
if (index >= length) return bytes
|
||||
if (abc.contains(input[index])) break
|
||||
}
|
||||
|
||||
temp = abcMap[input[index]]!!
|
||||
bytes[listIndex] = bytes[listIndex] or rShift(temp, 2)
|
||||
listIndex++
|
||||
temp = (big3 and temp)
|
||||
if ((temp == big0) && (index == (length - 1))) {
|
||||
return bytes
|
||||
}
|
||||
bytes.add((temp shl 6))
|
||||
for (i in input) {
|
||||
index++
|
||||
if (abc.contains(input[index])) {
|
||||
break
|
||||
}
|
||||
}
|
||||
bytes[listIndex] = bytes[listIndex] or abcMap[input[index]]!!
|
||||
listIndex++
|
||||
}
|
||||
}
|
||||
|
||||
private fun replace(a: String): String {
|
||||
val map = mapOf(
|
||||
'0' to '5',
|
||||
'1' to '6',
|
||||
'2' to '7',
|
||||
'5' to '0',
|
||||
'6' to '1',
|
||||
'7' to '2'
|
||||
)
|
||||
var b = ""
|
||||
a.forEach {
|
||||
b += if (map.containsKey(it)) map[it] else it
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
private fun padLastChars(input:String):String{
|
||||
return if(input.reversed()[3].isDigit()) input
|
||||
else input.dropLast(4)
|
||||
}
|
||||
|
||||
private data class HashResponse(
|
||||
val hash: String? = null,
|
||||
val version:String? = null
|
||||
)
|
||||
|
||||
private data class SetupResponse(
|
||||
val seed: String,
|
||||
val src: String?=null,
|
||||
val link:String?=null
|
||||
)
|
||||
}
|
||||
}
|
|
@ -115,8 +115,9 @@ open class WcoStream : ExtractorApi() {
|
|||
)?.destructured) ?: return emptyList()
|
||||
// val (skey) = Regex("""skey\s=\s['"](.*?)['"];""").find(html)?.destructured
|
||||
// ?: return emptyList()
|
||||
keytwo = getWcoKey() ?: return emptyList()
|
||||
val encryptedID = encrypt(cipher(key, encrypt(Id))).replace("/", "_").replace("=","")
|
||||
val keys = getWcoKey()
|
||||
keytwo = keys?.wcoKey ?: return emptyList()
|
||||
val encryptedID = encrypt(cipher(keys.wcocipher!!, encrypt(Id))).replace("/", "_").replace("=","")
|
||||
val apiLink = "$baseUrl/info/$encryptedID"
|
||||
val referrer = "$baseUrl/e/$Id?domain=wcostream.cc"
|
||||
|
||||
|
|
|
@ -12,11 +12,10 @@ class WcoHelper {
|
|||
data class ExternalKeys(
|
||||
@JsonProperty("wco_key")
|
||||
val wcoKey: String? = null,
|
||||
@JsonProperty("wco_cipher_key")
|
||||
val wcocipher: String? = null
|
||||
)
|
||||
|
||||
private var keys: ExternalKeys? = null
|
||||
private val wcoKey: String? get() = keys?.wcoKey
|
||||
|
||||
private suspend fun getKeys() {
|
||||
keys = keys
|
||||
?: app.get("https://raw.githubusercontent.com/LagradOst/CloudStream-3/master/docs/keys.json")
|
||||
|
@ -25,9 +24,9 @@ class WcoHelper {
|
|||
)
|
||||
}
|
||||
|
||||
suspend fun getWcoKey(): String? {
|
||||
suspend fun getWcoKey(): ExternalKeys? {
|
||||
getKeys()
|
||||
return wcoKey
|
||||
return keys
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,148 @@
|
|||
package com.lagradost.cloudstream3.movieproviders
|
||||
|
||||
import androidx.core.text.parseAsHtml
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.mvvm.logError
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
|
||||
class AltadefinizioneProvider : MainAPI() {
|
||||
override val lang = "it"
|
||||
override var mainUrl = "https://altadefinizione.limo"
|
||||
override var name = "Altadefinizione"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
override val supportedTypes = setOf(
|
||||
TvType.Movie
|
||||
)
|
||||
|
||||
override suspend fun getMainPage(): HomePageResponse {
|
||||
val items = ArrayList<HomePageList>()
|
||||
val urls = listOf(
|
||||
Pair("$mainUrl/azione/", "Azione"),
|
||||
Pair("$mainUrl/avventura/", "Avventura"),
|
||||
)
|
||||
for ((url, name) in urls) {
|
||||
try {
|
||||
val soup = app.get(url).document
|
||||
val home = soup.select("div.box").map {
|
||||
val title = it.selectFirst("img")!!.attr("alt")
|
||||
val link = it.selectFirst("a")!!.attr("href")
|
||||
val image = mainUrl + it.selectFirst("img")!!.attr("src")
|
||||
val quality = getQualityFromString(it.selectFirst("span")!!.text())
|
||||
|
||||
MovieSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
image,
|
||||
null,
|
||||
null,
|
||||
quality,
|
||||
)
|
||||
}
|
||||
|
||||
items.add(HomePageList(name, home))
|
||||
} catch (e: Exception) {
|
||||
logError(e)
|
||||
}
|
||||
}
|
||||
if (items.size <= 0) throw ErrorLoadingException()
|
||||
return HomePageResponse(items)
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val doc = app.post("$mainUrl/index.php?do=search", data = mapOf(
|
||||
"subaction" to "search",
|
||||
"story" to query
|
||||
)).document
|
||||
return doc.select("div.box").map {
|
||||
val title = it.selectFirst("img")!!.attr("alt")
|
||||
val link = it.selectFirst("a")!!.attr("href")
|
||||
val image = mainUrl+it.selectFirst("img")!!.attr("src")
|
||||
val quality = getQualityFromString(it.selectFirst("span")!!.text())
|
||||
|
||||
MovieSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
image,
|
||||
null,
|
||||
null,
|
||||
quality,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun load(url: String): LoadResponse {
|
||||
val page = app.get(url)
|
||||
val document = page.document
|
||||
val title = document.selectFirst(" h1 > a")!!.text()
|
||||
val description = document.select("#sfull").toString().substringAfter("altadefinizione").substringBeforeLast("fonte trama").parseAsHtml().toString()
|
||||
val rating = null
|
||||
|
||||
val year = document.selectFirst("#details > li:nth-child(2)")!!.childNode(2).toString().filter { it.isDigit() }.toInt()
|
||||
|
||||
val poster = fixUrl(document.selectFirst("div.thumbphoto > img")!!.attr("src"))
|
||||
|
||||
val recomm = document.select("ul.related-list > li").map {
|
||||
val href = it.selectFirst("a")!!.attr("href")
|
||||
val posterUrl = mainUrl + it.selectFirst("img")!!.attr("src")
|
||||
val name = it.selectFirst("img")!!.attr("alt")
|
||||
MovieSearchResponse(
|
||||
name,
|
||||
href,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
posterUrl,
|
||||
null
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
return newMovieLoadResponse(
|
||||
title,
|
||||
url,
|
||||
TvType.Movie,
|
||||
url
|
||||
) {
|
||||
posterUrl = fixUrlNull(poster)
|
||||
this.year = year
|
||||
this.plot = description
|
||||
this.rating = rating
|
||||
this.recommendations = recomm
|
||||
this.duration = null
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
val doc = app.get(data).document
|
||||
if (doc.select("div.guardahd-player").isNullOrEmpty()){
|
||||
val videoUrl = doc.select("input").filter { it.hasAttr("data-mirror") }.last().attr("value")
|
||||
loadExtractor(videoUrl, data, callback)
|
||||
doc.select("#mirrors > li > a").forEach {
|
||||
loadExtractor(fixUrl(it.attr("data-target")), data, callback)
|
||||
}
|
||||
}
|
||||
else{
|
||||
val pagelinks = doc.select("div.guardahd-player").select("iframe").attr("src")
|
||||
val docLinks = app.get(pagelinks).document
|
||||
docLinks.select("body > div > ul > li").forEach {
|
||||
loadExtractor(fixUrl(it.attr("data-link")), data, callback)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
|
@ -354,7 +354,8 @@ open class BflixProvider : MainAPI() {
|
|||
jsonservers.vidstream,
|
||||
jsonservers.mcloud,
|
||||
jsonservers.mp4upload,
|
||||
jsonservers.streamtape
|
||||
jsonservers.streamtape,
|
||||
jsonservers.videovard,
|
||||
).mapNotNull {
|
||||
val epserver = app.get("$mainUrl/ajax/episode/info?id=$it").text
|
||||
(if (epserver.contains("url")) {
|
||||
|
|
|
@ -0,0 +1,207 @@
|
|||
package com.lagradost.cloudstream3.movieproviders
|
||||
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.mvvm.logError
|
||||
import com.lagradost.cloudstream3.app
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
|
||||
class Cb01Provider : MainAPI() {
|
||||
override val lang = "it"
|
||||
override var mainUrl = "https://cb01.rip"
|
||||
override var name = "Cineblog01"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
override val supportedTypes = setOf(
|
||||
TvType.Movie,
|
||||
TvType.TvSeries,
|
||||
)
|
||||
|
||||
override suspend fun getMainPage(): HomePageResponse {
|
||||
val items = ArrayList<HomePageList>()
|
||||
val urls = listOf(
|
||||
Pair("$mainUrl/genere/azione/", "Azione"),
|
||||
Pair("$mainUrl/genere/avventura/", "Avventura"),
|
||||
)
|
||||
for ((url, name) in urls) {
|
||||
try {
|
||||
val soup = app.get(url).document
|
||||
val home = soup.select("article.item.movies").map {
|
||||
val title = it.selectFirst("div.data > h3 > a")!!.text().substringBefore("(")
|
||||
val link = it.selectFirst("div.poster > a")!!.attr("href")
|
||||
TvSeriesSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
it.selectFirst("img")!!.attr("src"),
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
items.add(HomePageList(name, home))
|
||||
} catch (e: Exception) {
|
||||
logError(e)
|
||||
}
|
||||
}
|
||||
try {
|
||||
val soup = app.get("$mainUrl/serietv/").document
|
||||
val home = soup.select("article.item.tvshows").map {
|
||||
val title = it.selectFirst("div.data > h3 > a")!!.text().substringBefore("(")
|
||||
val link = it.selectFirst("div.poster > a")!!.attr("href")
|
||||
TvSeriesSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
it.selectFirst("img")!!.attr("src"),
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
items.add(HomePageList("Serie tv", home))
|
||||
} catch (e: Exception) {
|
||||
logError(e)
|
||||
}
|
||||
|
||||
if (items.size <= 0) throw ErrorLoadingException()
|
||||
return HomePageResponse(items)
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val queryformatted = query.replace(" ", "+")
|
||||
val url = "$mainUrl?s=$queryformatted"
|
||||
val doc = app.get(url,referer= mainUrl ).document
|
||||
return doc.select("div.result-item").map {
|
||||
val href = it.selectFirst("div.image > div > a")!!.attr("href")
|
||||
val poster = it.selectFirst("div.image > div > a > img")!!.attr("src")
|
||||
val name = it.selectFirst("div.details > div.title > a")!!.text().substringBefore("(")
|
||||
MovieSearchResponse(
|
||||
name,
|
||||
href,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
poster,
|
||||
null
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun load(url: String): LoadResponse {
|
||||
val page = app.get(url)
|
||||
val document = page.document
|
||||
val type = if (url.contains("film")) TvType.Movie else TvType.TvSeries
|
||||
val title = document.selectFirst("div.data > h1")!!.text().substringBefore("(")
|
||||
val description = document.select("#info > div.wp-content > p").html().toString()
|
||||
val rating = null
|
||||
|
||||
var year = document.selectFirst(" div.data > div.extra > span.date")!!.text().substringAfter(",")
|
||||
.filter { it.isDigit() }
|
||||
if (year.length > 4) {
|
||||
year = year.dropLast(4)
|
||||
}
|
||||
|
||||
val poster = document.selectFirst("div.poster > img")!!.attr("src")
|
||||
|
||||
val recomm = document.select("#single_relacionados >article").map {
|
||||
val href = it.selectFirst("a")!!.attr("href")
|
||||
val posterUrl = it.selectFirst("a > img")!!.attr("src")
|
||||
val name = it.selectFirst("a > img")!!.attr("alt").substringBeforeLast("(")
|
||||
MovieSearchResponse(
|
||||
name,
|
||||
href,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
posterUrl,
|
||||
null
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (type == TvType.TvSeries) {
|
||||
|
||||
val episodeList = ArrayList<Episode>()
|
||||
document.select("#seasons > div").reversed().map { element ->
|
||||
val season = element.selectFirst("div.se-q > span.se-t")!!.text().toInt()
|
||||
element.select("div.se-a > ul > li").map{ episode ->
|
||||
val href = episode.selectFirst("div.episodiotitle > a")!!.attr("href")
|
||||
val epNum =episode.selectFirst("div.numerando")!!.text().substringAfter("-").filter { it.isDigit() }.toIntOrNull()
|
||||
val epTitle = episode.selectFirst("div.episodiotitle > a")!!.text()
|
||||
val posterUrl = episode.selectFirst("div.imagen > img")!!.attr("src")
|
||||
episodeList.add(
|
||||
Episode(
|
||||
href,
|
||||
epTitle,
|
||||
season,
|
||||
epNum,
|
||||
posterUrl,
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
return TvSeriesLoadResponse(
|
||||
title,
|
||||
url,
|
||||
this.name,
|
||||
type,
|
||||
episodeList,
|
||||
fixUrlNull(poster),
|
||||
year.toIntOrNull(),
|
||||
description,
|
||||
null,
|
||||
rating,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
recomm
|
||||
)
|
||||
} else {
|
||||
|
||||
return newMovieLoadResponse(
|
||||
title,
|
||||
url,
|
||||
type,
|
||||
url
|
||||
) {
|
||||
posterUrl = fixUrlNull(poster)
|
||||
this.year = year.toIntOrNull()
|
||||
this.plot = description
|
||||
this.rating = rating
|
||||
this.recommendations = recomm
|
||||
this.duration = null
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
val doc = app.get(data).document
|
||||
val type = if( data.contains("film") ){"movie"} else {"tv"}
|
||||
val idpost=doc.select("#player-option-1").attr("data-post")
|
||||
val test = app.post("$mainUrl/wp-admin/admin-ajax.php", headers = mapOf(
|
||||
"content-type" to "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
"accept" to "*/*",
|
||||
"X-Requested-With" to "XMLHttpRequest",
|
||||
), data = mapOf(
|
||||
"action" to "doo_player_ajax",
|
||||
"post" to idpost,
|
||||
"nume" to "1",
|
||||
"type" to type,
|
||||
))
|
||||
|
||||
val url2= Regex("""src='((.|\\n)*?)'""").find(test.text)?.groups?.get(1)?.value.toString()
|
||||
val trueUrl = app.get(url2, headers = mapOf("referer" to mainUrl)).url
|
||||
loadExtractor(trueUrl, data, callback)
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
|
@ -52,24 +52,26 @@ data class Image(
|
|||
@JsonProperty("url") val url: String,
|
||||
@JsonProperty("type") val type: String,
|
||||
@JsonProperty("sc_url") val scURL: String,
|
||||
@JsonProperty("proxy") val proxy: Proxy,
|
||||
@JsonProperty("server") val server: Proxy
|
||||
// @JsonProperty("proxy") val proxy: Proxy,
|
||||
// @JsonProperty("server") val server: Proxy
|
||||
)
|
||||
|
||||
data class Proxy(
|
||||
@JsonProperty("id") val id: Long,
|
||||
@JsonProperty("type") val type: String,
|
||||
@JsonProperty("ip") val ip: String,
|
||||
@JsonProperty("number") val number: Long,
|
||||
@JsonProperty("storage") val storage: Long,
|
||||
@JsonProperty("max_storage") val maxStorage: Long,
|
||||
@JsonProperty("max_conversions") val maxConversions: Any? = null,
|
||||
@JsonProperty("max_publications") val maxPublications: Any? = null,
|
||||
@JsonProperty("created_at") val createdAt: String,
|
||||
@JsonProperty("updated_at") val updatedAt: String,
|
||||
@JsonProperty("upload_bandwidth") val uploadBandwidth: Any? = null,
|
||||
@JsonProperty("upload_bandwidth_limit") val uploadBandwidthLimit: Any? = null
|
||||
)
|
||||
// Proxy is not used and crashes otherwise
|
||||
|
||||
//data class Proxy(
|
||||
// @JsonProperty("id") val id: Long,
|
||||
// @JsonProperty("type") val type: String,
|
||||
// @JsonProperty("ip") val ip: String,
|
||||
// @JsonProperty("number") val number: Long,
|
||||
// @JsonProperty("storage") val storage: Long,
|
||||
// @JsonProperty("max_storage") val maxStorage: Long,
|
||||
// @JsonProperty("max_conversions") val maxConversions: Any? = null,
|
||||
// @JsonProperty("max_publications") val maxPublications: Any? = null,
|
||||
// @JsonProperty("created_at") val createdAt: String,
|
||||
// @JsonProperty("updated_at") val updatedAt: String,
|
||||
// @JsonProperty("upload_bandwidth") val uploadBandwidth: Any? = null,
|
||||
// @JsonProperty("upload_bandwidth_limit") val uploadBandwidthLimit: Any? = null
|
||||
//)
|
||||
|
||||
data class Season(
|
||||
@JsonProperty("id") val id: Long,
|
||||
|
@ -126,7 +128,7 @@ data class TrailerElement(
|
|||
|
||||
class StreamingcommunityProvider : MainAPI() {
|
||||
override val lang = "it"
|
||||
override var mainUrl = "https://streamingcommunity.top"
|
||||
override var mainUrl = "https://streamingcommunity.monster"
|
||||
override var name = "Streamingcommunity"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
|
|
|
@ -119,6 +119,8 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
|
|||
MwvnVizcloudInfo(),
|
||||
VizcloudDigital(),
|
||||
VizcloudCloud(),
|
||||
VideoVard(),
|
||||
VideovardSX(),
|
||||
Mp4Upload(),
|
||||
StreamTape(),
|
||||
|
||||
|
@ -170,6 +172,7 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
|
|||
DoodSoExtractor(),
|
||||
DoodLaExtractor(),
|
||||
DoodWsExtractor(),
|
||||
DoodShExtractor(),
|
||||
|
||||
AsianLoad(),
|
||||
|
||||
|
@ -179,6 +182,10 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
|
|||
ZplayerV2(),
|
||||
Upstream(),
|
||||
|
||||
Maxstream(),
|
||||
Tantifilm(),
|
||||
Userload(),
|
||||
Supervideo(),
|
||||
|
||||
// StreamSB.kt works
|
||||
// SBPlay(),
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{
|
||||
"wco_key": "51wJ0FDq/UVCefLopEcmK3ni4WIQztMjZdSYOsbHr9R2h7PvxBGAuglaN8+kXT6y"
|
||||
"wco_key": "51wJ0FDq/UVCefLopEcmK3ni4WIQztMjZdSYOsbHr9R2h7PvxBGAuglaN8+kXT6y",
|
||||
"wco_cipher_key": "vZUFFBPxMqDeOfAm"
|
||||
}
|
|
@ -17,6 +17,12 @@
|
|||
"status": 1,
|
||||
"url": "https://allmoviesforyou.net"
|
||||
},
|
||||
"AltadefinizioneProvider": {
|
||||
"language": "it",
|
||||
"name": "Altadefinizione",
|
||||
"status": 1,
|
||||
"url": "https://altadefinizione.limo"
|
||||
},
|
||||
"AnimeFlickProvider": {
|
||||
"language": "en",
|
||||
"name": "AnimeFlick",
|
||||
|
@ -71,6 +77,12 @@
|
|||
"status": 1,
|
||||
"url": "https://bflix.ru"
|
||||
},
|
||||
"Cb01Provider": {
|
||||
"language": "it",
|
||||
"name": "Cineblog",
|
||||
"status": 1,
|
||||
"url": "https://cb01.rip"
|
||||
},
|
||||
"CinecalidadProvider": {
|
||||
"language": "es",
|
||||
"name": "Cinecalidad",
|
||||
|
@ -361,7 +373,7 @@
|
|||
"language": "it",
|
||||
"name": "Streamingcommunity",
|
||||
"status": 1,
|
||||
"url": "https://streamingcommunity.top"
|
||||
"url": "https://streamingcommunity.monster"
|
||||
},
|
||||
"TantifilmProvider": {
|
||||
"language": "it",
|
||||
|
|
Loading…
Reference in a new issue