mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
MainUrl fixes and sequentialMainPage (#32)
* mainUrl changes and sequentialMainPage
This commit is contained in:
parent
a535ba088d
commit
b25896d01a
6 changed files with 12 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 1
|
||||
version = 2
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -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("[")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue