Requested changes done

This commit is contained in:
Eddy 2022-09-19 12:55:14 +02:00
parent a077116072
commit b4f8cf6261
4 changed files with 6 additions and 13 deletions

View file

@ -6,7 +6,6 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.extractorApis import com.lagradost.cloudstream3.utils.extractorApis
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
import com.lagradost.cloudstream3.network.CloudflareKiller
class FrenchStreamProvider : MainAPI() { class FrenchStreamProvider : MainAPI() {
@ -16,7 +15,6 @@ class FrenchStreamProvider : MainAPI() {
override val hasMainPage = true override val hasMainPage = true
override var lang = "fr" override var lang = "fr"
override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries) override val supportedTypes = setOf(TvType.Movie, TvType.TvSeries)
private val interceptor = CloudflareKiller()
override suspend fun search(query: String): List<SearchResponse> { override suspend fun search(query: String): List<SearchResponse> {
val link = "$mainUrl/?do=search&subaction=search&story=$query" // search' val link = "$mainUrl/?do=search&subaction=search&story=$query" // search'
val document = val document =
@ -218,7 +216,6 @@ class FrenchStreamProvider : MainAPI() {
"https" + it.second.split("https").get(1), "https" + it.second.split("https").get(1),
allowRedirects = false allowRedirects = false
).headers ).headers
println(header)
val urlplayer = it.second val urlplayer = it.second
var playerUrl = when (!urlplayer.isNullOrEmpty()) { var playerUrl = when (!urlplayer.isNullOrEmpty()) {
urlplayer.contains("opsktp.com") -> header.get("location") urlplayer.contains("opsktp.com") -> header.get("location")
@ -304,4 +301,3 @@ class FrenchStreamProvider : MainAPI() {
} }
} }

View file

@ -122,9 +122,7 @@ class NekosamaProvider : MainAPI() {
listOf( listOf(
"$mainUrl/animes-search-vf.json" to "(VF) ", "$mainUrl/animes-search-vf.json" to "(VF) ",
"$mainUrl/animes-search-vostfr.json" to "(Vostfr) " "$mainUrl/animes-search-vostfr.json" to "(Vostfr) "
).apmap { it -> ).apmap {(url, version) ->
val url = it.first
val version = it.second
val dubStatus = when (!version.isNullOrBlank()) { val dubStatus = when (!version.isNullOrBlank()) {
version.contains("VF") -> DubStatus.Dubbed version.contains("VF") -> DubStatus.Dubbed
version.contains("Vostfr") -> DubStatus.Subbed version.contains("Vostfr") -> DubStatus.Subbed

View file

@ -28,7 +28,7 @@ class VostfreeProvider : MainAPI() {
**/ **/
override suspend fun search(query: String): List<SearchResponse> { override suspend fun search(query: String): List<SearchResponse> {
val link = val link =
fixUrl("/index.php?do=search&subaction=search&story=$query&submit=Submit+Query") // L'url pour chercher un anime de dragon sera donc: 'https://vostfree.cx/index.php?story=dragon&do=search&subaction=search' "$mainUrl/index.php?do=search&subaction=search&story=$query&submit=Submit+Query" // L'url pour chercher un anime de dragon sera donc: 'https://vostfree.cx/index.php?story=dragon&do=search&subaction=search'
var mediaType = TvType.Anime var mediaType = TvType.Anime
val document = val document =
app.post(link).document // app.get() permet de télécharger la page html avec une requete HTTP (get) app.post(link).document // app.get() permet de télécharger la page html avec une requete HTTP (get)
@ -114,8 +114,7 @@ class VostfreeProvider : MainAPI() {
urlSaison.add(it.attr("href")) urlSaison.add(it.attr("href"))
} }
urlSaison.apmap {it -> urlSaison.apmap {urlseason->
val urlseason = it
val document = val document =
app.get(urlseason).document // récupere le texte sur la page (requète http) app.get(urlseason).document // récupere le texte sur la page (requète http)

View file

@ -203,9 +203,9 @@ class WiflixProvider : MainAPI() {
document.select("div.blocvostfr") document.select("div.blocvostfr")
val cssCodeForPlayer = if (episodeFrfound.text().contains("Episode")) { val cssCodeForPlayer = if (episodeFrfound.text().contains("Episode")) {
"div.ep$numeroEpisode" + "vf > a" "div.ep${numeroEpisode}vf > a"
} else if (episodeVostfrfound.text().contains("Episode")) { } else if (episodeVostfrfound.text().contains("Episode")) {
"div.ep$numeroEpisode" + "vs > a" "div.ep${numeroEpisode}vs > a"
} else { } else {
"div.linkstab > a" "div.linkstab > a"
} }