MainUrl fixes and sequentialMainPage (#32)

* mainUrl changes and sequentialMainPage
This commit is contained in:
antonydp 2022-10-09 02:39:16 +02:00 committed by GitHub
parent a535ba088d
commit b25896d01a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 14 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 1
version = 2
cloudstream {

View file

@ -9,7 +9,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.html
class AltadefinizioneProvider : MainAPI() {
override var lang = "it"
override var mainUrl = "https://altadefinizione.tienda"
override var mainUrl = "https://altadefinizione.clinic"
override var name = "Altadefinizione"
override val hasMainPage = true
override val hasChromecastSupport = true

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 1
version = 2
cloudstream {

View file

@ -15,19 +15,19 @@ 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 var mainUrl = "https://filmpertutti.sbs"
override var name = "FilmPerTutti"
override val hasMainPage = true
override val hasChromecastSupport = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries
)
override var sequentialMainPage = true
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"),
Pair("$mainUrl/prime-visioni/", "Ultime uscite")
)
override suspend fun getMainPage(
@ -35,8 +35,7 @@ class FilmpertuttiProvider : MainAPI() {
request: MainPageRequest
): HomePageResponse {
val url = request.data + page
val soup = app.get(url).document
val soup = app.get(url, referer = mainUrl).document
val home = soup.select("ul.posts > li").map {
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
.substringBeforeLast("[")

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 2
version = 3
cloudstream {

View file

@ -1,15 +1,13 @@
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
import org.jsoup.nodes.Element
class IlGenioDelloStreamingProvider : MainAPI() {
@ -18,6 +16,7 @@ class IlGenioDelloStreamingProvider : MainAPI() {
override var name = "IlGenioDelloStreaming"
override val hasMainPage = true
override val hasChromecastSupport = true
override var sequentialMainPage = true
override val supportedTypes = setOf(
TvType.Movie,
TvType.TvSeries,
@ -126,7 +125,7 @@ class IlGenioDelloStreamingProvider : MainAPI() {
name = "$epName ${subtag.uppercase()}",
episode = seasonNo?.text()?.substringAfter("x")?.filter { it.isDigit() }?.toIntOrNull()
))
))
}