mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
doodstream work for Wiflix
This commit is contained in:
parent
36bc455b71
commit
b61b1c1213
1 changed files with 41 additions and 37 deletions
|
@ -51,7 +51,7 @@ class WiflixProvider : MainAPI() {
|
|||
@JsonProperty("episodeNumber") val episodeNumber: String,
|
||||
)
|
||||
|
||||
private fun Elements.takeEpisode(url: String, DuborSub:String?): ArrayList<Episode> {
|
||||
private fun Elements.takeEpisode(url: String, DuborSub: String?): ArrayList<Episode> {
|
||||
|
||||
val episodes = ArrayList<Episode>()
|
||||
this.select("ul.eplist > li").forEach {
|
||||
|
@ -93,20 +93,21 @@ class WiflixProvider : MainAPI() {
|
|||
val posterUrl =
|
||||
document.select("img#posterimg").attr("src")
|
||||
val yearRegex = Regex("""ate de sortie\: (\d*)""")
|
||||
val year =yearRegex.find(document.text())?.groupValues?.get(1)
|
||||
val DuborSub:String?
|
||||
val year = yearRegex.find(document.text())?.groupValues?.get(1)
|
||||
val DuborSub: String?
|
||||
|
||||
|
||||
val tags = document.select("[itemprop=genre] > a").apmap {it.text()} // séléctione tous les tags et les ajoutes à une liste
|
||||
val tags = document.select("[itemprop=genre] > a")
|
||||
.apmap { it.text() } // séléctione tous les tags et les ajoutes à une liste
|
||||
|
||||
if (episodeFrfound.text().contains("Episode")) {
|
||||
mediaType = TvType.TvSeries
|
||||
DuborSub = "Episode en VF"
|
||||
episodes = episodeFrfound.takeEpisode(url,DuborSub)
|
||||
episodes = episodeFrfound.takeEpisode(url, DuborSub)
|
||||
} else if (episodeVostfrfound.text().contains("Episode")) {
|
||||
mediaType = TvType.TvSeries
|
||||
DuborSub = "Episode sous-titré"
|
||||
episodes = episodeVostfrfound.takeEpisode(url,DuborSub)
|
||||
episodes = episodeVostfrfound.takeEpisode(url, DuborSub)
|
||||
} else {
|
||||
|
||||
mediaType = TvType.Movie
|
||||
|
@ -121,9 +122,9 @@ class WiflixProvider : MainAPI() {
|
|||
val image = element.select("a >img")?.attr("src")
|
||||
val recUrl = element.select("a").attr("href")
|
||||
type_rec = TvType.TvSeries
|
||||
if(recUrl.contains("film")) type_rec = TvType.Movie
|
||||
if (recUrl.contains("film")) type_rec = TvType.Movie
|
||||
|
||||
if(type_rec == TvType.TvSeries){
|
||||
if (type_rec == TvType.TvSeries) {
|
||||
TvSeriesSearchResponse(
|
||||
recTitle,
|
||||
recUrl,
|
||||
|
@ -132,7 +133,7 @@ class WiflixProvider : MainAPI() {
|
|||
image?.let { fixUrl(it) },
|
||||
|
||||
)
|
||||
}else
|
||||
} else
|
||||
MovieSearchResponse(
|
||||
recTitle,
|
||||
recUrl,
|
||||
|
@ -161,7 +162,7 @@ class WiflixProvider : MainAPI() {
|
|||
this.plot = description
|
||||
this.recommendations = recommendations
|
||||
this.year = year?.toInt()
|
||||
this.comingSoon =comingSoon
|
||||
this.comingSoon = comingSoon
|
||||
this.tags = tags
|
||||
}
|
||||
} else {
|
||||
|
@ -176,7 +177,7 @@ class WiflixProvider : MainAPI() {
|
|||
this.plot = description
|
||||
this.recommendations = recommendations
|
||||
this.year = year?.toInt()
|
||||
this.comingSoon =comingSoon
|
||||
this.comingSoon = comingSoon
|
||||
this.tags = tags
|
||||
|
||||
}
|
||||
|
@ -224,6 +225,9 @@ class WiflixProvider : MainAPI() {
|
|||
document.select("$cssCodeForPlayer").apmap { player -> // séléctione tous les players
|
||||
var playerUrl = "https" + player.attr("href").replace("(.*)https".toRegex(), "")
|
||||
if (playerUrl != "" || playerUrl != null)
|
||||
if (playerUrl.contains("dood")) {
|
||||
playerUrl = playerUrl.replace("doodstream.com", "dood.wf")
|
||||
}
|
||||
loadExtractor(
|
||||
httpsify(playerUrl),
|
||||
playerUrl,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue