Skip to content

Commit

Permalink
Small fixes, and unified Tomatomatela
Browse files Browse the repository at this point in the history
  • Loading branch information
Stormunblessed committed Feb 2, 2022
1 parent b43fcd8 commit 7ca56b7
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 87 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.mapper


class Cinestart: Tomatomatela() {
override val name: String = "Cinestart"
override val mainUrl: String = "https://cinestart.net"
override val details = "vr.php?v="
}

open class Tomatomatela : ExtractorApi() {
override val name = "Tomatomatela"
override val mainUrl = "https://tomatomatela.com"
Expand All @@ -15,8 +21,9 @@ open class Tomatomatela : ExtractorApi() {
@JsonProperty("status") val status: Int,
@JsonProperty("file") val file: String
)
open val details = "details.php?v="
override suspend fun getUrl(url: String, referer: String?): List<ExtractorLink>? {
val link = url.replace("https://tomatomatela.com/embed.html#","https://tomatomatela.com/details.php?v=")
val link = url.replace("$mainUrl/embed.html#","$mainUrl/$details")
val server = app.get(link, allowRedirects = false).text
val json = mapper.readValue<tomato>(server)
if (json.status == 200) return listOf(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
package com.lagradost.cloudstream3.movieproviders

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.module.kotlin.readValue
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.animeproviders.AllAnimeProvider
import com.lagradost.cloudstream3.extractors.Cinestart
import com.lagradost.cloudstream3.extractors.Evoload
import com.lagradost.cloudstream3.extractors.FEmbed
import com.lagradost.cloudstream3.extractors.StreamTape
import com.lagradost.cloudstream3.utils.*
import java.net.URLDecoder
import java.util.*

class CinecalidadProvider:MainAPI() {
Expand Down Expand Up @@ -143,14 +137,6 @@ class CinecalidadProvider:MainAPI() {
}
}


data class cinestart (
@JsonProperty("status") val status: Int,
@JsonProperty("file") val file: String
)



override suspend fun loadLinks(
data: String,
isCasting: Boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.lagradost.cloudstream3.movieproviders

import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.extractors.Evoload
import com.lagradost.cloudstream3.extractors.FEmbed
import com.lagradost.cloudstream3.extractors.StreamTape
import com.lagradost.cloudstream3.utils.*
import java.util.*

Expand Down Expand Up @@ -155,31 +152,33 @@ class EntrepeliculasyseriesProvider:MainAPI() {
app.get(data).document.select(".video ul.dropdown-menu li").apmap {
val servers = it.attr("data-link")
val doc = app.get(servers).document
val postkey = doc.selectFirst("input").attr("value")
val server = 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",
"Content-Length" to "90",
"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
).response.headers.values("location").apmap {
for (extractor in extractorApis) {
if (it.startsWith(extractor.mainUrl)) {
extractor.getSafeUrl(it, data)?.apmap {
callback(it)
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",
"Content-Length" to "90",
"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
).response.headers.values("location").apmap {
for (extractor in extractorApis) {
if (it.startsWith(extractor.mainUrl)) {
extractor.getSafeUrl(it, data)?.apmap {
callback(it)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package com.lagradost.cloudstream3.movieproviders

import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.utils.AppUtils.toJson
import org.jsoup.nodes.Document
import kotlin.collections.ArrayList

class PelisflixProvider:MainAPI() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@ package com.lagradost.cloudstream3.movieproviders

import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.utils.AppUtils.toJson
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import kotlin.collections.ArrayList

class SeriesflixProvider:MainAPI() {
override val mainUrl: String
get() = "https://seriesflix.video"
override val name: String
get() = "Seriesflix"
override val mainUrl = "https://seriesflix.video"
override val name = "Seriesflix"
override val lang = "es"
override val hasMainPage = true
override val hasChromecastSupport = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
StreamSB(),
Streamhub(),

Cinestart(),
Tomatomatela(),
Cinestart(),

Solidfiles(),
Solidfiles1(),
Expand Down

0 comments on commit 7ca56b7

Please sign in to comment.