mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
CineBlog01Provider, Guardaserie fix and small generic fixes (#34)
This commit is contained in:
parent
5db1331939
commit
5aa10f47aa
12 changed files with 247 additions and 178 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 2
|
||||
version = 3
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.lagradost.cloudstream3.utils.ShortLink
|
|||
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||
import org.jsoup.nodes.Element
|
||||
import com.lagradost.cloudstream3.utils.AppUtils.html
|
||||
import com.lagradost.cloudstream3.network.CloudflareKiller
|
||||
|
||||
|
||||
class FilmpertuttiProvider : MainAPI() {
|
||||
|
@ -30,12 +31,13 @@ class FilmpertuttiProvider : MainAPI() {
|
|||
Pair("$mainUrl/prime-visioni/", "Ultime uscite")
|
||||
)
|
||||
|
||||
private val interceptor = CloudflareKiller()
|
||||
override suspend fun getMainPage(
|
||||
page: Int,
|
||||
request: MainPageRequest
|
||||
): HomePageResponse {
|
||||
val url = request.data + page
|
||||
val soup = app.get(url, referer = mainUrl).document
|
||||
val soup = app.get(url, interceptor = interceptor, referer = mainUrl).document
|
||||
val home = soup.select("ul.posts > li").map {
|
||||
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
|
||||
.substringBeforeLast("[")
|
||||
|
@ -62,7 +64,7 @@ class FilmpertuttiProvider : MainAPI() {
|
|||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val queryformatted = query.replace(" ", "+")
|
||||
val url = "$mainUrl/?s=$queryformatted"
|
||||
val doc = app.get(url).document
|
||||
val doc = app.get(url, interceptor = interceptor).document
|
||||
return doc.select("ul.posts > li").map {
|
||||
val title = it.selectFirst("div.title")!!.text().substringBeforeLast("(")
|
||||
.substringBeforeLast("[")
|
||||
|
@ -81,7 +83,7 @@ class FilmpertuttiProvider : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun load(url: String): LoadResponse {
|
||||
val document = app.get(url).document
|
||||
val document = app.get(url, interceptor = interceptor).document
|
||||
val type =
|
||||
if (document.selectFirst("a.taxonomy.category")!!.attr("href").contains("serie-tv")
|
||||
.not()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue