mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Revert "move spanish providers to their own repo"
This reverts commit b33842569b
.
This commit is contained in:
parent
d6f89c399b
commit
b8f167f506
67 changed files with 4296 additions and 0 deletions
25
EntrepeliculasyseriesProvider/build.gradle.kts
Normal file
25
EntrepeliculasyseriesProvider/build.gradle.kts
Normal file
|
@ -0,0 +1,25 @@
|
|||
// 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(
|
||||
"TvSeries",
|
||||
"Movie",
|
||||
)
|
||||
|
||||
iconUrl = "https://www.google.com/s2/favicons?domain=entrepeliculasyseries.nu&sz=24"
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.lagradost"/>
|
|
@ -0,0 +1,177 @@
|
|||
package com.lagradost
|
||||
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
|
||||
class EntrepeliculasyseriesProvider : MainAPI() {
|
||||
override var mainUrl = "https://entrepeliculasyseries.nu"
|
||||
override var name = "EntrePeliculasySeries"
|
||||
override var lang = "es"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
override val hasDownloadSupport = true
|
||||
override val supportedTypes = setOf(
|
||||
TvType.Movie,
|
||||
TvType.TvSeries,
|
||||
)
|
||||
override val vpnStatus = VPNStatus.MightBeNeeded //Due to evoload sometimes not loading
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
Pair("$mainUrl/series/page/", "Series"),
|
||||
Pair("$mainUrl/peliculas/page/", "Peliculas"),
|
||||
Pair("$mainUrl/anime/page/", "Animes"),
|
||||
)
|
||||
|
||||
override suspend fun getMainPage(
|
||||
page: Int,
|
||||
request : MainPageRequest
|
||||
): HomePageResponse {
|
||||
val url = request.data + page
|
||||
|
||||
val soup = app.get(url).document
|
||||
val home = soup.select("ul.list-movie li").map {
|
||||
val title = it.selectFirst("a.link-title h2")!!.text()
|
||||
val link = it.selectFirst("a")!!.attr("href")
|
||||
TvSeriesSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
if (link.contains("/pelicula/")) TvType.Movie else TvType.TvSeries,
|
||||
it.selectFirst("a.poster img")!!.attr("src"),
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
return newHomePageResponse(request.name, home)
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val url = "$mainUrl/?s=${query}"
|
||||
val document = app.get(url).document
|
||||
|
||||
return document.select("li.xxx.TPostMv").map {
|
||||
val title = it.selectFirst("h2.Title")!!.text()
|
||||
val href = it.selectFirst("a")!!.attr("href")
|
||||
val image = it.selectFirst("img.lazy")!!.attr("data-src")
|
||||
val isMovie = href.contains("/pelicula/")
|
||||
|
||||
if (isMovie) {
|
||||
MovieSearchResponse(
|
||||
title,
|
||||
href,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
image,
|
||||
null
|
||||
)
|
||||
} else {
|
||||
TvSeriesSearchResponse(
|
||||
title,
|
||||
href,
|
||||
this.name,
|
||||
TvType.TvSeries,
|
||||
image,
|
||||
null,
|
||||
null
|
||||
)
|
||||
}
|
||||
}.toList()
|
||||
}
|
||||
|
||||
|
||||
override suspend fun load(url: String): LoadResponse? {
|
||||
val soup = app.get(url, timeout = 120).document
|
||||
|
||||
val title = soup.selectFirst("h1.title-post")!!.text()
|
||||
val description = soup.selectFirst("p.text-content:nth-child(3)")?.text()?.trim()
|
||||
val poster: String? = soup.selectFirst("article.TPost img.lazy")!!.attr("data-src")
|
||||
val episodes = soup.select(".TPostMv article").map { li ->
|
||||
val href = (li.select("a") ?: li.select(".C a") ?: li.select("article a")).attr("href")
|
||||
val epThumb = li.selectFirst("div.Image img")!!.attr("data-src")
|
||||
val seasonid = li.selectFirst("span.Year")!!.text().let { str ->
|
||||
str.split("x").mapNotNull { subStr -> subStr.toIntOrNull() }
|
||||
}
|
||||
val isValid = seasonid.size == 2
|
||||
val episode = if (isValid) seasonid.getOrNull(1) else null
|
||||
val season = if (isValid) seasonid.getOrNull(0) else null
|
||||
Episode(
|
||||
href,
|
||||
null,
|
||||
season,
|
||||
episode,
|
||||
fixUrl(epThumb)
|
||||
)
|
||||
}
|
||||
return when (val tvType =
|
||||
if (url.contains("/pelicula/")) TvType.Movie else TvType.TvSeries) {
|
||||
TvType.TvSeries -> {
|
||||
TvSeriesLoadResponse(
|
||||
title,
|
||||
url,
|
||||
this.name,
|
||||
tvType,
|
||||
episodes,
|
||||
poster,
|
||||
null,
|
||||
description,
|
||||
)
|
||||
}
|
||||
TvType.Movie -> {
|
||||
MovieLoadResponse(
|
||||
title,
|
||||
url,
|
||||
this.name,
|
||||
tvType,
|
||||
url,
|
||||
poster,
|
||||
null,
|
||||
description,
|
||||
)
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
app.get(data).document.select(".video ul.dropdown-menu li").apmap {
|
||||
val servers = it.attr("data-link")
|
||||
val doc = app.get(servers).document
|
||||
doc.select("input").apmap {
|
||||
val postkey = it.attr("value")
|
||||
app.post(
|
||||
"https://entrepeliculasyseries.nu/r.php",
|
||||
headers = mapOf(
|
||||
"Host" to "entrepeliculasyseries.nu",
|
||||
"User-Agent" to USER_AGENT,
|
||||
"Accept" to "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8",
|
||||
"Accept-Language" to "en-US,en;q=0.5",
|
||||
"Content-Type" to "application/x-www-form-urlencoded",
|
||||
"Origin" to "https://entrepeliculasyseries.nu",
|
||||
"DNT" to "1",
|
||||
"Connection" to "keep-alive",
|
||||
"Referer" to servers,
|
||||
"Upgrade-Insecure-Requests" to "1",
|
||||
"Sec-Fetch-Dest" to "document",
|
||||
"Sec-Fetch-Mode" to "navigate",
|
||||
"Sec-Fetch-Site" to "same-origin",
|
||||
"Sec-Fetch-User" to "?1",
|
||||
),
|
||||
//params = mapOf(Pair("h", postkey)),
|
||||
data = mapOf(Pair("h", postkey)),
|
||||
allowRedirects = false
|
||||
).okhttpResponse.headers.values("location").apmap {
|
||||
loadExtractor(it, data, subtitleCallback, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
package com.lagradost
|
||||
|
||||
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
|
||||
import com.lagradost.cloudstream3.plugins.Plugin
|
||||
import android.content.Context
|
||||
|
||||
@CloudstreamPlugin
|
||||
class EntrepeliculasyseriesProviderPlugin: Plugin() {
|
||||
override fun load(context: Context) {
|
||||
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||
registerMainAPI(EntrepeliculasyseriesProvider())
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue