forked from recloudstream/cloudstream
Added two new italian Providers and five new extraxtors (#1111)
* Added 3 new extractors and a new italian provider * Added 3 new extractors and a new italian provider * Added 3 new extractors and a new italian provider * Added 4 new extractors and a new italian provider * Added another italian provider Altadefinizione, and a new extractor Supervideo * fix extractor Supervideo * fix extractor Supervideo * fix extractor Userload, fixed pr comments * final fix to the extractor Userload
This commit is contained in:
parent
0c6cf7a0b8
commit
cbe4476d0e
9 changed files with 595 additions and 0 deletions
|
@ -87,6 +87,8 @@ object APIHolder {
|
||||||
TheFlixToProvider(),
|
TheFlixToProvider(),
|
||||||
StreamingcommunityProvider(),
|
StreamingcommunityProvider(),
|
||||||
TantifilmProvider(),
|
TantifilmProvider(),
|
||||||
|
Cb01Provider(),
|
||||||
|
AltadefinizioneProvider(),
|
||||||
HDMovie5(),
|
HDMovie5(),
|
||||||
RebahinProvider(),
|
RebahinProvider(),
|
||||||
LayarKacaProvider(),
|
LayarKacaProvider(),
|
||||||
|
|
|
@ -11,6 +11,10 @@ class DoodCxExtractor : DoodLaExtractor() {
|
||||||
override var mainUrl = "https://dood.cx"
|
override var mainUrl = "https://dood.cx"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class DoodShExtractor : DoodLaExtractor() {
|
||||||
|
override var mainUrl = "https://dood.sh"
|
||||||
|
}
|
||||||
|
|
||||||
class DoodPmExtractor : DoodLaExtractor() {
|
class DoodPmExtractor : DoodLaExtractor() {
|
||||||
override var mainUrl = "https://dood.pm"
|
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
|
||||||
|
}
|
||||||
|
}
|
|
@ -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,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
|
||||||
|
}
|
||||||
|
}
|
|
@ -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
|
||||||
|
}
|
||||||
|
}
|
|
@ -172,6 +172,7 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
|
||||||
DoodSoExtractor(),
|
DoodSoExtractor(),
|
||||||
DoodLaExtractor(),
|
DoodLaExtractor(),
|
||||||
DoodWsExtractor(),
|
DoodWsExtractor(),
|
||||||
|
DoodShExtractor(),
|
||||||
|
|
||||||
AsianLoad(),
|
AsianLoad(),
|
||||||
|
|
||||||
|
@ -181,6 +182,10 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
|
||||||
ZplayerV2(),
|
ZplayerV2(),
|
||||||
Upstream(),
|
Upstream(),
|
||||||
|
|
||||||
|
Maxstream(),
|
||||||
|
Tantifilm(),
|
||||||
|
Userload(),
|
||||||
|
Supervideo(),
|
||||||
|
|
||||||
// StreamSB.kt works
|
// StreamSB.kt works
|
||||||
// SBPlay(),
|
// SBPlay(),
|
||||||
|
|
Loading…
Reference in a new issue