mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
New spanish dubbed site PelisplusHD (#465)
* Added PelisplusHD * Update Uqload.kt
This commit is contained in:
parent
55fb24a51f
commit
fd6eee635f
5 changed files with 185 additions and 1 deletions
|
@ -29,6 +29,7 @@ object APIHolder {
|
|||
|
||||
val apis = arrayListOf(
|
||||
PelisplusProvider(),
|
||||
PelisplusHDProvider(),
|
||||
GogoanimeProvider(),
|
||||
AllAnimeProvider(),
|
||||
//ShiroProvider(), // v2 fucked me
|
||||
|
|
|
@ -17,6 +17,10 @@ class SBPlay2 : SBPlay() {
|
|||
override val mainUrl = "https://sbplay2.com"
|
||||
}
|
||||
|
||||
class SBPlay3 : SBPlay() {
|
||||
override val mainUrl = "https://pelistop.co"
|
||||
}
|
||||
|
||||
open class SBPlay : ExtractorApi() {
|
||||
override val mainUrl = "https://sbplay.one"
|
||||
override val name = "SBPlay"
|
||||
|
|
|
@ -3,7 +3,11 @@ package com.lagradost.cloudstream3.extractors
|
|||
import com.lagradost.cloudstream3.utils.*
|
||||
import com.lagradost.cloudstream3.app
|
||||
|
||||
class Uqload : ExtractorApi() {
|
||||
class Uqload1 : Uqload() {
|
||||
override val mainUrl = "https://uqload.com"
|
||||
}
|
||||
|
||||
open class Uqload : ExtractorApi() {
|
||||
override val name: String = "Uqload"
|
||||
override val mainUrl: String = "https://www.uqload.com"
|
||||
private val srcRegex = Regex("""sources:.\[(.*?)\]""") // would be possible to use the parse and find src attribute
|
||||
|
|
|
@ -0,0 +1,173 @@
|
|||
package com.lagradost.cloudstream3.movieproviders
|
||||
|
||||
import com.lagradost.cloudstream3.*
|
||||
import com.lagradost.cloudstream3.utils.*
|
||||
import org.jsoup.Jsoup
|
||||
import java.util.*
|
||||
|
||||
class PelisplusHDProvider:MainAPI() {
|
||||
override val mainUrl: String
|
||||
get() = "https://pelisplushd.net"
|
||||
override val name: String
|
||||
get() = "PelisplusHD"
|
||||
override val lang = "es"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
override val hasDownloadSupport = true
|
||||
override val supportedTypes = setOf(
|
||||
TvType.Movie,
|
||||
TvType.TvSeries,
|
||||
TvType.Anime,
|
||||
)
|
||||
override fun getMainPage(): HomePageResponse {
|
||||
val items = ArrayList<HomePageList>()
|
||||
val urls = listOf(
|
||||
Pair("$mainUrl/peliculas", "Peliculas"),
|
||||
Pair("$mainUrl/series", "Series"),
|
||||
Pair("$mainUrl/generos/dorama", "Doramas"),
|
||||
Pair("$mainUrl/animes", "Animes"),
|
||||
)
|
||||
for (i in urls) {
|
||||
try {
|
||||
val response = app.get(i.first)
|
||||
val soup = Jsoup.parse(response.text)
|
||||
val home = soup.select("a.Posters-link").map {
|
||||
val title = it.selectFirst(".listing-content p").text()
|
||||
val link = it.selectFirst("a").attr("href")
|
||||
TvSeriesSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
if (link.contains("/pelicula/")) TvType.Movie else TvType.TvSeries,
|
||||
it.selectFirst(".Posters-img").attr("src"),
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
items.add(HomePageList(i.second, home))
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
if (items.size <= 0) throw ErrorLoadingException()
|
||||
return HomePageResponse(items)
|
||||
}
|
||||
|
||||
override fun search(query: String): List<SearchResponse> {
|
||||
val url = "https://pelisplushd.net/search?s=${query}"
|
||||
val html = app.get(url).text
|
||||
val document = Jsoup.parse(html)
|
||||
|
||||
return document.select("a.Posters-link").map {
|
||||
val title = it.selectFirst(".listing-content p").text()
|
||||
val href = it.selectFirst("a").attr("href")
|
||||
val image = it.selectFirst(".Posters-img").attr("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
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun load(url: String): LoadResponse? {
|
||||
val html = app.get(url).text
|
||||
val soup = Jsoup.parse(html)
|
||||
|
||||
val title = soup.selectFirst(".m-b-5").text()
|
||||
val description = soup.selectFirst("div.text-large")?.text()?.trim()
|
||||
val poster: String? = soup.selectFirst(".img-fluid").attr("src")
|
||||
val episodes = soup.select("div.tab-pane .btn").map { li ->
|
||||
val href = li.selectFirst("a").attr("href")
|
||||
TvSeriesEpisode(
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
href,
|
||||
)
|
||||
}
|
||||
|
||||
val year = soup.selectFirst(".p-r-15 .text-semibold").text().toIntOrNull()
|
||||
val tvType = if (url.contains("/pelicula/")) TvType.Movie else TvType.TvSeries
|
||||
val tags = soup.select(".p-h-15.text-center a span.font-size-18.text-info.text-semibold")
|
||||
.map { it?.text()?.trim().toString().replace(", ","") }
|
||||
|
||||
return when (tvType) {
|
||||
TvType.TvSeries -> {
|
||||
TvSeriesLoadResponse(
|
||||
title,
|
||||
url,
|
||||
this.name,
|
||||
tvType,
|
||||
episodes,
|
||||
poster,
|
||||
year,
|
||||
description,
|
||||
ShowStatus.Ongoing,
|
||||
null,
|
||||
null,
|
||||
tags,
|
||||
)
|
||||
}
|
||||
TvType.Movie -> {
|
||||
MovieLoadResponse(
|
||||
title,
|
||||
url,
|
||||
this.name,
|
||||
tvType,
|
||||
url,
|
||||
poster,
|
||||
year,
|
||||
description,
|
||||
null,
|
||||
null,
|
||||
tags,
|
||||
)
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
override fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
val html = app.get(data).text
|
||||
val soup = Jsoup.parse(html)
|
||||
val selector = soup.selectFirst("div.player > script").toString()
|
||||
val linkRegex = Regex("""(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*))""")
|
||||
val links = linkRegex.findAll(selector).map {
|
||||
it.value.replace("https://pelisplushd.net/fembed.php?url=","https://www.fembed.com/v/")
|
||||
}.toList()
|
||||
for (link in links) {
|
||||
for (extractor in extractorApis) {
|
||||
if (link.startsWith(extractor.mainUrl)) {
|
||||
extractor.getSafeUrl(link, data)?.forEach {
|
||||
callback(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
|
@ -103,6 +103,7 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
|
|||
Fplayer(),
|
||||
WatchSB(),
|
||||
Uqload(),
|
||||
Uqload1(),
|
||||
Evoload(),
|
||||
VoeExtractor(),
|
||||
UpstreamExtractor(),
|
||||
|
@ -118,6 +119,7 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
|
|||
SBPlay(),
|
||||
SBPlay1(),
|
||||
SBPlay2(),
|
||||
SBPlay3(),
|
||||
)
|
||||
|
||||
fun getExtractorApiFromName(name: String): ExtractorApi {
|
||||
|
|
Loading…
Reference in a new issue