Moved italian providers

This commit is contained in:
Blatzar 2022-08-15 20:16:15 +02:00
parent c2aa8e6008
commit 856331f8bf
33 changed files with 0 additions and 2227 deletions

View file

@ -1,24 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
// All of these properties are optional, you can safely remove them
// description = "Lorem Ipsum"
// authors = listOf("Cloudburst")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=altadefinizione.tienda&sz=24"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,160 +0,0 @@
package com.lagradost
//import androidx.core.text.parseAsHtml
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor
import com.lagradost.cloudstream3.utils.AppUtils.html
class AltadefinizioneProvider : MainAPI() {
override var lang = "it"
override var mainUrl = "https://altadefinizione.tienda"
override var name = "Altadefinizione"
override val hasMainPage = true
override val hasChromecastSupport = true
override val supportedTypes = setOf(
TvType.Movie
)
override val mainPage = mainPageOf(
Pair("$mainUrl/cerca/anno/2022/page/", "Ultimi Film"),
Pair("$mainUrl/cerca/openload-quality/HD/page/", "Film in HD"),
Pair("$mainUrl/cinema/page/", "Ora al cinema")
)
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
val url = request.data + page
val soup = app.get(url).document
val home = soup.select("div.box").map {
val title = it.selectFirst("img")!!.attr("alt")
val link = it.selectFirst("a")!!.attr("href")
val image = mainUrl + it.selectFirst("img")!!.attr("src")
val quality = getQualityFromString(it.selectFirst("span")!!.text())
MovieSearchResponse(
title,
link,
this.name,
TvType.Movie,
image,
null,
null,
quality,
)
}
return newHomePageResponse(request.name, home)
}
override suspend fun search(query: String): List<SearchResponse> {
val doc = app.post(
"$mainUrl/index.php", data = mapOf(
"do" to "search",
"subaction" to "search",
"story" to query,
"sortby" to "news_read"
)
).document
return doc.select("div.box").map {
val title = it.selectFirst("img")!!.attr("alt")
val link = it.selectFirst("a")!!.attr("href")
val image = mainUrl + it.selectFirst("img")!!.attr("src")
val quality = getQualityFromString(it.selectFirst("span")!!.text())
MovieSearchResponse(
title,
link,
this.name,
TvType.Movie,
image,
null,
null,
quality,
)
}
}
override suspend fun load(url: String): LoadResponse {
val page = app.get(url)
val document = page.document
val title = document.selectFirst(" h1 > a")!!.text().replace("streaming", "")
val description = document.select("#sfull").toString().substringAfter("altadefinizione")
.substringBeforeLast("fonte trama").html().toString()
val rating = null
val year = document.selectFirst("#details > li:nth-child(2)")!!.childNode(2).toString()
.filter { it.isDigit() }.toInt()
val poster = fixUrl(document.selectFirst("div.thumbphoto > img")!!.attr("src"))
val recomm = document.select("ul.related-list > li").map {
val href = it.selectFirst("a")!!.attr("href")
val posterUrl = mainUrl + it.selectFirst("img")!!.attr("src")
val name = it.selectFirst("img")!!.attr("alt")
MovieSearchResponse(
name,
href,
this.name,
TvType.Movie,
posterUrl,
null
)
}
val actors: List<ActorData> =
document.select("#staring > a").map {
ActorData(actor = Actor(it.text()))
}
val tags: List<String> = document.select("#details > li:nth-child(1) > a").map { it.text() }
val trailerurl = document.selectFirst("#showtrailer > div > div > iframe")?.attr("src")
return newMovieLoadResponse(
title,
url,
TvType.Movie,
url
) {
posterUrl = fixUrlNull(poster)
this.year = year
this.plot = description
this.rating = rating
this.recommendations = recomm
this.duration = null
this.actors = actors
this.tags = tags
addTrailer(trailerurl)
}
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val doc = app.get(data).document
if (doc.select("div.guardahd-player").isNullOrEmpty()) {
val videoUrl =
doc.select("input").last { it.hasAttr("data-mirror") }.attr("value")
loadExtractor(videoUrl, data, subtitleCallback, callback)
doc.select("#mirrors > li > a").forEach {
loadExtractor(fixUrl(it.attr("data-target")), data, subtitleCallback, callback)
}
} else {
val pagelinks = doc.select("div.guardahd-player").select("iframe").attr("src")
val docLinks = app.get(pagelinks).document
docLinks.select("body > div > ul > li").forEach {
loadExtractor(fixUrl(it.attr("data-link")), data, subtitleCallback, callback)
}
}
return true
}
}

View file

@ -1,14 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class AltadefinizioneProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(AltadefinizioneProvider())
}
}

View file

@ -1,27 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
// All of these properties are optional, you can safely remove them
// description = "Lorem Ipsum"
// authors = listOf("Cloudburst")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"AnimeMovie",
"Anime",
"OVA"
)
iconUrl = "https://www.google.com/s2/favicons?domain=aniplay.it&sz=24"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,215 +0,0 @@
package com.lagradost
import com.fasterxml.jackson.annotation.JsonProperty
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addDuration
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.Qualities
class AniPlayProvider : MainAPI() {
override var mainUrl = "https://aniplay.it"
override var name = "AniPlay"
override var lang = "it"
override val hasMainPage = true
private val dubIdentifier = " (ITA)"
override val supportedTypes = setOf(
TvType.Anime,
TvType.AnimeMovie,
TvType.OVA
)
companion object {
fun getStatus(t: String?): ShowStatus? {
return when (t?.lowercase()) {
"completato" -> ShowStatus.Completed
"in corso" -> ShowStatus.Ongoing
else -> null // "annunciato"
}
}
fun getType(t: String?): TvType {
return when (t?.lowercase()) {
"ona" -> TvType.OVA
"movie" -> TvType.AnimeMovie
else -> TvType.Anime //"serie", "special"
}
}
}
private fun isDub(title: String): Boolean{
return title.contains(dubIdentifier)
}
data class ApiPoster(
@JsonProperty("imageFull") val posterUrl: String
)
data class ApiMainPageAnime(
@JsonProperty("animeId") val id: Int,
@JsonProperty("episodeNumber") val episode: String?,
@JsonProperty("animeTitle") val title: String,
@JsonProperty("animeType") val type: String,
@JsonProperty("fullHd") val fullHD: Boolean,
@JsonProperty("animeVerticalImages") val posters: List<ApiPoster>
)
data class ApiSearchResult(
@JsonProperty("id") val id: Int,
@JsonProperty("title") val title: String,
@JsonProperty("status") val status: String,
@JsonProperty("type") val type: String,
@JsonProperty("verticalImages") val posters: List<ApiPoster>
)
data class ApiGenres(
@JsonProperty("description") val name: String
)
data class ApiWebsite(
@JsonProperty("listWebsiteId") val websiteId: Int,
@JsonProperty("url") val url: String
)
data class ApiEpisode(
@JsonProperty("id") val id: Int,
@JsonProperty("title") val title: String?,
@JsonProperty("episodeNumber") val number: String,
)
private fun ApiEpisode.toEpisode() : Episode? {
val number = this.number.toIntOrNull() ?: return null
return Episode(
data = "$mainUrl/api/episode/${this.id}",
episode = number,
name = this.title
)
}
data class ApiSeason(
@JsonProperty("id") val id: Int,
@JsonProperty("name") val name: String
)
private suspend fun ApiSeason.toEpisodeList(url: String) : List<Episode> {
return app.get("$url/season/${this.id}").parsed<List<ApiEpisode>>().mapNotNull { it.toEpisode() }
}
data class ApiAnime(
@JsonProperty("title") val title: String,
@JsonProperty("alternativeTitle") val japTitle: String?,
@JsonProperty("episodeDuration") val duration: Int,
@JsonProperty("storyline") val plot: String,
@JsonProperty("type") val type: String,
@JsonProperty("status") val status: String,
@JsonProperty("genres") val genres: List<ApiGenres>,
@JsonProperty("verticalImages") val posters: List<ApiPoster>,
@JsonProperty("listWebsites") val websites: List<ApiWebsite>,
@JsonProperty("episodes") val episodes: List<ApiEpisode>,
@JsonProperty("seasons") val seasons: List<ApiSeason>?
)
data class ApiEpisodeUrl(
@JsonProperty("videoUrl") val url: String
)
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
val response = app.get("$mainUrl/api/home/latest-episodes?page=0").parsed<List<ApiMainPageAnime>>()
val results = response.map{
val isDub = isDub(it.title)
newAnimeSearchResponse(
name = if (isDub) it.title.replace(dubIdentifier, "") else it.title,
url = "$mainUrl/api/anime/${it.id}",
type = getType(it.type),
){
addDubStatus(isDub, it.episode?.toIntOrNull())
this.posterUrl = it.posters.first().posterUrl
this.quality = if (it.fullHD) SearchQuality.HD else null
}
}
return HomePageResponse(listOf(HomePageList("Ultime uscite",results)))
}
override suspend fun search(query: String): List<SearchResponse> {
val response = app.get("$mainUrl/api/anime/advanced-search?page=0&size=36&query=$query").parsed<List<ApiSearchResult>>()
return response.map {
val isDub = isDub(it.title)
newAnimeSearchResponse(
name = if (isDub) it.title.replace(dubIdentifier, "") else it.title,
url = "$mainUrl/api/anime/${it.id}",
type = getType(it.type),
){
addDubStatus(isDub)
this.posterUrl = it.posters.first().posterUrl
}
}
}
override suspend fun load(url: String): LoadResponse {
val response = app.get(url).parsed<ApiAnime>()
val tags: List<String> = response.genres.map { it.name }
val malId: Int? = response.websites.find { it.websiteId == 1 }?.url?.removePrefix("https://myanimelist.net/anime/")?.split("/")?.first()?.toIntOrNull()
val aniListId: Int? = response.websites.find { it.websiteId == 4 }?.url?.removePrefix("https://anilist.co/anime/")?.split("/")?.first()?.toIntOrNull()
val episodes = if (response.seasons.isNullOrEmpty()) response.episodes.mapNotNull { it.toEpisode() } else response.seasons.map{ it.toEpisodeList(url) }.flatten()
val isDub = isDub(response.title)
return newAnimeLoadResponse(response.title, url, getType(response.type)) {
this.name = if (isDub) response.title.replace(dubIdentifier, "") else response.title
this.japName = response.japTitle
this.plot = response.plot
this.tags = tags
this.showStatus = getStatus(response.status)
addPoster(response.posters.first().posterUrl)
addEpisodes(if (isDub) DubStatus.Dubbed else DubStatus.Subbed, episodes)
addMalId(malId)
addAniListId(aniListId)
addDuration(response.duration.toString())
}
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val episode = app.get(data).parsed<ApiEpisodeUrl>()
if(episode.url.contains(".m3u8")){
val m3u8Helper = M3u8Helper()
val streams = m3u8Helper.m3u8Generation(M3u8Helper.M3u8Stream(episode.url,Qualities.Unknown.value), false)
streams.forEach {
callback.invoke(
ExtractorLink(
name,
name,
it.streamUrl,
referer = mainUrl,
quality = it.quality ?: Qualities.Unknown.value,
isM3u8 = it.streamUrl.contains(".m3u8"))) }
return true
}
callback.invoke(
ExtractorLink(
name,
name,
episode.url,
referer = mainUrl,
quality = Qualities.Unknown.value,
isM3u8 = false,
)
)
return true
}
}

View file

@ -1,14 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class AniPlayProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(AniPlayProvider())
}
}

View file

@ -1,25 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
// All of these properties are optional, you can safely remove them
// description = "Lorem Ipsum"
// authors = listOf("Cloudburst")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"Anime",
"AnimeMovie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=www.animesaturn.cc&sz=24"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,201 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
import com.lagradost.cloudstream3.LoadResponse.Companion.addDuration
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
import com.lagradost.cloudstream3.LoadResponse.Companion.addRating
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities
import org.jsoup.nodes.Element
class AnimeSaturnProvider : MainAPI() {
override var mainUrl = "https://www.animesaturn.cc"
override var name = "AnimeSaturn"
override var lang = "it"
override val hasMainPage = true
override val supportedTypes = setOf(
TvType.Anime,
TvType.AnimeMovie,
TvType.OVA
)
companion object {
fun getStatus(t: String?): ShowStatus? {
return when (t?.lowercase()) {
"finito" -> ShowStatus.Completed
"in corso" -> ShowStatus.Ongoing
else -> null
}
}
}
private fun Element.toSearchResult(): AnimeSearchResponse {
var title = this.select("a.badge-archivio").first()!!.text()
var isDubbed = false
if (title.contains(" (ITA)")){
title = title.replace(" (ITA)", "")
isDubbed = true
}
val url = this.select("a.badge-archivio").first()!!.attr("href")
val posterUrl = this.select("img.locandina-archivio[src]").first()!!.attr("src")
return newAnimeSearchResponse(title, url, TvType.Anime) {
addDubStatus(isDubbed)
this.posterUrl = posterUrl
}
}
private fun Element.toEpisode(): Episode? {
var episode = this.text().split(" ")[1]
if(episode.contains(".")) return null
if(episode.contains("-"))
episode = episode.split("-")[0]
return Episode(
data = this.attr("href"),
episode = episode.toInt()
)
}
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
val document = app.get(mainUrl).document
val list = ArrayList<HomePageList>()
document.select("div.container:has(span.badge-saturn)").forEach {
val tabName = it.select("span.badge-saturn").first()!!.text()
if (tabName.equals("Ultimi episodi")) return@forEach
val results = ArrayList<AnimeSearchResponse>()
it.select(".main-anime-card").forEach { card ->
var title = card.select("a[title]").first()!!.attr("title")
var isDubbed = false
if(title.contains(" (ITA)")){
title = title.replace(" (ITA)", "")
isDubbed = true
}
val posterUrl = card.select("img.new-anime").first()!!.attr("src")
val url = card.select("a").first()!!.attr("href")
results.add(newAnimeSearchResponse(title, url, TvType.Anime){
addDubStatus(isDubbed)
this.posterUrl = posterUrl
})
}
list.add(HomePageList(tabName, results))
}
return HomePageResponse(list)
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.get("$mainUrl/animelist?search=$query").document
return document.select("div.item-archivio").map {
it.toSearchResult()
}
}
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
val title = document.select("img.cover-anime").first()!!.attr("alt")
val japTitle = document.select("div.box-trasparente-alternativo").first()!!.text()
val posterUrl = document.select("img.cover-anime[src]").first()!!.attr("src")
var malId : Int? = null
var aniListId : Int? = null
document.select("[rel=\"noopener noreferrer\"]").forEach {
if(it.attr("href").contains("myanimelist"))
malId = it.attr("href").removeSuffix("/").split('/').last().toIntOrNull()
else
aniListId = it.attr("href").removeSuffix("/").split('/').last().toIntOrNull()
}
val plot = document.select("div#shown-trama").first()?.text()
val tags = document.select("a.generi-as").map { it.text() }
val details : List<String>? = document.select("div.container:contains(Stato: )").first()?.text()?.split(" ")
var status : String? = null
var duration : String? = null
var year : String? = null
var score : String? = null
val isDubbed = document.select("div.anime-title-as").first()!!.text().contains("(ITA)")
if (!details.isNullOrEmpty()) {
details.forEach {
val index = details.indexOf(it) +1
when (it) {
"Stato:" -> status = details[index]
"episodi:" -> duration = details[index]
"uscita:" -> year = details[index + 2]
"Voto:" -> score = details[index].split("/")[0]
else -> return@forEach
}
}
}
val episodes = document.select("a.bottone-ep").mapNotNull{ it.toEpisode() }
return newAnimeLoadResponse(title, url, TvType.Anime) {
this.engName = title
this.japName = japTitle
this.year = year?.toIntOrNull()
this.plot = plot
this.tags = tags
this.showStatus = getStatus(status)
addPoster(posterUrl)
addRating(score)
addEpisodes(if (isDubbed) DubStatus.Dubbed else DubStatus.Subbed, episodes)
addMalId(malId)
addAniListId(aniListId)
addDuration(duration)
}
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val page = app.get(data).document
val episodeLink = page.select("div.card-body > a[href]").find {it1 ->
it1.attr("href").contains("watch?")
}?.attr("href")
val episodePage = app.get(episodeLink!!).document
val episodeUrl: String?
var isM3U8 = false
if(episodePage.select("video.afterglow > source").isNotEmpty()) //Old player
episodeUrl = episodePage.select("video.afterglow > source").first()!!.attr("src")
else{ //New player
val script = episodePage.select("script").find {
it.toString().contains("jwplayer('player_hls').setup({")
}!!.toString()
episodeUrl = script.split(" ").find { it.contains(".m3u8") and !it.contains(".replace") }!!.replace("\"","").replace(",", "")
isM3U8 = true
}
callback.invoke(
ExtractorLink(
name,
name,
episodeUrl!!,
isM3u8 = isM3U8,
referer = "https://www.animesaturn.io/", //Some servers need the old host as referer, and the new ones accept it too
quality = Qualities.Unknown.value
)
)
return true
}
}

View file

@ -1,14 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class AnimeSaturnProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(AnimeSaturnProvider())
}
}

View file

@ -1,26 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
// All of these properties are optional, you can safely remove them
// description = "Lorem Ipsum"
// authors = listOf("Cloudburst")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"AnimeMovie",
"Anime",
"OVA",
)
iconUrl = "https://www.google.com/s2/favicons?domain=www.animeworld.tv&sz=24"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

File diff suppressed because one or more lines are too long

View file

@ -1,14 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class AnimeWorldProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(AnimeWorldProvider())
}
}

View file

@ -1,25 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
// All of these properties are optional, you can safely remove them
// description = "Lorem Ipsum"
// authors = listOf("Cloudburst")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"TvSeries",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=filmpertutti.photo&sz=24"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,193 +0,0 @@
package com.lagradost
//import androidx.core.text.parseAsHtml
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addRating
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.AppUtils.toJson
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.ShortLink
import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.nodes.Element
import com.lagradost.cloudstream3.utils.AppUtils.html
class FilmpertuttiProvider : MainAPI() {
override var lang = "it"
override var mainUrl = "https://filmpertutti.photo"
override var name = "Filmpertutti"
override val hasMainPage = true
override val hasChromecastSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries
)
override val mainPage = mainPageOf(
Pair("$mainUrl/category/film/page/", "Film Popolari"),
Pair("$mainUrl/category/serie-tv/page/", "Serie Tv Popolari"),
Pair("$mainUrl/prime-visioni/", "Ultime uscite"),
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val url = request.data + page
val soup = app.get(url).document
val home = soup.select("ul.posts > li").map {
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
.substringBeforeLast("[")
val link = it.selectFirst("a")!!.attr("href")
val image = it.selectFirst("a")!!.attr("data-thumbnail")
val qualitydata = it.selectFirst("div.hd")
val quality = if (qualitydata != null) {
getQualityFromString(qualitydata.text())
} else {
null
}
newTvSeriesSearchResponse(
title,
link
) {
this.posterUrl = image
this.quality = quality
}
}
return newHomePageResponse(request.name, home)
}
override suspend fun search(query: String): List<SearchResponse> {
val queryformatted = query.replace(" ", "+")
val url = "$mainUrl/?s=$queryformatted"
val doc = app.get(url).document
return doc.select("ul.posts > li").map {
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
.substringBeforeLast("[")
val link = it.selectFirst("a")!!.attr("href")
val image = it.selectFirst("a")!!.attr("data-thumbnail")
val quality = getQualityFromString(it.selectFirst("div.hd")?.text())
MovieSearchResponse(
title,
link,
this.name,
quality = quality,
posterUrl = image
)
}
}
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
val type =
if (document.selectFirst("a.taxonomy.category")!!.attr("href").contains("serie-tv")
.not()
) TvType.Movie else TvType.TvSeries
val title = document.selectFirst("#content > h1")!!.text().substringBeforeLast("(")
.substringBeforeLast("[")
val description =
document.selectFirst("i.fa.fa-file-text-o.fa-fw")?.parent()?.nextSibling()?.toString()
?.html().toString()
val rating = document.selectFirst("div.rating > div.value")?.text()
val year =
document.selectFirst("#content > h1")?.text()?.substringAfterLast("(")
?.filter { it.isDigit() }?.toIntOrNull()
?: description.substringAfter("trasmessa nel").take(6).filter { it.isDigit() }
.toIntOrNull() ?: (document.selectFirst("i.fa.fa-calendar.fa-fw")?.parent()
?.nextSibling() as Element?)?.text()?.substringAfterLast(" ")
?.filter { it.isDigit() }?.toIntOrNull()
val poster = document.selectFirst("div.meta > div > img")?.attr("data-src")
val trailerurl =
document.selectFirst("div.youtube-player")?.attr("data-id")?.let { urldata ->
"https://www.youtube.com/watch?v=$urldata"
}
if (type == TvType.TvSeries) {
val episodeList = ArrayList<Episode>()
document.select("div.accordion-item").filter { a ->
a.selectFirst("#season > ul > li.s_title > span")!!.text().isNotEmpty()
}.map { element ->
val season =
element.selectFirst("#season > ul > li.s_title > span")!!.text().toInt()
element.select("div.episode-wrap").map { episode ->
val href =
episode.select("#links > div > div > table > tbody:nth-child(2) > tr")
.map { it.selectFirst("a")!!.attr("href") }.toJson()
val epNum = episode.selectFirst("li.season-no")!!.text().substringAfter("x")
.filter { it.isDigit() }.toIntOrNull()
val epTitle = episode.selectFirst("li.other_link > a")?.text()
val posterUrl = episode.selectFirst("figure > img")?.attr("data-src")
episodeList.add(
Episode(
href,
epTitle,
season,
epNum,
posterUrl,
)
)
}
}
return newTvSeriesLoadResponse(
title,
url, type, episodeList
) {
this.posterUrl = poster
this.year = year
this.plot = description
addRating(rating)
addTrailer(trailerurl)
}
} else {
val urls0 = document.select("div.embed-player")
val urls = if (urls0.isNotEmpty()) {
urls0.map { it.attr("data-id") }.toJson()
} else {
document.select("#info > ul > li ").mapNotNull { it.selectFirst("a")?.attr("href") }
.toJson()
}
return newMovieLoadResponse(
title,
url,
type,
urls
) {
posterUrl = fixUrlNull(poster)
this.year = year
this.plot = description
addRating(rating)
addTrailer(trailerurl)
}
}
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
tryParseJson<List<String>>(data)?.apmap { id ->
val link = ShortLink.unshorten(id).trim().replace("/v/", "/e/").replace("/f/", "/e/")
loadExtractor(link, data, subtitleCallback, callback)
}
return true
}
}

View file

@ -1,14 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class FilmpertuttiProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(FilmpertuttiProvider())
}
}

View file

@ -1,26 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
// All of these properties are optional, you can safely remove them
// description = "Lorem Ipsum"
// authors = listOf("Cloudburst")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"TvSeries}",
"TvSeries",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=ilgeniodellostreaming.quest&sz=24"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,181 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.LoadResponse.Companion.addRating
import com.lagradost.cloudstream3.utils.AppUtils.toJson
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.ShortLink
import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.Jsoup
class IlGenioDelloStreamingProvider : MainAPI() {
override var lang = "it"
override var mainUrl = "https://ilgeniodellostreaming.quest"
override var name = "IlGenioDelloStreaming"
override val hasMainPage = true
override val hasChromecastSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
)
override val mainPage = mainPageOf(
Pair("$mainUrl/category/film/page/", "Film Popolari"),
Pair("$mainUrl/category/serie-tv/page/", "Serie Tv Popolari"),
Pair("$mainUrl/the-most-voted/page/", "I più votati"),
Pair("$mainUrl/prime-visioni/page/", "Ultime uscite"),
)
override suspend fun getMainPage(
page: Int,
request: MainPageRequest
): HomePageResponse {
val url = request.data + page
val soup = app.get(url).document
val home = soup.select("div.items > article.item").map {
val title = it.selectFirst("div.data > h3 > a")!!.text().substringBeforeLast("(").substringBeforeLast("[")
val link = it.selectFirst("div.poster > a")!!.attr("href")
val quality = getQualityFromString(it.selectFirst("span.quality")?.text())
TvSeriesSearchResponse(
title,
link,
this.name,
TvType.Movie,
it.selectFirst("img")!!.attr("data-src-img"),
null,
null,
quality = quality
)
}
return newHomePageResponse(request.name, home)
}
override suspend fun search(query: String): List<SearchResponse> {
val queryformatted = query.replace(" ", "+")
val url = "$mainUrl?s=$queryformatted"
val doc = app.get(url,referer= mainUrl ).document
return doc.select("div.result-item").map {
val href = it.selectFirst("div.image > div > a")!!.attr("href")
val poster = it.selectFirst("div.image > div > a > img")!!.attr("data-src-img")
val name = it.selectFirst("div.details > div.title > a")!!.text().substringBeforeLast("(").substringBeforeLast("[")
MovieSearchResponse(
name,
href,
this.name,
TvType.Movie,
poster
)
}
}
override suspend fun load(url: String): LoadResponse {
val page = app.get(url)
val document = page.document
val type = if (document.selectFirst("div.sgeneros")?.text() == "Serie TV"){TvType.TvSeries} else{TvType.Movie}
val title = document.selectFirst("div.data > h1")!!.text().substringBefore("(").substringBefore("[")
val description = document.selectFirst("div#info")?.selectFirst("p")?.html()
val rating = document.select("span.valor").last()?.text()?.split(" ")?.get(0)
var year = document.selectFirst(" div.data > div.extra > span.date")!!.text().substringAfter(",")
.filter { it.isDigit() }
if (year.length > 4) {
year = year.dropLast(4)
}
val poster = document.selectFirst("div.poster > img")!!.attr("data-src-img")
val recomm = document.select("article.w_item_b").map {
val href = it.selectFirst("a")!!.attr("href")
val posterUrl = it.selectFirst("img")!!.attr("data-src-img")
val name = it.selectFirst("div.data > h3")!!.text().substringBeforeLast("(").substringBeforeLast("[")
MovieSearchResponse(
name,
href,
this.name,
TvType.Movie,
posterUrl
)
}
if (type == TvType.TvSeries) {
val episodeList = ArrayList<Episode>()
val seasons = document.selectFirst("div#info")?.select("p")?.map {it.children() }
?.filter { it.size > 1 && it.first()!!.hasAttr("href") }
?.map{(it.toString().split("<br>"))
.map{Jsoup.parse(it).select("a")
?.map { it?.attr("href") }}}
seasons?.mapIndexed { season, element ->
element.mapIndexed { index, list ->
val urls = list?.toJson()?:url
episodeList.add(
Episode(
data = urls,
episode = index + 1,
season = season + 1
)
)
}
}
val seasonnames = document.selectFirst("div#info")?.select("p")?.map {it.children() }
?.filter { it.size<3 && it.isNotEmpty()}?.map{it.text()}
return newTvSeriesLoadResponse(
title,
url,
type,
episodeList
){
addRating(rating)
this.plot = description
this.year = year.toIntOrNull()
this.posterUrl = poster
this.recommendations = recomm
this.seasonNames = seasonnames!!.mapIndexed { index, s -> SeasonData(index, s) }
}
} else {
val actors: List<ActorData> =
document.select("div.cast_wraper > ul > li").map { actorData ->
val actorName = actorData.children()[1].text()
val actorImage : String? = actorData.selectFirst("img")?.attr("data-src")
val roleActor = actorData.children()[2].text()
ActorData(actor = Actor(actorName, image = actorImage), roleString = roleActor )
}
return newMovieLoadResponse(
title,
url,
type,
(document.select("div.embed-player") + document.select("a.link_a")).map { (it.attr("href") + it.attr("data-id")).trim() }.distinct().toJson(),
) {
posterUrl = fixUrlNull(poster)
this.year = year.toIntOrNull()
this.plot = description
addRating(rating)
this.recommendations = recomm
this.duration = null
this.actors = actors
}
}
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val links = tryParseJson<List<String>>(data)
links?.map { link ->
val url = ShortLink.unshorten(link).replace("/v/", "/e/").replace("/f/", "/e/")
loadExtractor(url, data, subtitleCallback, callback)
}
return true
}
}

View file

@ -1,14 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class IlGenioDelloStreamingProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(IlGenioDelloStreamingProvider())
}
}

View file

@ -1,25 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
// All of these properties are optional, you can safely remove them
// description = "Lorem Ipsum"
// authors = listOf("Cloudburst")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"TvSeries",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=streamingcommunity.best&sz=24"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,438 +0,0 @@
package com.lagradost
import android.text.Html
import com.fasterxml.jackson.annotation.*
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.*
import org.json.JSONObject
import java.net.URI
import java.security.MessageDigest
data class Moviedata(
@JsonProperty("id") val id: Long,
@JsonProperty("name") val name: String,
@JsonProperty("type") val type: String,
@JsonProperty("release_date") val releaseDate: String,
@JsonProperty("seasons_count") val seasonsCount: Long? = null,
@JsonProperty("genres") val genres: List<Genre>,
@JsonProperty("votes") val votes: List<Vote>,
@JsonProperty("runtime") val runtime: Long? = null
)
data class Genre(
@JsonProperty("name") val name: String,
@JsonProperty("pivot") val pivot: Pivot,
)
data class Pivot(
@JsonProperty("titleID") val titleID: Long,
@JsonProperty("genreID") val genreID: Long,
)
data class Vote(
@JsonProperty("title_id") val title_id: Long,
@JsonProperty("average") val average: String,
@JsonProperty("count") val count: Long,
@JsonProperty("type") val type: String,
)
data class VideoElement(
@JsonProperty("id") val id: Long,
@JsonProperty("slug") val slug: String,
@JsonProperty("images") val images: List<Image>,
)
data class Image(
@JsonProperty("imageable_id") val imageableID: Long,
@JsonProperty("imageable_type") val imageableType: String,
@JsonProperty("server_id") val serverID: Long,
@JsonProperty("proxy_id") val proxyID: Long,
@JsonProperty("url") val url: String,
@JsonProperty("type") val type: String,
// @JsonProperty("sc_url") val scURL: String,
// @JsonProperty("proxy") val proxy: Proxy,
// @JsonProperty("server") val server: Proxy
)
// Proxy is not used and crashes otherwise
//data class Proxy(
// @JsonProperty("id") val id: Long,
// @JsonProperty("type") val type: String,
// @JsonProperty("ip") val ip: String,
// @JsonProperty("number") val number: Long,
// @JsonProperty("storage") val storage: Long,
// @JsonProperty("max_storage") val maxStorage: Long,
// @JsonProperty("max_conversions") val maxConversions: Any? = null,
// @JsonProperty("max_publications") val maxPublications: Any? = null,
// @JsonProperty("created_at") val createdAt: String,
// @JsonProperty("updated_at") val updatedAt: String,
// @JsonProperty("upload_bandwidth") val uploadBandwidth: Any? = null,
// @JsonProperty("upload_bandwidth_limit") val uploadBandwidthLimit: Any? = null
//)
data class Season(
@JsonProperty("id") val id: Long,
@JsonProperty("name") val name: String? = "",
@JsonProperty("plot") val plot: String? = "",
@JsonProperty("date") val date: String? = "",
@JsonProperty("number") val number: Long,
@JsonProperty("title_id") val title_id: Long,
@JsonProperty("createdAt") val createdAt: String? = "",
@JsonProperty("updated_at") val updatedAt: String? = "",
@JsonProperty("episodes") val episodes: List<Episodejson>
)
data class Episodejson(
@JsonProperty("id") val id: Long,
@JsonProperty("number") val number: Long,
@JsonProperty("name") val name: String? = "",
@JsonProperty("plot") val plot: String? = "",
@JsonProperty("season_id") val seasonID: Long,
@JsonProperty("images") val images: List<ImageSeason>
)
data class ImageSeason(
@JsonProperty("imageable_id") val imageableID: Long,
@JsonProperty("imageable_type") val imageableType: String,
@JsonProperty("server_id") val serverID: Long,
@JsonProperty("proxy_id") val proxyID: Long,
@JsonProperty("url") val url: String,
@JsonProperty("type") val type: String,
@JsonProperty("original_url") val originalURL: String
)
data class TrailerElement(
@JsonProperty("id") val id: Long? = null,
@JsonProperty("url") val url: String? = null,
@JsonProperty("host") val host: String? = null,
@JsonProperty("videoable_id") val videoableID: Long? = null,
@JsonProperty("videoable_type") val videoableType: String? = null,
@JsonProperty("created_at") val createdAt: String? = null,
@JsonProperty("updated_at") val updatedAt: String? = null,
@JsonProperty("size") val size: String? = null,
@JsonProperty("created_by") val createdBy: String? = null,
@JsonProperty("server_id") val serverID: Long? = null,
@JsonProperty("name") val name: String? = null,
@JsonProperty("quality") val quality: String? = null,
@JsonProperty("original_name") val originalName: Any? = null,
@JsonProperty("views") val views: Long? = null,
@JsonProperty("public") val public: Long? = null,
@JsonProperty("proxy_id") val proxyID: Any? = null,
@JsonProperty("proxy_default_id") val proxyDefaultID: Any? = null,
@JsonProperty("scws_id") val scwsID: Any? = null
)
class StreamingcommunityProvider : MainAPI() {
override var lang = "it"
override var mainUrl = "https://streamingcommunity.best"
override var name = "Streamingcommunity"
override val hasMainPage = true
override val hasChromecastSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
)
private fun translatenumber(num: Int): Int? {
return when (num) {
67 -> 1
71 -> 2
72 -> 3
73 -> 4
74 -> 5
75 -> 6
76 -> 7
77 -> 8
78 -> 9
79 -> 10
133 -> 11
else -> null
}
}
private fun translateip(num: Int): String? {
return when (num) {
16 -> "sc-b1-01.scws-content.net"
17 -> "sc-b1-02.scws-content.net"
18 -> "sc-b1-03.scws-content.net"
85 -> "sc-b1-04.scws-content.net"
95 -> "sc-b1-05.scws-content.net"
117 -> "sc-b1-06.scws-content.net"
141 -> "sc-b1-07.scws-content.net"
142 -> "sc-b1-08.scws-content.net"
143 -> "sc-b1-09.scws-content.net"
144 -> "sc-b1-10.scws-content.net"
else -> null
}
}
companion object {
val posterMap = hashMapOf<String, String>()
}
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
val items = ArrayList<HomePageList>()
val document = app.get(mainUrl).document
document.select("slider-title").subList(0, 3).map { it ->
if (it.attr("slider-name") != "In arrivo") {
val films = it.attr("titles-json")
val lista = mutableListOf<MovieSearchResponse>()
val videoData = parseJson<List<VideoElement>>(films)
videoData.subList(0, 12).map { searchr ->
val id = searchr.id
val name = searchr.slug
val img = searchr.images[0].url
val number = translatenumber(searchr.images[0].serverID.toInt())
val ip = translateip(searchr.images[0].proxyID.toInt())
val posterurl = "https://$ip/images/$number/$img"
val videourl = "$mainUrl/titles/$id-$name"
posterMap[videourl] = posterurl
val data = app.post("$mainUrl/api/titles/preview/$id", referer = mainUrl).text
val datajs = parseJson<Moviedata>(data)
val type: TvType = if (datajs.type == "movie") {
TvType.Movie
} else {
TvType.TvSeries
}
lista.add(
MovieSearchResponse(
datajs.name,
videourl,
this.name,
type,
posterurl,
datajs.releaseDate.substringBefore("-").filter { it.isDigit() }
.toIntOrNull(),
null,
)
)
}
items.add(HomePageList(it.attr("slider-name"), lista))
}
}
if (items.size <= 0) throw ErrorLoadingException()
return HomePageResponse(items)
}
override suspend fun search(query: String): List<SearchResponse> {
val queryformatted = query.replace(" ", "%20")
val url = "$mainUrl/search?q=$queryformatted"
val document = app.get(url).document
val films =
document.selectFirst("the-search-page")!!.attr("records-json").replace("&quot;", """"""")
val searchresults = parseJson<List<VideoElement>>(films)
return searchresults.map { result ->
val id = result.id
val name = result.slug
val img = result.images[0].url
val number = translatenumber(result.images[0].serverID.toInt())
val ip = translateip(result.images[0].proxyID.toInt())
val data = app.post("$mainUrl/api/titles/preview/$id", referer = mainUrl).text
val datajs = parseJson<Moviedata>(data)
val posterurl = "https://$ip/images/$number/$img"
val videourl = "$mainUrl/titles/$id-$name"
posterMap[videourl] = posterurl
if (datajs.type == "movie") {
val type = TvType.Movie
MovieSearchResponse(
datajs.name,
videourl,
this.name,
type,
posterurl,
datajs.releaseDate.substringBefore("-").filter { it.isDigit() }.toIntOrNull(),
null,
)
} else {
val type = TvType.TvSeries
TvSeriesSearchResponse(
datajs.name,
videourl,
this.name,
type,
posterurl,
datajs.releaseDate.substringBefore("-").filter { it.isDigit() }.toIntOrNull(),
null,
)
}
}
}
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
val poster = posterMap[url]
val id = url.substringBefore("-").filter { it.isDigit() }
val data = app.post("$mainUrl/api/titles/preview/$id", referer = mainUrl).text
val datajs = parseJson<Moviedata>(data)
val type: TvType = if (datajs.type == "movie") {
TvType.Movie
} else {
TvType.TvSeries
}
val trailerinfojs = document.select("slider-trailer").attr("videos")
val trailerinfo = parseJson<List<TrailerElement>>(trailerinfojs)
val trailerurl: String? = if (trailerinfo.isNotEmpty()) {
"https://www.youtube.com/watch?v=${trailerinfo[0].url}"
} else {
null
}
val year = datajs.releaseDate.substringBefore("-")
val correlatijs = document.selectFirst("slider-title")!!.attr("titles-json")
val listacorr = mutableListOf<MovieSearchResponse>()
val correlatidata = parseJson<List<VideoElement>>(correlatijs)
val number : Int = if (correlatidata.size<=15) {correlatidata.size} else correlatidata.size-15
correlatidata.take(number).map { searchr ->
val idcorr = searchr.id
val name = searchr.slug
val img = searchr.images[0].url
val number = translatenumber(searchr.images[0].serverID.toInt())
val ip = translateip(searchr.images[0].proxyID.toInt())
val datacorrel = app.post("$mainUrl/api/titles/preview/$idcorr", referer = mainUrl).text
val datajscorrel = parseJson<Moviedata>(datacorrel)
val videourl = "$mainUrl/titles/$idcorr-$name"
val posterurl = "https://$ip/images/$number/$img"
posterMap[videourl] = posterurl
val typecorr: TvType = if (datajscorrel.type == "movie") {
TvType.Movie
} else {
TvType.TvSeries
}
listacorr.add(
MovieSearchResponse(
datajscorrel.name,
videourl,
this.name,
typecorr,
posterurl,
datajscorrel.releaseDate.substringBefore("-").filter { it.isDigit() }
.toIntOrNull(),
null,
)
)
}
if (type == TvType.TvSeries) {
val name = datajs.name
val episodeList = arrayListOf<Episode>()
val episodes =
Html.fromHtml(document.selectFirst("season-select")!!.attr("seasons")).toString()
val jsonEpisodes = parseJson<List<Season>>(episodes)
jsonEpisodes.map { seasons ->
val stagione = seasons.number.toInt()
val sid = seasons.title_id
val episodio = seasons.episodes
episodio.map { ep ->
val href = "$mainUrl/watch/$sid?e=${ep.id}"
val postimage = if (ep.images.isNotEmpty()) {
ep.images.first().originalURL
} else {
""
}
episodeList.add(
newEpisode(href) {
this.name = ep.name
this.season = stagione
this.episode = ep.number.toInt()
this.description = ep.plot
this.posterUrl = postimage
}
)
}
}
if (episodeList.isEmpty()) throw ErrorLoadingException("No Seasons Found")
return newTvSeriesLoadResponse(name, url, type, episodeList) {
this.posterUrl = poster
this.year = year.filter { it.isDigit() }.toInt()
this.plot = document.selectFirst("div.plot-wrap > p")!!.text()
this.duration = datajs.runtime?.toInt()
this.rating = (datajs.votes[0].average.toFloatOrNull()?.times(1000))?.toInt()
this.tags = datajs.genres.map { it.name }
addTrailer(trailerurl)
this.recommendations = listacorr
}
} else {
return newMovieLoadResponse(
document.selectFirst("div > div > h1")!!.text(),
document.select("a.play-hitzone").attr("href"),
type,
document.select("a.play-hitzone").attr("href")
) {
posterUrl = fixUrlNull(poster)
this.year = year.filter { it.isDigit() }.toInt()
this.plot = document.selectFirst("p.plot")!!.text()
this.rating = datajs.votes[0].average.toFloatOrNull()?.times(1000)?.toInt()
this.tags = datajs.genres.map { it.name }
this.duration = datajs.runtime?.toInt()
addTrailer(trailerurl)
this.recommendations = listacorr
}
}
}
private suspend fun getM3u8Qualities(
m3u8Link: String,
referer: String,
qualityName: String,
): List<ExtractorLink> {
return M3u8Helper.generateM3u8(
this.name,
m3u8Link,
referer,
name = "${this.name} - $qualityName"
)
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val ip = app.get("https://api.ipify.org/").text
val videors = app.get(data).document
val scwsidjs = videors.select("video-player").attr("response").replace("&quot;", """"""")
val jsn = JSONObject(scwsidjs)
val scwsid = jsn.getString("scws_id")
val expire = (System.currentTimeMillis() / 1000 + 172800).toString()
val uno = "$expire$ip Yc8U6r8KjAKAepEA".toByteArray()
val due = MessageDigest.getInstance("MD5").digest(uno)
val tre = base64Encode(due)
val token = tre.replace("=", "").replace("+", "-").replace("/", "_")
val link = "https://scws.xyz/master/$scwsid?token=$token&expires=$expire&n=1&n=1"
getM3u8Qualities(link, data, URI(link).host).forEach(callback)
return true
}
}

View file

@ -1,14 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class StreamingcommunityProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(StreamingcommunityProvider())
}
}

View file

@ -1,26 +0,0 @@
// use an integer for version numbers
version = 1
cloudstream {
// All of these properties are optional, you can safely remove them
// description = "Lorem Ipsum"
// authors = listOf("Cloudburst")
/**
* Status int as the following:
* 0: Down
* 1: Ok
* 2: Slow
* 3: Beta only
* */
status = 1 // will be 3 if unspecified
tvTypes = listOf(
"TvSeries",
"Movie",
)
iconUrl = "https://www.google.com/s2/favicons?domain=tantifilm.autos&sz=24"
}

View file

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.lagradost"/>

View file

@ -1,234 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor
class TantifilmProvider : MainAPI() {
override var lang = "it"
override var mainUrl = "https://tantifilm.autos"
override var name = "Tantifilm"
override val hasMainPage = true
override val hasChromecastSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
)
override val mainPage = mainPageOf(
Pair("$mainUrl/watch-genre/al-cinema/page/", "Ultimi Film"),
Pair("$mainUrl/serie-tv/page/", "Ultime Serie Tv"),
Pair("$mainUrl/watch-genre/film-aggiornati/page/", "Ultimi Film Aggiornati"),
)
override suspend fun getMainPage(
page: Int,
request : MainPageRequest
): HomePageResponse {
val url = request.data + page
val soup = app.get(url).document
val home = soup.select("div.media3").map {
val title = it.selectFirst("p")!!.text().substringBefore("(")
val link = it.selectFirst("a")!!.attr("href")
TvSeriesSearchResponse(
title,
link,
this.name,
TvType.Movie,
it.selectFirst("img")!!.attr("src"),
null,
null,
)
}
return newHomePageResponse(request.name, home)
}
override suspend fun search(query: String): List<SearchResponse> {
val queryformatted = query.replace(" ", "+")
val url = "$mainUrl/search/$queryformatted"
val doc = app.get(url).document
return doc.select("div.film.film-2").map {
val href = it.selectFirst("a")!!.attr("href")
val poster = it.selectFirst("img")!!.attr("src")
val name = it.selectFirst("a > p")!!.text().substringBeforeLast("(")
MovieSearchResponse(
name,
href,
this.name,
TvType.Movie,
poster,
null
)
}
}
override suspend fun load(url: String): LoadResponse {
val document = app.get(url).document
val type = if (document.selectFirst("div.category-film")!!.text().contains("Serie")
.not()
) TvType.Movie else TvType.TvSeries
val title = document.selectFirst("div.title-film-left")!!.text().substringBefore("(")
val descipt = document.select("div.content-left-film > p").map { it.text() }
val rating =
document.selectFirst("div.star-rating.star-rating-f > span > span")!!
.attr("data-rateit-value").toFloatOrNull()
?.times(2857)?.toInt()?.let { minOf(it, 10000) }
var year = document.selectFirst("div.title-film-left")!!.text().substringAfter("(")
.filter { it.isDigit() }
year = if (year.length > 4) {
year.dropLast(4)
} else {
year
}
// ?: does not wor
val poster = document.selectFirst("div.image-right-film > img")!!.attr("src")
val recomm = document.select("div.mediaWrap.mediaWrapAlt.recomended_videos").map {
val href = it.selectFirst("a")!!.attr("href")
val poster = it.selectFirst("img")!!.attr("src")
val name = it.selectFirst("a > p")!!.text().substringBeforeLast("(")
MovieSearchResponse(
name,
href,
this.name,
TvType.Movie,
poster,
null
)
}
val trailerurl = document.selectFirst("#trailer_mob > iframe")!!.attr("src")
if (type == TvType.TvSeries) {
val list = ArrayList<Pair<Int, String>>()
val urlvideocontainer = document.selectFirst("iframe")!!.attr("src")
val videocontainer = app.get(urlvideocontainer).document
videocontainer.select("nav.nav1 > select > option").forEach { element ->
val season = element.text().toIntOrNull()
val href = element.attr("value")
if (season != null && season > 0 && !href.isNullOrBlank()) {
list.add(Pair(season, fixUrl(href)))
}
}
if (list.isEmpty()) throw ErrorLoadingException("No Seasons Found")
val episodeList = ArrayList<Episode>()
for ((season, seasonurl) in list) {
val seasonDocument = app.get(seasonurl).document
val episodes = seasonDocument.select("nav.second_nav > select > option")
if (episodes.isNotEmpty()) {
episodes.forEach { episode ->
val href = episode.attr("value")
val epNum = episode.text().toIntOrNull()
episodeList.add(
Episode(
href,
title,
season,
epNum,
)
)
}
}
}
return newTvSeriesLoadResponse(
title,
url,
type,
episodeList
) {
this.posterUrl = fixUrlNull(poster)
this.year = year.toIntOrNull()
this.plot = descipt[0]
this.rating = rating
this.recommendations = recomm
addTrailer(trailerurl)
}
} else {
val url2 = document.selectFirst("iframe")!!.attr("src")
val actorpagelink =
document.select("div.content-left-film > p:nth-child(2) > a").attr("href")
val actorpagelink2 = document.select("div.content-left-film > p > a").attr("href")
val Linkactor: String = actorpagelink.ifEmpty {
actorpagelink2
}
val actors: List<ActorData>? = if (Linkactor.isNotEmpty()) {
val actorpage = app.get(Linkactor + "cast/").document
actorpage.select("article.membro-cast").filter {
it -> it.selectFirst("img")
?.attr("src") != "https://www.filmtv.it/imgbank/DUMMY/no_portrait.jpg"
}.mapNotNull {
val name = it.selectFirst("div.info > h3")!!.text()
val image = it.selectFirst("img")?.attr("src")
val roleString: String = if (it.selectFirst("h2")?.text() == "Regia") {
"Regia"
} else {
"Attore"
}
val mainActor = Actor(name, image)
ActorData(actor = mainActor, roleString = roleString)
}
} else {
null
}
val duratio: Int? = if (descipt.size == 2) {
descipt[0].filter { it.isDigit() }.toInt()
} else {
null
}
val tags: List<String>? = if (descipt.size == 2) {
mutableListOf(descipt[0].substringBefore(" "))
} else {
null
}
val plot: String = if (descipt.size == 2) {
descipt[1]
} else {
descipt[0]
}
return newMovieLoadResponse(
title,
url2,
type,
url2
) {
posterUrl = fixUrlNull(poster)
this.year = year.toIntOrNull()
this.plot = plot
this.rating = rating
this.recommendations = recomm
this.tags = tags
this.duration = duratio
this.actors = actors
addTrailer(trailerurl)
}
}
}
override suspend fun loadLinks(
data: String,
isCasting: Boolean,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
val doc = app.get(data).document
val iframe =
doc.select("option").map { fixUrl(it.attr("value")) }.filter { it.contains("label") }
iframe.forEach { id ->
val doc2 = app.get(id).document
val id2 = app.get(doc2.selectFirst("iframe")!!.attr("src")).url
loadExtractor(id2, data, subtitleCallback, callback)
}
return true
}
}

View file

@ -1,14 +0,0 @@
package com.lagradost
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
import com.lagradost.cloudstream3.plugins.Plugin
import android.content.Context
@CloudstreamPlugin
class TantiFilmProviderPlugin: Plugin() {
override fun load(context: Context) {
// All providers should be added in this manner. Please don't edit the providers list directly.
registerMainAPI(TantifilmProvider())
}
}

View file

@ -6,7 +6,6 @@ rootProject.name = "CloudstreamPlugins"
// Plugins are included like this
include(
"XcineProvider",
"StreamingcommunityProvider",
"FilmanProvider",
"VMoveeProvider",
"AsiaFlixProvider",
@ -30,7 +29,6 @@ include(
"NginxProvider",
"SoaptwoDayProvider",
"PinoyHDXyzProvider",
"AltadefinizioneProvider",
"PelisflixProvider",
"SflixProvider",
"ElifilmsProvider",
@ -39,12 +37,9 @@ include(
"VfSerieProvider",
"LayarKacaProvider",
"EntrepeliculasyseriesProvider",
"TantiFilmProvider",
"SuperStream",
"FilmpertuttiProvider",
"FrenchStreamProvider",
"MyCimaProvider",
"IlGenioDelloStreamingProvider",
"EstrenosDoramasProvider",
// "HDTodayProvider",
"DubokuProvider",
@ -66,7 +61,6 @@ include(
// <--- Anime providers --->
"AnimeSaturnProvider",
"DubbedAnimeProvider",
"TocanimeProvider",
"NontonAnimeIDProvider",
@ -78,7 +72,6 @@ include(
"AnimeFlickProvider",
"AnimeSailProvider",
"MonoschinosProvider",
"AniPlayProvider",
"AnimefenixProvider",
"NeonimeProvider",
"KawaiifuProvider",
@ -90,7 +83,6 @@ include(
"AniflixProvider",
"GogoanimeProvider",
"AnimeflvnetProvider",
"AnimeWorldProvider",
"KuramanimeProvider",
"GomunimeProvider",
"OtakudesuProvider",