mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
changes on italian providers Main Pages (#1372)
* changes on italian providers Main Pages * changes on italian providers Main Pages * changes on italian providers Main Pages
This commit is contained in:
parent
9bb60a1677
commit
e32f99d8a7
8 changed files with 54 additions and 127 deletions
|
@ -128,10 +128,10 @@
|
|||
<data android:scheme="https" android:host="hdm.to" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="theflix.to" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="streamingcommunity.best" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="www.tantifilm.nl" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="tantifilm.autos" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="cb01.rip" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="altadefinizione.tienda" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="filmpertutti.love" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="filmpertutti.photo" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="hdmovie2.art" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="http://167.88.14.149" android:pathPrefix="/"/>
|
||||
<data android:scheme="https" android:host="149.56.24.226" android:pathPrefix="/"/>
|
||||
|
|
|
@ -18,8 +18,9 @@ class AltadefinizioneProvider : MainAPI() {
|
|||
)
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
Pair("$mainUrl/azione/page/", "Azione"),
|
||||
Pair("$mainUrl/avventura/page/", "Avventura"),
|
||||
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(
|
||||
|
|
|
@ -16,60 +16,37 @@ class CineblogProvider : MainAPI() {
|
|||
TvType.Movie,
|
||||
TvType.TvSeries,
|
||||
)
|
||||
override val mainPage = mainPageOf(
|
||||
Pair("$mainUrl/popolari/page/number/?get=movies", "Film Popolari"),
|
||||
Pair("$mainUrl/popolari/page/number/?get=tv", "Serie Tv Popolari"),
|
||||
Pair("$mainUrl/i-piu-votati/page/number/?get=movies", "Film più votati"),
|
||||
Pair("$mainUrl/i-piu-votati/page/number/?get=tv", "Serie Tv più votate"),
|
||||
Pair("$mainUrl/anno/2022/page/number", "Ultime uscite"),
|
||||
)
|
||||
|
||||
override suspend fun getMainPage(page: Int, categoryName: String, categoryData: String): HomePageResponse {
|
||||
val items = ArrayList<HomePageList>()
|
||||
val urls = listOf(
|
||||
Pair("$mainUrl/genere/azione/", "Azione"),
|
||||
Pair("$mainUrl/genere/avventura/", "Avventura"),
|
||||
)
|
||||
for ((url, name) in urls) {
|
||||
try {
|
||||
val soup = app.get(url).document
|
||||
val home = soup.select("article.item.movies").map {
|
||||
val title = it.selectFirst("div.data > h3 > a")!!.text().substringBefore("(")
|
||||
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("src"),
|
||||
null,
|
||||
null,
|
||||
quality = quality
|
||||
)
|
||||
}
|
||||
|
||||
items.add(HomePageList(name, home))
|
||||
} catch (e: Exception) {
|
||||
logError(e)
|
||||
}
|
||||
override suspend fun getMainPage(
|
||||
page: Int,
|
||||
categoryName: String,
|
||||
categoryData: String
|
||||
): HomePageResponse {
|
||||
val url = categoryData.replace("number", page.toString())
|
||||
val soup = app.get(url, referer = url.substringBefore("page")).document
|
||||
val home = soup.select("article.item").map {
|
||||
val title = it.selectFirst("div.data > h3 > a")!!.text().substringBefore("(")
|
||||
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("src"),
|
||||
null,
|
||||
null,
|
||||
quality = quality
|
||||
)
|
||||
}
|
||||
try {
|
||||
val soup = app.get("$mainUrl/serietv/").document
|
||||
val home = soup.select("article.item.tvshows").map {
|
||||
val title = it.selectFirst("div.data > h3 > a")!!.text().substringBefore("(")
|
||||
val link = it.selectFirst("div.poster > a")!!.attr("href")
|
||||
TvSeriesSearchResponse(
|
||||
title,
|
||||
link,
|
||||
this.name,
|
||||
TvType.Movie,
|
||||
it.selectFirst("img")!!.attr("src"),
|
||||
null,
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
items.add(HomePageList("Serie tv", home))
|
||||
} catch (e: Exception) {
|
||||
logError(e)
|
||||
}
|
||||
|
||||
if (items.size <= 0) throw ErrorLoadingException()
|
||||
return HomePageResponse(items)
|
||||
return newHomePageResponse(categoryName, home)
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
|
|
|
@ -7,6 +7,7 @@ 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 com.lagradost.nicehttp.NiceResponse
|
||||
import org.jsoup.nodes.Element
|
||||
|
@ -14,7 +15,7 @@ import org.jsoup.nodes.Element
|
|||
|
||||
class FilmpertuttiProvider : MainAPI() {
|
||||
override var lang = "it"
|
||||
override var mainUrl = "https://filmpertutti.love"
|
||||
override var mainUrl = "https://filmpertutti.photo"
|
||||
override var name = "Filmpertutti"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
|
@ -24,9 +25,9 @@ class FilmpertuttiProvider : MainAPI() {
|
|||
)
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
Pair("$mainUrl/category/serie-tv/page/", "Serie Tv"),
|
||||
Pair("$mainUrl/category/film/azione/page/", "Azione"),
|
||||
Pair("$mainUrl/category/film/avventura/page/", "Avventura"),
|
||||
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(
|
||||
|
@ -178,56 +179,6 @@ class FilmpertuttiProvider : MainAPI() {
|
|||
}
|
||||
}
|
||||
|
||||
// to be updated when UnshortenUrl is ready
|
||||
suspend fun unshorten_linkup(uri: String): String {
|
||||
var r: NiceResponse? = null
|
||||
var uri = uri
|
||||
when {
|
||||
uri.contains("/tv/") -> uri = uri.replace("/tv/", "/tva/")
|
||||
uri.contains("delta") -> uri = uri.replace("/delta/", "/adelta/")
|
||||
(uri.contains("/ga/") || uri.contains("/ga2/")) -> uri =
|
||||
base64Decode(uri.split('/').last()).trim()
|
||||
uri.contains("/speedx/") -> uri =
|
||||
uri.replace("http://linkup.pro/speedx", "http://speedvideo.net")
|
||||
else -> {
|
||||
r = app.get(uri, allowRedirects = true)
|
||||
uri = r.url
|
||||
val link =
|
||||
Regex("<iframe[^<>]*src=\\'([^'>]*)\\'[^<>]*>").find(r.text)?.value
|
||||
?: Regex("""action="(?:[^/]+.*?/[^/]+/([a-zA-Z0-9_]+))">""").find(r.text)?.value
|
||||
?: Regex("""href","((.|\\n)*?)"""").findAll(r.text)
|
||||
.elementAtOrNull(1)?.groupValues?.get(1)
|
||||
|
||||
if (link != null) {
|
||||
uri = link
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val short = Regex("""^https?://.*?(https?://.*)""").find(uri)?.value
|
||||
if (short != null) {
|
||||
uri = short
|
||||
}
|
||||
if (r == null) {
|
||||
r = app.get(
|
||||
uri,
|
||||
allowRedirects = false
|
||||
)
|
||||
if (r.headers["location"] != null) {
|
||||
uri = r.headers["location"].toString()
|
||||
}
|
||||
}
|
||||
if (uri.contains("snip.")) {
|
||||
if (uri.contains("out_generator")) {
|
||||
uri = Regex("url=(.*)\$").find(uri)!!.value
|
||||
} else if (uri.contains("/decode/")) {
|
||||
uri = app.get(uri, allowRedirects = true).url
|
||||
}
|
||||
}
|
||||
return uri
|
||||
}
|
||||
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
|
@ -235,16 +186,8 @@ class FilmpertuttiProvider : MainAPI() {
|
|||
callback: (ExtractorLink) -> Unit
|
||||
): Boolean {
|
||||
tryParseJson<List<String>>(data)?.apmap { id ->
|
||||
if (id.contains("buckler")) {
|
||||
val id2 = unshorten_linkup(id).trim().replace("/v/", "/e/").replace("/f/", "/e/")
|
||||
loadExtractor(id2, data, subtitleCallback, callback)
|
||||
} else if (id.contains("isecure")) {
|
||||
val doc1 = app.get(id).document
|
||||
val id2 = doc1.selectFirst("iframe")!!.attr("src")
|
||||
loadExtractor(id2, data, subtitleCallback, callback)
|
||||
} else {
|
||||
loadExtractor(id, data, subtitleCallback, callback)
|
||||
}
|
||||
val link = ShortLink.unshorten(id).trim().replace("/v/", "/e/").replace("/f/", "/e/")
|
||||
loadExtractor(link, data, subtitleCallback, callback)
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -177,7 +177,7 @@ class StreamingcommunityProvider : MainAPI() {
|
|||
override suspend fun getMainPage(page: Int, categoryName: String, categoryData: String): HomePageResponse {
|
||||
val items = ArrayList<HomePageList>()
|
||||
val document = app.get(mainUrl).document
|
||||
document.select("slider-title").subList(0, 6).map { it ->
|
||||
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>()
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.utils.loadExtractor
|
|||
|
||||
class TantifilmProvider : MainAPI() {
|
||||
override var lang = "it"
|
||||
override var mainUrl = "https://www.tantifilm.nl"
|
||||
override var mainUrl = "https://tantifilm.autos"
|
||||
override var name = "Tantifilm"
|
||||
override val hasMainPage = true
|
||||
override val hasChromecastSupport = true
|
||||
|
@ -18,9 +18,9 @@ class TantifilmProvider : MainAPI() {
|
|||
)
|
||||
|
||||
override val mainPage = mainPageOf(
|
||||
Pair("$mainUrl/watch-genre/serie-tv/page/", "Serie Tv"),
|
||||
Pair("$mainUrl/watch-genre/azione/page/", "Azione"),
|
||||
Pair("$mainUrl/watch-genre/avventura/page/", "Avventura"),
|
||||
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(
|
||||
|
|
|
@ -30,6 +30,7 @@ object ShortLink {
|
|||
private val nuovoLinkRegex = """nuovolink\.com"""
|
||||
private val uprotRegex = """uprot\.net"""
|
||||
private val davisonbarkerRegex = """davisonbarker\.pro|lowrihouston\.pro"""
|
||||
private val isecureRegex = """isecure\.link"""
|
||||
|
||||
private val shortList = listOf(
|
||||
ShortUrl(adflyRegex, "adfly", ::unshortenAdfly),
|
||||
|
@ -39,6 +40,7 @@ object ShortLink {
|
|||
ShortUrl(nuovoLinkRegex, "nuovolink", ::unshortenNuovoLink),
|
||||
ShortUrl(uprotRegex, "uprot", ::unshortenUprot),
|
||||
ShortUrl(davisonbarkerRegex, "uprot", ::unshortenDavisonbarker),
|
||||
ShortUrl(isecureRegex, "isecure", ::unshortenIsecure),
|
||||
)
|
||||
|
||||
fun isShortLink(url: String): Boolean {
|
||||
|
@ -187,4 +189,8 @@ object ShortLink {
|
|||
fun unshortenDavisonbarker(uri: String): String {
|
||||
return URLDecoder.decode(uri.substringAfter("dest="))
|
||||
}
|
||||
suspend fun unshortenIsecure(uri: String): String {
|
||||
val doc = app.get(uri).document
|
||||
return doc.selectFirst("iframe")?.attr("src")?.trim()?: uri
|
||||
}
|
||||
}
|
|
@ -222,7 +222,7 @@
|
|||
"language": "it",
|
||||
"name": "Filmpertutti",
|
||||
"status": 1,
|
||||
"url": "https://filmpertutti.love"
|
||||
"url": "https://filmpertutti.photo"
|
||||
},
|
||||
"FmoviesToProvider": {
|
||||
"language": "en",
|
||||
|
@ -502,7 +502,7 @@
|
|||
"language": "it",
|
||||
"name": "Tantifilm",
|
||||
"status": 1,
|
||||
"url": "https://www.tantifilm.nl"
|
||||
"url": "https://tantifilm.autos"
|
||||
},
|
||||
"TenshiProvider": {
|
||||
"language": "en",
|
||||
|
|
Loading…
Reference in a new issue