Merge remote-tracking branch 'origin/master'

This commit is contained in:
LagradOst 2022-06-21 02:31:03 +02:00
commit 1a5439143c
9 changed files with 264 additions and 8 deletions

View file

@ -92,6 +92,7 @@ object APIHolder {
TantifilmProvider(), TantifilmProvider(),
CineblogProvider(), CineblogProvider(),
AltadefinizioneProvider(), AltadefinizioneProvider(),
FilmpertuttiProvider(),
HDMovie5(), HDMovie5(),
RebahinProvider(), RebahinProvider(),
LayarKacaProvider(), LayarKacaProvider(),

View file

@ -14,6 +14,9 @@ class DoodCxExtractor : DoodLaExtractor() {
class DoodShExtractor : DoodLaExtractor() { class DoodShExtractor : DoodLaExtractor() {
override var mainUrl = "https://dood.sh" override var mainUrl = "https://dood.sh"
} }
class DoodWatchExtractor : DoodLaExtractor() {
override var mainUrl = "https://dood.watch"
}
class DoodPmExtractor : DoodLaExtractor() { class DoodPmExtractor : DoodLaExtractor() {
override var mainUrl = "https://dood.pm" override var mainUrl = "https://dood.pm"

View file

@ -10,6 +10,9 @@ class MixDropBz : MixDrop(){
class MixDropCh : MixDrop(){ class MixDropCh : MixDrop(){
override var mainUrl = "https://mixdrop.ch" override var mainUrl = "https://mixdrop.ch"
} }
class MixDropTo : MixDrop(){
override var mainUrl = "https://mixdrop.to"
}
open class MixDrop : ExtractorApi() { open class MixDrop : ExtractorApi() {
override var name = "MixDrop" override var name = "MixDrop"

View file

@ -114,7 +114,7 @@ class AltadefinizioneProvider : MainAPI() {
val tags: List<String> = document.select("#details > li:nth-child(1) > a").map { 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") val trailerurl = document.selectFirst("#showtrailer > div > div > iframe")?.attr("src")
return newMovieLoadResponse( return newMovieLoadResponse(
title, title,

View file

@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
class CineblogProvider : MainAPI() { class CineblogProvider : MainAPI() {
override var lang = "it" override var lang = "it"
override var mainUrl = "https://cb01.rip" override var mainUrl = "https://cb01.rip"
@ -28,6 +29,7 @@ class CineblogProvider : MainAPI() {
val home = soup.select("article.item.movies").map { val home = soup.select("article.item.movies").map {
val title = it.selectFirst("div.data > h3 > a")!!.text().substringBefore("(") val title = it.selectFirst("div.data > h3 > a")!!.text().substringBefore("(")
val link = it.selectFirst("div.poster > a")!!.attr("href") val link = it.selectFirst("div.poster > a")!!.attr("href")
val quality = getQualityFromString(it.selectFirst("span.quality")?.text())
TvSeriesSearchResponse( TvSeriesSearchResponse(
title, title,
link, link,
@ -36,6 +38,7 @@ class CineblogProvider : MainAPI() {
it.selectFirst("img")!!.attr("src"), it.selectFirst("img")!!.attr("src"),
null, null,
null, null,
quality = quality
) )
} }
@ -82,8 +85,7 @@ class CineblogProvider : MainAPI() {
href, href,
this.name, this.name,
TvType.Movie, TvType.Movie,
poster, poster
null
) )
} }
@ -96,7 +98,6 @@ class CineblogProvider : MainAPI() {
val title = document.selectFirst("div.data > h1")!!.text().substringBefore("(") val title = document.selectFirst("div.data > h1")!!.text().substringBefore("(")
val description = document.select("#info > div.wp-content > p").html().toString() val description = document.select("#info > div.wp-content > p").html().toString()
val rating = null val rating = null
var year = document.selectFirst(" div.data > div.extra > span.date")!!.text().substringAfter(",") var year = document.selectFirst(" div.data > div.extra > span.date")!!.text().substringAfter(",")
.filter { it.isDigit() } .filter { it.isDigit() }
if (year.length > 4) { if (year.length > 4) {
@ -114,8 +115,7 @@ class CineblogProvider : MainAPI() {
href, href,
this.name, this.name,
TvType.Movie, TvType.Movie,
posterUrl, posterUrl
null
) )
} }

View file

@ -0,0 +1,240 @@
package com.lagradost.cloudstream3.movieproviders
import androidx.core.text.parseAsHtml
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.mvvm.logError
import com.lagradost.cloudstream3.app
import com.lagradost.cloudstream3.utils.*
import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.LoadResponse.Companion.addRating
import com.lagradost.cloudstream3.utils.AppUtils.toJson
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.nicehttp.NiceResponse
import org.jsoup.nodes.Element
class FilmpertuttiProvider : MainAPI() {
override var lang = "it"
override var mainUrl = "https://www.filmpertutti.buzz"
override var name = "Filmpertutti"
override val hasMainPage = true
override val hasChromecastSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries
)
override suspend fun getMainPage(): HomePageResponse {
val items = ArrayList<HomePageList>()
val urls = listOf(
Pair("$mainUrl/category/serie-tv/", "Serie Tv"),
Pair("$mainUrl/category/film/azione/", "Azione"),
Pair("$mainUrl/category/film/avventura/", "Avventura"),
)
for ((url, name) in urls) {
try {
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
}
}
items.add(HomePageList(name, home))
} catch (e: Exception) {
logError(e)
}
}
if (items.size <= 0) throw ErrorLoadingException()
return HomePageResponse(items)
}
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()?.parseAsHtml().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{it.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)
}
}
}
// 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,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit
): Boolean {
tryParseJson<List<String>>(data)?.forEach { id ->
if (id.contains("buckler")){
val id2 = unshorten_linkup(id).trim().replace("/v/","/e/").replace("/f/","/e/")
loadExtractor(id2, data, callback)
}
else if (id.contains("isecure")){
val doc1 = app.get(id).document
val id2 = doc1.selectFirst("iframe")!!.attr("src")
loadExtractor(id2, data, callback)
}
else{
loadExtractor(id, data, callback)
}
}
return true
}
}

View file

@ -9,7 +9,7 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
class TantifilmProvider : MainAPI() { class TantifilmProvider : MainAPI() {
override var lang = "it" override var lang = "it"
override var mainUrl = "https://www.tantifilm.rodeo" override var mainUrl = "https://www.tantifilm.pics"
override var name = "Tantifilm" override var name = "Tantifilm"
override val hasMainPage = true override val hasMainPage = true
override val hasChromecastSupport = true override val hasChromecastSupport = true

View file

@ -140,6 +140,8 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
//mixdrop extractors //mixdrop extractors
MixDropBz(), MixDropBz(),
MixDropCh(), MixDropCh(),
MixDropTo(),
MixDrop(), MixDrop(),
Mcloud(), Mcloud(),
@ -186,6 +188,7 @@ val extractorApis: Array<ExtractorApi> = arrayOf(
DoodLaExtractor(), DoodLaExtractor(),
DoodWsExtractor(), DoodWsExtractor(),
DoodShExtractor(), DoodShExtractor(),
DoodWatchExtractor(),
AsianLoad(), AsianLoad(),

View file

@ -184,6 +184,12 @@
"status": 1, "status": 1,
"url": "https://filman.cc" "url": "https://filman.cc"
}, },
"FilmpertuttiProvider": {
"language": "it",
"name": "Filmpertutti",
"status": 1,
"url": "https://www.filmpertutti.buzz"
},
"FmoviesToProvider": { "FmoviesToProvider": {
"language": "en", "language": "en",
"name": "Fmovies.to", "name": "Fmovies.to",
@ -420,7 +426,7 @@
"language": "it", "language": "it",
"name": "Tantifilm", "name": "Tantifilm",
"status": 1, "status": 1,
"url": "https://www.tantifilm.rodeo" "url": "https://www.tantifilm.pics"
}, },
"TenshiProvider": { "TenshiProvider": {
"language": "en", "language": "en",