mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
film per tutti ?
This commit is contained in:
parent
3e1a26ab89
commit
82490b9ce3
1 changed files with 5 additions and 5 deletions
|
@ -16,7 +16,7 @@ import com.lagradost.cloudstream3.network.CloudflareKiller
|
||||||
|
|
||||||
class FilmpertuttiProvider : MainAPI() {
|
class FilmpertuttiProvider : MainAPI() {
|
||||||
override var lang = "it"
|
override var lang = "it"
|
||||||
override var mainUrl = "https://filmpertutti.sbs"
|
override var mainUrl = "https://filmpertutti.hair"
|
||||||
override var name = "FilmPerTutti"
|
override var name = "FilmPerTutti"
|
||||||
override val hasMainPage = true
|
override val hasMainPage = true
|
||||||
override val hasChromecastSupport = true
|
override val hasChromecastSupport = true
|
||||||
|
@ -31,13 +31,13 @@ class FilmpertuttiProvider : MainAPI() {
|
||||||
Pair("$mainUrl/prime-visioni/", "Ultime uscite")
|
Pair("$mainUrl/prime-visioni/", "Ultime uscite")
|
||||||
)
|
)
|
||||||
|
|
||||||
private val interceptor = CloudflareKiller()
|
// private val interceptor = CloudflareKiller()
|
||||||
override suspend fun getMainPage(
|
override suspend fun getMainPage(
|
||||||
page: Int,
|
page: Int,
|
||||||
request: MainPageRequest
|
request: MainPageRequest
|
||||||
): HomePageResponse {
|
): HomePageResponse {
|
||||||
val url = request.data + page
|
val url = request.data + page
|
||||||
val soup = app.get(url, interceptor = interceptor, referer = mainUrl).document
|
val soup = app.get(url, referer = mainUrl).document // interceptor = interceptor
|
||||||
val home = soup.select("ul.posts > li").map {
|
val home = soup.select("ul.posts > li").map {
|
||||||
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
|
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
|
||||||
.substringBeforeLast("[")
|
.substringBeforeLast("[")
|
||||||
|
@ -64,7 +64,7 @@ class FilmpertuttiProvider : MainAPI() {
|
||||||
override suspend fun search(query: String): List<SearchResponse> {
|
override suspend fun search(query: String): List<SearchResponse> {
|
||||||
val queryformatted = query.replace(" ", "+")
|
val queryformatted = query.replace(" ", "+")
|
||||||
val url = "$mainUrl/?s=$queryformatted"
|
val url = "$mainUrl/?s=$queryformatted"
|
||||||
val doc = app.get(url, interceptor = interceptor).document
|
val doc = app.get(url).document // interceptor = interceptor
|
||||||
return doc.select("ul.posts > li").map {
|
return doc.select("ul.posts > li").map {
|
||||||
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
|
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
|
||||||
.substringBeforeLast("[")
|
.substringBeforeLast("[")
|
||||||
|
@ -83,7 +83,7 @@ class FilmpertuttiProvider : MainAPI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun load(url: String): LoadResponse {
|
override suspend fun load(url: String): LoadResponse {
|
||||||
val document = app.get(url, interceptor = interceptor).document
|
val document = app.get(url).document // interceptor = interceptor
|
||||||
val type =
|
val type =
|
||||||
if (document.selectFirst("a.taxonomy.category")!!.attr("href").contains("serie-tv")
|
if (document.selectFirst("a.taxonomy.category")!!.attr("href").contains("serie-tv")
|
||||||
.not()
|
.not()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue