mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
Some fixes on Italian providers (#29)
This commit is contained in:
parent
b368fcce02
commit
a535ba088d
25 changed files with 542 additions and 32 deletions
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 2
|
version = 3
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -15,6 +15,7 @@ class AniPlayProvider : MainAPI() {
|
||||||
override var name = "AniPlay"
|
override var name = "AniPlay"
|
||||||
override var lang = "it"
|
override var lang = "it"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
|
override val hasQuickSearch = true
|
||||||
private val dubIdentifier = " (ITA)"
|
private val dubIdentifier = " (ITA)"
|
||||||
|
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
|
@ -133,6 +134,22 @@ class AniPlayProvider : MainAPI() {
|
||||||
return HomePageResponse(listOf(HomePageList("Ultime uscite",results)))
|
return HomePageResponse(listOf(HomePageList("Ultime uscite",results)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override suspend fun quickSearch(query: String): List<SearchResponse>? {
|
||||||
|
val response = parseJson<List<ApiSearchResult>>(app.get("$mainUrl/api/anime/search?query=$query").text)
|
||||||
|
|
||||||
|
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 search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val response = parseJson<List<ApiSearchResult>>(app.get("$mainUrl/api/anime/advanced-search?page=0&size=36&query=$query").text)
|
val response = parseJson<List<ApiSearchResult>>(app.get("$mainUrl/api/anime/advanced-search?page=0&size=36&query=$query").text)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
package com.lagradost
|
package com.lagradost
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
import com.lagradost.cloudstream3.*
|
import com.lagradost.cloudstream3.*
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addDuration
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addDuration
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addRating
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addRating
|
||||||
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
@ -14,6 +16,7 @@ class AnimeSaturnProvider : MainAPI() {
|
||||||
override var name = "AnimeSaturn"
|
override var name = "AnimeSaturn"
|
||||||
override var lang = "it"
|
override var lang = "it"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
|
override val hasQuickSearch = true
|
||||||
|
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
|
@ -21,6 +24,12 @@ class AnimeSaturnProvider : MainAPI() {
|
||||||
TvType.OVA
|
TvType.OVA
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private data class QuickSearchParse(
|
||||||
|
@JsonProperty("link") val link: String,
|
||||||
|
@JsonProperty("image") val image: String,
|
||||||
|
@JsonProperty("name") val name: String
|
||||||
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun getStatus(t: String?): ShowStatus? {
|
fun getStatus(t: String?): ShowStatus? {
|
||||||
return when (t?.lowercase()) {
|
return when (t?.lowercase()) {
|
||||||
|
@ -91,6 +100,17 @@ class AnimeSaturnProvider : MainAPI() {
|
||||||
return HomePageResponse(list)
|
return HomePageResponse(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override suspend fun quickSearch(query: String): List<SearchResponse>? {
|
||||||
|
val quickSearchJ = app.get("$mainUrl/index.php?search=1&key=$query").text
|
||||||
|
return tryParseJson<List<QuickSearchParse>>(quickSearchJ)?.map {
|
||||||
|
newAnimeSearchResponse(it.name.replace(" (ITA)", ""), it.link, TvType.Anime) {
|
||||||
|
addDubStatus(it.name.contains(" (ITA)"))
|
||||||
|
this.posterUrl = it.image
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val document = app.get("$mainUrl/animelist?search=$query").document
|
val document = app.get("$mainUrl/animelist?search=$query").document
|
||||||
return document.select("div.item-archivio").map {
|
return document.select("div.item-archivio").map {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -21,6 +21,7 @@ class AnimeWorldProvider : MainAPI() {
|
||||||
override var name = "AnimeWorld"
|
override var name = "AnimeWorld"
|
||||||
override var lang = "it"
|
override var lang = "it"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
|
override val hasQuickSearch = true
|
||||||
|
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
TvType.Anime,
|
TvType.Anime,
|
||||||
|
@ -30,7 +31,7 @@ class AnimeWorldProvider : MainAPI() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private var cookies = emptyMap<String, String>()
|
private var cookies = emptyMap<String, String>()
|
||||||
|
private lateinit var token : String
|
||||||
// Disabled authentication as site did
|
// Disabled authentication as site did
|
||||||
private suspend fun request(url: String): NiceResponse {
|
private suspend fun request(url: String): NiceResponse {
|
||||||
// if (cookies.isEmpty()) {
|
// if (cookies.isEmpty()) {
|
||||||
|
@ -131,8 +132,11 @@ class AnimeWorldProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
|
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
|
||||||
val document = request(mainUrl).document
|
val pagedata = request(mainUrl)
|
||||||
|
val document = pagedata.document
|
||||||
val list = ArrayList<HomePageList>()
|
val list = ArrayList<HomePageList>()
|
||||||
|
token = document.getElementById("csrf-token")?.attr("content")?:""
|
||||||
|
cookies = pagedata.cookies
|
||||||
|
|
||||||
val widget = document.select(".widget.hotnew")
|
val widget = document.select(".widget.hotnew")
|
||||||
widget.select(".tabs [data-name=\"sub\"], .tabs [data-name=\"dub\"]").forEach { tab ->
|
widget.select(".tabs [data-name=\"sub\"], .tabs [data-name=\"dub\"]").forEach { tab ->
|
||||||
|
@ -154,6 +158,38 @@ class AnimeWorldProvider : MainAPI() {
|
||||||
return HomePageResponse(list)
|
return HomePageResponse(list)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data class searchJson(
|
||||||
|
@JsonProperty("animes") val animes: List<animejson>
|
||||||
|
)
|
||||||
|
data class animejson(
|
||||||
|
@JsonProperty("name") val name: String,
|
||||||
|
@JsonProperty("image") val image: String,
|
||||||
|
@JsonProperty("link") val link: String,
|
||||||
|
@JsonProperty("animeTypeName") val type: String,
|
||||||
|
@JsonProperty("language") val language: String,
|
||||||
|
@JsonProperty("jtitle") val otherTitle: String
|
||||||
|
)
|
||||||
|
|
||||||
|
override suspend fun quickSearch(query: String): List<SearchResponse>? {
|
||||||
|
val document = app.post("https://www.animeworld.tv/api/search/v2?keyword=${query}", referer = mainUrl, cookies = cookies, headers = mapOf("csrf-token" to token)).text
|
||||||
|
|
||||||
|
return tryParseJson<searchJson>(document)?.animes?.map { anime->
|
||||||
|
val type = when (anime.type) {
|
||||||
|
"Movie" -> TvType.AnimeMovie
|
||||||
|
"OVA" -> TvType.OVA
|
||||||
|
else -> TvType.Anime
|
||||||
|
}
|
||||||
|
val dub = when (anime.language) {
|
||||||
|
"it" -> true
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
|
newAnimeSearchResponse(anime.name, anime.link, type) {
|
||||||
|
addDubStatus(dub)
|
||||||
|
this.otherName = anime.otherTitle
|
||||||
|
this.posterUrl = anime.image
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val document = request("$mainUrl/search?keyword=$query").document
|
val document = request("$mainUrl/search?keyword=$query").document
|
||||||
return document.select(".film-list > .item").map {
|
return document.select(".film-list > .item").map {
|
||||||
|
|
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
26
GuardaSerieProvider/build.gradle.kts
Normal file
26
GuardaSerieProvider/build.gradle.kts
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
// use an integer for version numbers
|
||||||
|
version = 1
|
||||||
|
|
||||||
|
|
||||||
|
cloudstream {
|
||||||
|
language = "it"
|
||||||
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
|
// description = "Lorem Ipsum"
|
||||||
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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=guardaserie.golf&sz=%size%"
|
||||||
|
}
|
2
GuardaSerieProvider/src/main/AndroidManifest.xml
Normal file
2
GuardaSerieProvider/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest package="com.lagradost"/>
|
|
@ -0,0 +1,204 @@
|
||||||
|
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.LoadResponse.Companion.addRating
|
||||||
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
||||||
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
|
import com.lagradost.cloudstream3.utils.Coroutines.main
|
||||||
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
|
import com.lagradost.nicehttp.NiceResponse
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
import org.mozilla.javascript.ConsString
|
||||||
|
import org.mozilla.javascript.Context
|
||||||
|
import org.mozilla.javascript.Scriptable
|
||||||
|
|
||||||
|
class GuardaSerieProvider : MainAPI() {
|
||||||
|
override var mainUrl = "https://guardaserie.golf"
|
||||||
|
override var name = "GuardaSerie"
|
||||||
|
override var lang = "it"
|
||||||
|
override val hasMainPage = true
|
||||||
|
override val hasQuickSearch = true
|
||||||
|
override val supportedTypes = setOf(
|
||||||
|
TvType.TvSeries,
|
||||||
|
TvType.Movie
|
||||||
|
)
|
||||||
|
override val mainPage = mainPageOf(
|
||||||
|
Pair("$mainUrl/stagioni/page/", "Ultime Serie Tv"),
|
||||||
|
Pair("$mainUrl/viste/page/", "Film e Serie più viste"),
|
||||||
|
Pair("$mainUrl/votati/page/", "Ora al cinema")
|
||||||
|
)
|
||||||
|
companion object {
|
||||||
|
private lateinit var token : String
|
||||||
|
}
|
||||||
|
|
||||||
|
data class QuickSearchParser (
|
||||||
|
@JsonProperty ("title") val title : String? = null,
|
||||||
|
@JsonProperty ("url") val url : String? = null,
|
||||||
|
@JsonProperty ("img") val img : String? = null
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
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("src")
|
||||||
|
val name = it.selectFirst("div.details > div.title > a")!!.text().substringBefore("(")
|
||||||
|
MovieSearchResponse(
|
||||||
|
name,
|
||||||
|
href,
|
||||||
|
this.name,
|
||||||
|
TvType.Movie,
|
||||||
|
poster
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun quickSearch(query: String): List<SearchResponse>? {
|
||||||
|
val response = app.get("$mainUrl/wp-json/dooplay/search/?keyword=$query&nonce=$token").text
|
||||||
|
val p = tryParseJson<HashMap<String,QuickSearchParser>>(response)?.values?.map {
|
||||||
|
MovieSearchResponse(
|
||||||
|
name = it.title!!,
|
||||||
|
url = it.url!!,
|
||||||
|
posterUrl = it.img!!,
|
||||||
|
type = TvType.Movie,
|
||||||
|
apiName = this.name
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return p
|
||||||
|
}
|
||||||
|
override suspend fun getMainPage(page: Int, request : MainPageRequest): HomePageResponse {
|
||||||
|
val url = request.data + page
|
||||||
|
val soup = app.get(url).document
|
||||||
|
|
||||||
|
token = Regex("nonce\":\"[^\"]*").find(app.get(mainUrl).toString())?.value?.drop(8)?:""
|
||||||
|
val home = soup.select("article").map {
|
||||||
|
val title = it.selectFirst("img")!!.attr("alt")
|
||||||
|
val link = it.selectFirst("a")!!.attr("href")
|
||||||
|
val image = it.selectFirst("img")!!.attr("src")
|
||||||
|
val quality = getQualityFromString(it.selectFirst("span.quality")?.text())
|
||||||
|
|
||||||
|
MovieSearchResponse(
|
||||||
|
title,
|
||||||
|
link,
|
||||||
|
this.name,
|
||||||
|
TvType.Movie,
|
||||||
|
image,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
quality,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return newHomePageResponse(request.name, home)
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun load(url: String): LoadResponse {
|
||||||
|
val document = app.get(url).document
|
||||||
|
val name = document.selectFirst("h1")!!.text()
|
||||||
|
val poster = document.selectFirst("div.poster")?.selectFirst("img")!!.attr("src")
|
||||||
|
val rating = document.selectFirst("span.dt_rating_vgs")!!.text().toIntOrNull()
|
||||||
|
val tags = document.select("div.sgeneros > a").map { it.text() }
|
||||||
|
val actors = document.select("div.person").map {
|
||||||
|
val actorName = it.selectFirst("div.name > a")!!.text()
|
||||||
|
val actorPoster = it.selectFirst("img")?.attr("src")
|
||||||
|
val role = it.selectFirst("div.caracter")?.text()
|
||||||
|
ActorData(Actor(actorName, actorPoster), roleString = role )
|
||||||
|
}
|
||||||
|
if(url.contains("/film/")){
|
||||||
|
val description = document.selectFirst("div.wp-content > p")!!.text()
|
||||||
|
val year = document.selectFirst("span.date")!!.text().substringAfterLast(" ").toIntOrNull()
|
||||||
|
val recomm = document.selectFirst("div.sbox.srelacionados")?.select("article")?.map{
|
||||||
|
MovieSearchResponse(
|
||||||
|
name = it.selectFirst("img")!!.attr("alt"),
|
||||||
|
url = it.selectFirst("a")!!.attr("href"),
|
||||||
|
this.name,
|
||||||
|
TvType.Movie,
|
||||||
|
posterUrl = it.selectFirst("img")!!.attr("src"),
|
||||||
|
null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
val duration = document.selectFirst("div.runtime")?.text()?.filter { it.isDigit() }?.toIntOrNull()
|
||||||
|
return newMovieLoadResponse(
|
||||||
|
name = name,
|
||||||
|
url = url,
|
||||||
|
type = TvType.Movie,
|
||||||
|
dataUrl = url
|
||||||
|
) {
|
||||||
|
posterUrl = fixUrlNull(poster)
|
||||||
|
this.year = year
|
||||||
|
this.plot = description
|
||||||
|
this.rating = rating
|
||||||
|
this.recommendations = recomm
|
||||||
|
this.duration = duration
|
||||||
|
this.actors = actors
|
||||||
|
this.tags = tags
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
val episodes = document.select("#seasons > div").reversed().mapIndexed{season, data->
|
||||||
|
data.select("li").mapIndexed { epNum , ep ->
|
||||||
|
val href = ep.selectFirst("a")!!.attr("href")
|
||||||
|
val epTitle = ep.selectFirst("a")?.text()
|
||||||
|
val posterUrl = ep.selectFirst("img")?.attr("src")
|
||||||
|
Episode(
|
||||||
|
href,
|
||||||
|
epTitle,
|
||||||
|
season + 1,
|
||||||
|
epNum + 1,
|
||||||
|
posterUrl,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
val plot = document.selectFirst("#info > div.wp-content > p")?.text()
|
||||||
|
return newTvSeriesLoadResponse(
|
||||||
|
name = name,
|
||||||
|
url = url,
|
||||||
|
type = TvType.TvSeries,
|
||||||
|
episodes = episodes.flatten(),
|
||||||
|
){
|
||||||
|
this.posterUrl = poster
|
||||||
|
this.rating = rating
|
||||||
|
this.tags = tags
|
||||||
|
this.actors = actors
|
||||||
|
this.plot = plot
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override suspend fun loadLinks(
|
||||||
|
data: String,
|
||||||
|
isCasting: Boolean,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
): Boolean {
|
||||||
|
val doc = app.get(data).document
|
||||||
|
val type = if( data.contains("film") ){"movie"} else {"tv"}
|
||||||
|
val idpost = doc.select("#player-option-1").attr("data-post")
|
||||||
|
val postInfo = app.post("$mainUrl/wp-admin/admin-ajax.php", headers = mapOf(
|
||||||
|
"content-type" to "application/x-www-form-urlencoded; charset=UTF-8",
|
||||||
|
"accept" to "*/*",
|
||||||
|
"X-Requested-With" to "XMLHttpRequest",
|
||||||
|
), data = mapOf(
|
||||||
|
"action" to "doo_player_ajax",
|
||||||
|
"post" to idpost,
|
||||||
|
"nume" to "1",
|
||||||
|
"type" to type,
|
||||||
|
))
|
||||||
|
|
||||||
|
val url= Regex("""src='((.|\\n)*?)'""").find(postInfo.text)?.groups?.get(1)?.value.toString()
|
||||||
|
val streamUrl = app.get(url, headers = mapOf("referer" to mainUrl)).url
|
||||||
|
return loadExtractor(streamUrl, data, subtitleCallback, callback)
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
package com.lagradost
|
||||||
|
|
||||||
|
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
|
||||||
|
import com.lagradost.cloudstream3.plugins.Plugin
|
||||||
|
import android.content.Context
|
||||||
|
|
||||||
|
@CloudstreamPlugin
|
||||||
|
class GuardaSerieProviderPlugin: Plugin() {
|
||||||
|
override fun load(context: Context) {
|
||||||
|
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||||
|
registerMainAPI(GuardaSerieProvider())
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
25
StarLiveProvider/build.gradle.kts
Normal file
25
StarLiveProvider/build.gradle.kts
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
// use an integer for version numbers
|
||||||
|
version = 1
|
||||||
|
|
||||||
|
|
||||||
|
cloudstream {
|
||||||
|
language = "it"
|
||||||
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
|
// description = "Lorem Ipsum"
|
||||||
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Status int as the following:
|
||||||
|
* 0: Down
|
||||||
|
* 1: Ok
|
||||||
|
* 2: Slow
|
||||||
|
* 3: Beta only
|
||||||
|
* */
|
||||||
|
status = 1 // will be 3 if unspecified
|
||||||
|
tvTypes = listOf(
|
||||||
|
"Live",
|
||||||
|
)
|
||||||
|
|
||||||
|
iconUrl = "https://www.google.com/s2/favicons?domain=starlive.xyz&sz=%size%"
|
||||||
|
}
|
2
StarLiveProvider/src/main/AndroidManifest.xml
Normal file
2
StarLiveProvider/src/main/AndroidManifest.xml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<manifest package="com.lagradost"/>
|
|
@ -0,0 +1,145 @@
|
||||||
|
package com.lagradost
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
|
import com.lagradost.cloudstream3.*
|
||||||
|
import com.lagradost.cloudstream3.utils.*
|
||||||
|
import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||||
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
|
|
||||||
|
class StarLiveProvider : MainAPI() {
|
||||||
|
override var mainUrl = "https://starlive.xyz"
|
||||||
|
override var name = "StarLive"
|
||||||
|
override val hasMainPage = true
|
||||||
|
override var lang = "it"
|
||||||
|
override val hasChromecastSupport = true
|
||||||
|
override val supportedTypes = setOf(TvType.Live)
|
||||||
|
|
||||||
|
private data class LinkParser(
|
||||||
|
@JsonProperty("link") val link: String,
|
||||||
|
@JsonProperty("lang") val language: String,
|
||||||
|
@JsonProperty("name") val name: String
|
||||||
|
)
|
||||||
|
|
||||||
|
private data class MatchDataParser(
|
||||||
|
@JsonProperty("time") val time: String,
|
||||||
|
@JsonProperty("poster") val poster: String
|
||||||
|
)
|
||||||
|
|
||||||
|
private data class MatchParser(
|
||||||
|
@JsonProperty("linkData") val linkData: List<LinkParser>,
|
||||||
|
@JsonProperty("matchData") val MatchData: MatchDataParser
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
|
||||||
|
val document = app.get(mainUrl).document
|
||||||
|
val sections = document.select("div.panel")
|
||||||
|
if (sections.isEmpty()) throw ErrorLoadingException()
|
||||||
|
|
||||||
|
return HomePageResponse(sections.mapNotNull { sport ->
|
||||||
|
val dayMatch = sport.previousElementSiblings().toList().first { it.`is`("h3") }.text()
|
||||||
|
val categoryName = sport.selectFirst("h4")?.text() ?: "Other"
|
||||||
|
|
||||||
|
val showsList = sport.select("tr").takeWhile { it.text().contains("Player").not() }
|
||||||
|
.filter { it.hasAttr("class") }.drop(1)
|
||||||
|
|
||||||
|
val shows = showsList.groupBy { it.text().substringBeforeLast(" ") }.map { matchs ->
|
||||||
|
val posterUrl = fixUrl(
|
||||||
|
sport.selectFirst("h4")?.attr("style")
|
||||||
|
?.substringAfter("(")?.substringBefore(")") ?: ""
|
||||||
|
)
|
||||||
|
val hasDate = matchs.key.contains(":")
|
||||||
|
val matchName = if (hasDate) { matchs.key.substringAfter(" ")}
|
||||||
|
else { matchs.key }
|
||||||
|
|
||||||
|
val href = matchs.value.map { match ->
|
||||||
|
val linkUrl = fixUrl(match.selectFirst("a")?.attr("href") ?: return@mapNotNull null)
|
||||||
|
val lang = match.attr("class")
|
||||||
|
LinkParser(linkUrl, lang, matchName)
|
||||||
|
}
|
||||||
|
|
||||||
|
val date = if (hasDate) {
|
||||||
|
dayMatch + " - " + matchs.key.substringBefore(" ")
|
||||||
|
} else {
|
||||||
|
dayMatch
|
||||||
|
}
|
||||||
|
|
||||||
|
LiveSearchResponse(
|
||||||
|
matchName,
|
||||||
|
MatchParser(href, MatchDataParser(date, posterUrl)).toJson(),
|
||||||
|
this@StarLiveProvider.name,
|
||||||
|
TvType.Live,
|
||||||
|
posterUrl,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
HomePageList(
|
||||||
|
categoryName,
|
||||||
|
shows
|
||||||
|
)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override suspend fun load(url: String): LoadResponse {
|
||||||
|
val matchdata = tryParseJson<MatchParser>(url)
|
||||||
|
val poster = matchdata?.MatchData?.poster
|
||||||
|
val matchstart = matchdata?.MatchData?.time
|
||||||
|
return LiveStreamLoadResponse(
|
||||||
|
dataUrl = url,
|
||||||
|
url = matchdata?.linkData?.firstOrNull()?.link ?: mainUrl,
|
||||||
|
name = matchdata?.linkData?.firstOrNull()?.name ?: "No name",
|
||||||
|
posterUrl = poster,
|
||||||
|
plot = matchstart,
|
||||||
|
apiName = this@StarLiveProvider.name
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
private suspend fun extractVideoLinks(
|
||||||
|
data: LinkParser,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
) {
|
||||||
|
val linktoStream = fixUrl(app.get(data.link).document.selectFirst("iframe")!!.attr("src"))
|
||||||
|
|
||||||
|
val referrerLink = if (linktoStream.contains("starlive")) {
|
||||||
|
app.get(linktoStream, referer = data.link).document.selectFirst("iframe")?.attr("src")
|
||||||
|
?: return
|
||||||
|
} else {
|
||||||
|
linktoStream
|
||||||
|
}
|
||||||
|
val packed = when (linktoStream.contains("starlive")) {
|
||||||
|
true -> app.get(
|
||||||
|
referrerLink,
|
||||||
|
referer = linktoStream
|
||||||
|
).document.select("script").toString()
|
||||||
|
false -> app.get(linktoStream, referer = data.link).document.select("script")
|
||||||
|
.select("script").toString()
|
||||||
|
}
|
||||||
|
val streamUrl = getAndUnpack(packed).substringAfter("var src=\"").substringBefore("\"")
|
||||||
|
callback(
|
||||||
|
ExtractorLink(
|
||||||
|
source = this.name,
|
||||||
|
name = data.name + " - " + data.language,
|
||||||
|
url = streamUrl,
|
||||||
|
quality = Qualities.Unknown.value,
|
||||||
|
referer = referrerLink,
|
||||||
|
isM3u8 = true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
override suspend fun loadLinks(
|
||||||
|
data: String,
|
||||||
|
isCasting: Boolean,
|
||||||
|
subtitleCallback: (SubtitleFile) -> Unit,
|
||||||
|
callback: (ExtractorLink) -> Unit
|
||||||
|
): Boolean {
|
||||||
|
tryParseJson<MatchParser>(data)?.linkData?.map { link ->
|
||||||
|
extractVideoLinks(link, callback)
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
package com.lagradost
|
||||||
|
|
||||||
|
import com.lagradost.cloudstream3.plugins.CloudstreamPlugin
|
||||||
|
import com.lagradost.cloudstream3.plugins.Plugin
|
||||||
|
import android.content.Context
|
||||||
|
|
||||||
|
@CloudstreamPlugin
|
||||||
|
class StarLiveProviderPlugin: Plugin() {
|
||||||
|
override fun load(context: Context) {
|
||||||
|
// All providers should be added in this manner. Please don't edit the providers list directly.
|
||||||
|
registerMainAPI(StarLiveProvider())
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 2
|
version = 3
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
|
@ -2,10 +2,10 @@ package com.lagradost
|
||||||
|
|
||||||
import android.text.Html
|
import android.text.Html
|
||||||
import com.fasterxml.jackson.annotation.*
|
import com.fasterxml.jackson.annotation.*
|
||||||
import com.lagradost.cloudstream3.*
|
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.parseJson
|
||||||
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
|
||||||
import com.lagradost.cloudstream3.utils.*
|
import com.lagradost.cloudstream3.utils.*
|
||||||
|
import com.lagradost.cloudstream3.*
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import java.net.URI
|
import java.net.URI
|
||||||
import java.security.MessageDigest
|
import java.security.MessageDigest
|
||||||
|
@ -128,8 +128,8 @@ data class TrailerElement(
|
||||||
|
|
||||||
class StreamingcommunityProvider: MainAPI() {
|
class StreamingcommunityProvider: MainAPI() {
|
||||||
override var lang = "it"
|
override var lang = "it"
|
||||||
override var mainUrl = "https://streamingcommunity.tech"
|
override var mainUrl = "https://streamingcommunity.golf"
|
||||||
override var name = "Streamingcommunity"
|
override var name = "StreamingCommunity"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
override val hasChromecastSupport = true
|
override val hasChromecastSupport = true
|
||||||
override val supportedTypes = setOf(
|
override val supportedTypes = setOf(
|
||||||
|
@ -183,7 +183,7 @@ class StreamingcommunityProvider : MainAPI() {
|
||||||
val lista = mutableListOf<MovieSearchResponse>()
|
val lista = mutableListOf<MovieSearchResponse>()
|
||||||
val videoData = parseJson<List<VideoElement>>(films)
|
val videoData = parseJson<List<VideoElement>>(films)
|
||||||
|
|
||||||
videoData.subList(0, 12).map { searchr ->
|
videoData.subList(0, 12).apmap { searchr ->
|
||||||
val id = searchr.id
|
val id = searchr.id
|
||||||
val name = searchr.slug
|
val name = searchr.slug
|
||||||
val img = searchr.images[0].url
|
val img = searchr.images[0].url
|
||||||
|
@ -229,7 +229,7 @@ class StreamingcommunityProvider : MainAPI() {
|
||||||
document.selectFirst("the-search-page")!!.attr("records-json").replace(""", """"""")
|
document.selectFirst("the-search-page")!!.attr("records-json").replace(""", """"""")
|
||||||
|
|
||||||
val searchresults = parseJson<List<VideoElement>>(films)
|
val searchresults = parseJson<List<VideoElement>>(films)
|
||||||
return searchresults.map { result ->
|
return searchresults.apmap { result ->
|
||||||
val id = result.id
|
val id = result.id
|
||||||
val name = result.slug
|
val name = result.slug
|
||||||
val img = result.images[0].url
|
val img = result.images[0].url
|
||||||
|
@ -296,7 +296,7 @@ class StreamingcommunityProvider : MainAPI() {
|
||||||
val correlatidata = parseJson<List<VideoElement>>(correlatijs)
|
val correlatidata = parseJson<List<VideoElement>>(correlatijs)
|
||||||
val number : Int = if (correlatidata.size<=15) {correlatidata.size} else correlatidata.size-15
|
val number : Int = if (correlatidata.size<=15) {correlatidata.size} else correlatidata.size-15
|
||||||
|
|
||||||
correlatidata.take(number).map { searchr ->
|
correlatidata.take(number).apmap { searchr ->
|
||||||
val idcorr = searchr.id
|
val idcorr = searchr.id
|
||||||
val name = searchr.slug
|
val name = searchr.slug
|
||||||
val img = searchr.images[0].url
|
val img = searchr.images[0].url
|
||||||
|
@ -425,13 +425,18 @@ class StreamingcommunityProvider : MainAPI() {
|
||||||
val scwsid = jsn.getString("scws_id")
|
val scwsid = jsn.getString("scws_id")
|
||||||
val expire = (System.currentTimeMillis() / 1000 + 172800).toString()
|
val expire = (System.currentTimeMillis() / 1000 + 172800).toString()
|
||||||
|
|
||||||
val uno = "$expire$ip Yc8U6r8KjAKAepEA".toByteArray()
|
val token0 = "$expire$ip Yc8U6r8KjAKAepEA".toByteArray()
|
||||||
val due = MessageDigest.getInstance("MD5").digest(uno)
|
val token1 = MessageDigest.getInstance("MD5").digest(token0)
|
||||||
val tre = base64Encode(due)
|
val token2 = base64Encode(token1)
|
||||||
val token = tre.replace("=", "").replace("+", "-").replace("/", "_")
|
val token = token2.replace("=", "").replace("+", "-").replace("/", "_")
|
||||||
|
|
||||||
|
val link = "https://scws.work/master/$scwsid?token=$token&expires=$expire&n=1"
|
||||||
|
Regex("URI=\".*\"").findAll(app.get("https://scws.work/master/$scwsid?token=$token&expires=$expire&n=1").text).toList().filter{it.value.contains("auto-forced").not()}.map{
|
||||||
|
val link = app.get(it.value.substringAfter("\"").dropLast(1)).text.lines().filter{it.contains("http")}[0]
|
||||||
|
val lang = it.value.substringAfter("rendition=").substringBefore("&")
|
||||||
|
SubtitleFile(lang, link)
|
||||||
|
}.forEach(subtitleCallback)
|
||||||
|
|
||||||
val link = "https://scws.xyz/master/$scwsid?token=$token&expires=$expire&n=1&n=1"
|
|
||||||
getM3u8Qualities(link, data, URI(link).host).forEach(callback)
|
getM3u8Qualities(link, data, URI(link).host).forEach(callback)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 1
|
version = 2
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
@ -23,5 +23,5 @@ cloudstream {
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
iconUrl = "https://www.google.com/s2/favicons?domain=tantifilm.autos&sz=%size%"
|
iconUrl = "https://www.google.com/s2/favicons?domain=tantifilm.yachts&sz=%size%"
|
||||||
}
|
}
|
|
@ -9,7 +9,7 @@ import com.lagradost.cloudstream3.network.CloudflareKiller
|
||||||
|
|
||||||
class TantifilmProvider : MainAPI() {
|
class TantifilmProvider : MainAPI() {
|
||||||
override var lang = "it"
|
override var lang = "it"
|
||||||
override var mainUrl = "https://tantifilm.autos"
|
override var mainUrl = "https://tantifilm.yachts"
|
||||||
override var name = "Tantifilm"
|
override var name = "Tantifilm"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
override val hasChromecastSupport = true
|
override val hasChromecastSupport = true
|
||||||
|
|
|
@ -7,7 +7,7 @@ cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
||||||
// description = "Lorem Ipsum"
|
// description = "Lorem Ipsum"
|
||||||
// authors = listOf("Cloudburst")
|
authors = listOf("Adippe")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Status int as the following:
|
* Status int as the following:
|
||||||
|
|
Loading…
Reference in a new issue