mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
move spanish providers to their own repo
This commit is contained in:
parent
a91bc06fcc
commit
b33842569b
67 changed files with 0 additions and 4296 deletions
|
@ -1,23 +0,0 @@
|
|||
// use an integer for version numbers
|
||||
version = 1
|
||||
|
||||
|
||||
cloudstream {
|
||||
// All of these properties are optional, you can safely remove them
|
||||
|
||||
// description = "Lorem Ipsum"
|
||||
// authors = listOf("Cloudburst")
|
||||
|
||||
/**
|
||||
* Status int as the following:
|
||||
* 0: Down
|
||||
* 1: Ok
|
||||
* 2: Slow
|
||||
* 3: Beta only
|
||||
* */
|
||||
status = 1 // will be 3 if unspecified
|
||||
tvTypes = listOf(
|
||||
"Movie",
|
||||
)
|
||||
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.lagradost"/>
|
|
@ -1,94 +0,0 @@
|
|||
package com.lagradost
|
||||
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
|
||||
class ElifilmsProvider : MainAPI() {
|
||||
override var mainUrl: String = "https://elifilms.net"
|
||||
override var name: String = "Elifilms"
|
||||
override var lang = "es"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
override val hasDownloadSupport = true
|
||||
override val supportedTypes = setOf(
|
||||
TvType.Movie,
|
||||
)
|
||||
|
||||
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
|
||||
val items = ArrayList<HomePageList>()
|
||||
val newest = app.get(mainUrl).document.selectFirst("a.fav_link.premiera")?.attr("href")
|
||||
val urls = listOf(
|
||||
Pair(mainUrl, "Películas recientes"),
|
||||
Pair("$mainUrl/4k-peliculas/", "Películas en 4k"),
|
||||
Pair(newest, "Últimos estrenos"),
|
||||
)
|
||||
urls.apmap { (url, name) ->
|
||||
val soup = app.get(url ?: "").document
|
||||
val home = soup.select("article.shortstory.cf").map {
|
||||
val title = it.selectFirst(".short_header")?.text() ?: ""
|
||||
val link = it.selectFirst("div a")?.attr("href") ?: ""
|
||||
TvSeriesSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
it.selectFirst("a.ah-imagge img")?.attr("data-src"),
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
items.add(HomePageList(name, home))
|
||||
}
|
||||
if (items.size <= 0) throw ErrorLoadingException()
|
||||
return HomePageResponse(items)
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val url = "$mainUrl/?s=$query"
|
||||
val doc = app.get(url).document
|
||||
return doc.select("article.cf").map {
|
||||
val href = it.selectFirst("div.short_content a")?.attr("href") ?: ""
|
||||
val poster = it.selectFirst("a.ah-imagge img")?.attr("data-src")
|
||||
val name = it.selectFirst(".short_header")?.text() ?: ""
|
||||
(MovieSearchResponse(name, href, this.name, TvType.Movie, poster, null))
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun load(url: String): LoadResponse {
|
||||
val document = app.get(url, timeout = 120).document
|
||||
val title = document.selectFirst(".post_title h1")?.text() ?: ""
|
||||
val rating = document.select("span.imdb.rki").toString().toIntOrNull()
|
||||
val poster = document.selectFirst(".poster img")?.attr("src")
|
||||
val desc = document.selectFirst("div.notext .actors p")?.text()
|
||||
val tags = document.select("td.notext a")
|
||||
.map { it?.text()?.trim().toString() }
|
||||
return MovieLoadResponse(
|
||||
title,
|
||||
url,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
url,
|
||||
poster,
|
||||
null,
|
||||
desc,
|
||||
rating,
|
||||
tags
|
||||
)
|
||||
}
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
app.get(data).document.select("li.change-server a").apmap {
|
||||
val encodedurl = it.attr("data-id")
|
||||
val urlDecoded = base64Decode(encodedurl)
|
||||
val url = fixUrl(urlDecoded)
|
||||
loadExtractor(url, data, subtitleCallback, callback)
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
package com.lagradost
|
||||
|
||||
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
|
||||
import com.lagradost.cloudstream3.plugins.Plugin
|
||||
import android.content.Context
|
||||
|
||||
@CloudstreamPlugin
|
||||
class ElifilmsProviderPlugin: Plugin() {
|
||||
override fun load(context: Context) {
|
||||
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||
registerMainAPI(ElifilmsProvider())
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue