From c76043df2426ea2d82010bce7be5e1aa2fad62e0 Mon Sep 17 00:00:00 2001 From: CakesTwix Date: Sat, 9 Sep 2023 16:01:36 +0300 Subject: [PATCH] uakino: https://github.com/CakesTwix/cloudstream-extensions-uk/issues/26 --- UakinoProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/lagradost/UakinoProvider.kt | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/UakinoProvider/build.gradle.kts b/UakinoProvider/build.gradle.kts index 1e42a4d..c5a12fd 100644 --- a/UakinoProvider/build.gradle.kts +++ b/UakinoProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 4 +version = 5 cloudstream { diff --git a/UakinoProvider/src/main/kotlin/com/lagradost/UakinoProvider.kt b/UakinoProvider/src/main/kotlin/com/lagradost/UakinoProvider.kt index ff53a69..8af5eb2 100644 --- a/UakinoProvider/src/main/kotlin/com/lagradost/UakinoProvider.kt +++ b/UakinoProvider/src/main/kotlin/com/lagradost/UakinoProvider.kt @@ -1,5 +1,6 @@ package com.lagradost +import android.util.Log import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addActors import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer @@ -33,13 +34,17 @@ class UakinoProvider : MainAPI() { "$mainUrl/cartoon/cartoonseries/page/" to "Мультсеріали", ) + val blackUrls = "(/news/)|(/franchise/)" + override suspend fun getMainPage( page: Int, request: MainPageRequest ): HomePageResponse { val document = app.get(request.data + page).document - val home = document.select("div.owl-item, div.movie-item").map { - it.toSearchResponse() + val home = document.select("div.owl-item, div.movie-item") + .filterNot { el -> el.select("a.movie-title, a.full-movie").attr("href").contains(blackUrls) } + .map { + it.toSearchResponse() } return newHomePageResponse(request.name, home) }