Fixed PhimmoichillProvider and disabled some providers

This commit is contained in:
Blatzar 2022-08-24 03:51:05 +02:00
parent 4baacbb689
commit 0860d85a7c
7 changed files with 28 additions and 17 deletions

View file

@ -16,7 +16,7 @@ cloudstream {
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
status = 0 // will be 3 if unspecified
tvTypes = listOf(
"TvSeries",
"Movie",

View file

@ -1,10 +1,12 @@
package com.lagradost
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor
class PeliSmartProvider: MainAPI() {
// Dead link
override var mainUrl = "https://pelismart.com"
override var name = "PeliSmart"
override var lang = "es"
@ -45,7 +47,7 @@ class PeliSmartProvider: MainAPI() {
items.add(HomePageList(name, home))
} catch (e: Exception) {
e.printStackTrace()
logError(e)
}
}

View file

@ -16,7 +16,7 @@ cloudstream {
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
status = 0 // will be 3 if unspecified
tvTypes = listOf(
"TvSeries",
"Movie",

View file

@ -7,6 +7,7 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor
class PelisflixProvider : MainAPI() {
// Link not found anymore :(
override var mainUrl = "https://pelisflix.li"
override var name = "Pelisflix"
override var lang = "es"
@ -198,7 +199,7 @@ class PelisflixProvider : MainAPI() {
val postkey = iframe.replace("/stream/index.php?h=", "") // this obtains
// djNIdHNCR2lKTGpnc3YwK3pyRCs3L2xkQmljSUZ4ai9ibTcza0JRODNMcmFIZ0hPejdlYW0yanJIL2prQ1JCZA POST KEY
app.post(
"https://pelisflix.li/stream/r.php",
"$mainUrl/stream/r.php",
headers = mapOf(
"Host" to "pelisflix.li",
"User-Agent" to USER_AGENT,

View file

@ -16,7 +16,7 @@ cloudstream {
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
status = 0 // will be 3 if unspecified
tvTypes = listOf(
"TvSeries",
"Movie",

View file

@ -5,8 +5,8 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.nodes.Element
class PelisplusHDProvider:MainAPI() {
override var mainUrl = "https://pelisplushd.net"
class PelisplusHDProvider : MainAPI() {
override var mainUrl = "https://pelisplushd.cam"
override var name = "PelisplusHD"
override var lang = "es"
override val hasMainPage = true
@ -16,7 +16,8 @@ class PelisplusHDProvider:MainAPI() {
TvType.Movie,
TvType.TvSeries,
)
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
val items = ArrayList<HomePageList>()
val document = app.get(mainUrl).document
val map = mapOf(
@ -35,6 +36,7 @@ class PelisplusHDProvider:MainAPI() {
}
return HomePageResponse(items)
}
private fun Element.toSearchResult(): SearchResponse {
val title = this.select(".listing-content p").text()
val href = this.select("a").attr("href")
@ -63,7 +65,7 @@ class PelisplusHDProvider:MainAPI() {
}
override suspend fun search(query: String): List<SearchResponse> {
val url = "https://pelisplushd.net/search?s=${query}"
val url = "$mainUrl/search?s=${query}"
val document = app.get(url).document
return document.select("a.Posters-link").map {
@ -104,8 +106,8 @@ class PelisplusHDProvider:MainAPI() {
val episodes = soup.select("div.tab-pane .btn").map { li ->
val href = li.selectFirst("a")!!.attr("href")
val name = li.selectFirst(".btn-primary.btn-block")!!.text()
val seasonid = href.replace("/capitulo/","-")
.replace(Regex("$mainUrl/.*/.*/temporada/"),"").let { str ->
val seasonid = href.replace("/capitulo/", "-")
.replace(Regex("$mainUrl/.*/.*/temporada/"), "").let { str ->
str.split("-").mapNotNull { subStr -> subStr.toIntOrNull() }
}
val isValid = seasonid.size == 2
@ -122,7 +124,7 @@ class PelisplusHDProvider:MainAPI() {
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(", ","") }
.map { it?.text()?.trim().toString().replace(", ", "") }
return when (tvType) {
TvType.TvSeries -> {
@ -157,6 +159,7 @@ class PelisplusHDProvider:MainAPI() {
else -> null
}
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
@ -164,7 +167,9 @@ class PelisplusHDProvider:MainAPI() {
callback: (ExtractorLink) -> Unit
): Boolean {
app.get(data).document.select("div.player > script").map { script ->
fetchUrls(script.data().replace("https://pelisplushd.net/fembed.php?url=","https://www.fembed.com/v/")).apmap {
fetchUrls(
script.data().replace("$mainUrl/fembed.php?url=", "https://www.fembed.com/v/")
).apmap {
loadExtractor(it, data, subtitleCallback, callback)
}
}

View file

@ -143,7 +143,6 @@ class PhimmoichillProvider : MainAPI() {
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val document = app.get(data).document
val key = document.select("div#content script").mapNotNull { script ->
@ -151,11 +150,15 @@ class PhimmoichillProvider : MainAPI() {
val id = script.data().substringAfter("filmInfo.episodeID = parseInt('")
.substringBefore("');")
app.post(
url = "$mainUrl/pmplayer.php",
// Not mainUrl
url = "https://phimmoichills.net/pmplayer.php",
data = mapOf("qcao" to id),
referer = data,
headers = mapOf("X-Requested-With" to "XMLHttpRequest")
).text.substringAfterLast("iniPlayers(\"").substringBefore("\",")
headers = mapOf(
"X-Requested-With" to "XMLHttpRequest",
"Content-Type" to "application/x-www-form-urlencoded; charset=UTF-8"
)
).text.also { println("HERERERR $it") }.substringAfterLast("iniPlayers(\"").substringBefore("\",")
} else {
null
}