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 * 2: Slow
* 3: Beta only * 3: Beta only
* */ * */
status = 1 // will be 3 if unspecified status = 0 // will be 3 if unspecified
tvTypes = listOf( tvTypes = listOf(
"TvSeries", "TvSeries",
"Movie", "Movie",

View file

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

View file

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

View file

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

View file

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

View file

@ -6,7 +6,7 @@ import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
class PelisplusHDProvider : MainAPI() { class PelisplusHDProvider : MainAPI() {
override var mainUrl = "https://pelisplushd.net" override var mainUrl = "https://pelisplushd.cam"
override var name = "PelisplusHD" override var name = "PelisplusHD"
override var lang = "es" override var lang = "es"
override val hasMainPage = true override val hasMainPage = true
@ -16,6 +16,7 @@ class PelisplusHDProvider:MainAPI() {
TvType.Movie, TvType.Movie,
TvType.TvSeries, 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 items = ArrayList<HomePageList>()
val document = app.get(mainUrl).document val document = app.get(mainUrl).document
@ -35,6 +36,7 @@ class PelisplusHDProvider:MainAPI() {
} }
return HomePageResponse(items) return HomePageResponse(items)
} }
private fun Element.toSearchResult(): SearchResponse { private fun Element.toSearchResult(): SearchResponse {
val title = this.select(".listing-content p").text() val title = this.select(".listing-content p").text()
val href = this.select("a").attr("href") val href = this.select("a").attr("href")
@ -63,7 +65,7 @@ class PelisplusHDProvider:MainAPI() {
} }
override suspend fun search(query: String): List<SearchResponse> { 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 val document = app.get(url).document
return document.select("a.Posters-link").map { return document.select("a.Posters-link").map {
@ -157,6 +159,7 @@ class PelisplusHDProvider:MainAPI() {
else -> null else -> null
} }
} }
override suspend fun loadLinks( override suspend fun loadLinks(
data: String, data: String,
isCasting: Boolean, isCasting: Boolean,
@ -164,7 +167,9 @@ class PelisplusHDProvider:MainAPI() {
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
): Boolean { ): Boolean {
app.get(data).document.select("div.player > script").map { script -> 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) loadExtractor(it, data, subtitleCallback, callback)
} }
} }

View file

@ -143,7 +143,6 @@ class PhimmoichillProvider : MainAPI() {
subtitleCallback: (SubtitleFile) -> Unit, subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit callback: (ExtractorLink) -> Unit
): Boolean { ): Boolean {
val document = app.get(data).document val document = app.get(data).document
val key = document.select("div#content script").mapNotNull { script -> val key = document.select("div#content script").mapNotNull { script ->
@ -151,11 +150,15 @@ class PhimmoichillProvider : MainAPI() {
val id = script.data().substringAfter("filmInfo.episodeID = parseInt('") val id = script.data().substringAfter("filmInfo.episodeID = parseInt('")
.substringBefore("');") .substringBefore("');")
app.post( app.post(
url = "$mainUrl/pmplayer.php", // Not mainUrl
url = "https://phimmoichills.net/pmplayer.php",
data = mapOf("qcao" to id), data = mapOf("qcao" to id),
referer = data, referer = data,
headers = mapOf("X-Requested-With" to "XMLHttpRequest") headers = mapOf(
).text.substringAfterLast("iniPlayers(\"").substringBefore("\",") "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 { } else {
null null
} }