From af928eb1be92b7f94b1aee9465f1d2396a3a9ddb Mon Sep 17 00:00:00 2001 From: hexated Date: Thu, 10 Nov 2022 20:19:40 +0700 Subject: [PATCH] fixed Time4tv schedule & fixed some Indonesian providers --- AnimeIndoProvider/build.gradle.kts | 4 ++-- .../src/main/kotlin/com/hexated/AnimeIndoProvider.kt | 4 ++-- NontonAnimeIDProvider/build.gradle.kts | 2 +- .../src/main/kotlin/com/hexated/NontonAnimeIDProvider.kt | 2 +- TimefourTv/build.gradle.kts | 2 +- TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt | 8 +++++--- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/AnimeIndoProvider/build.gradle.kts b/AnimeIndoProvider/build.gradle.kts index d9ea09fa..2b117d86 100644 --- a/AnimeIndoProvider/build.gradle.kts +++ b/AnimeIndoProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 2 +version = 3 cloudstream { @@ -23,5 +23,5 @@ cloudstream { "Anime", ) - iconUrl = "https://www.google.com/s2/favicons?domain=animeindo.fun&sz=%size%" + iconUrl = "https://www.google.com/s2/favicons?domain=animeindo.cfd&sz=%size%" } \ No newline at end of file diff --git a/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt b/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt index 323f5ed0..98a600ba 100644 --- a/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt +++ b/AnimeIndoProvider/src/main/kotlin/com/hexated/AnimeIndoProvider.kt @@ -10,7 +10,7 @@ import org.jsoup.Jsoup import org.jsoup.nodes.Element class AnimeIndoProvider : MainAPI() { - override var mainUrl = "https://animeindo.fun" + override var mainUrl = "https://animeindo.cfd" override var name = "AnimeIndo" override val hasMainPage = true override var lang = "id" @@ -40,7 +40,7 @@ class AnimeIndoProvider : MainAPI() { private suspend fun request(url: String): NiceResponse { val req = app.get( url, - cookies = mapOf("recaptcha_cookie" to "#Asia/Jakarta#-420#win32#Windows#0,false,false#Google Inc. (Intel)~ANGLE (Intel, Intel(R) HD Graphics 400 Direct3D11 vs_5_0 ps_5_0)") + headers = mapOf("Cookie" to "_ga_RHDMEL4EDM=GS1.1.1668082390.1.0.1668082390.0.0.0; _ga=GA1.1.916626312.1668082390") ) if (req.isSuccessful) { return req diff --git a/NontonAnimeIDProvider/build.gradle.kts b/NontonAnimeIDProvider/build.gradle.kts index 1af7c3ba..2ba63b33 100644 --- a/NontonAnimeIDProvider/build.gradle.kts +++ b/NontonAnimeIDProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 5 +version = 6 cloudstream { diff --git a/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProvider.kt b/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProvider.kt index 61321885..f72049b5 100644 --- a/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProvider.kt +++ b/NontonAnimeIDProvider/src/main/kotlin/com/hexated/NontonAnimeIDProvider.kt @@ -9,7 +9,7 @@ import org.jsoup.Jsoup import org.jsoup.nodes.Element class NontonAnimeIDProvider : MainAPI() { - override var mainUrl = "https://nontonanimeid.site" + override var mainUrl = "https://nontonanimeid.click" override var name = "NontonAnimeID" override val hasQuickSearch = false override val hasMainPage = true diff --git a/TimefourTv/build.gradle.kts b/TimefourTv/build.gradle.kts index d7f2d517..94baec33 100644 --- a/TimefourTv/build.gradle.kts +++ b/TimefourTv/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 6 +version = 7 cloudstream { diff --git a/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt b/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt index 5e24d44b..7086de59 100644 --- a/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt +++ b/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt @@ -6,6 +6,7 @@ import com.lagradost.cloudstream3.utils.AppUtils import com.lagradost.cloudstream3.utils.AppUtils.toJson import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.Qualities +import org.jsoup.Jsoup import org.jsoup.nodes.Element open class TimefourTv : MainAPI() { @@ -90,11 +91,12 @@ open class TimefourTv : MainAPI() { val doc = app.get("$mainUrl/schedule.php").document val episode = - doc.selectFirst("div.search_p h2:contains($name)")?.nextElementSibling()?.select("span") - ?.mapIndexedNotNull { index, ele -> + doc.selectFirst("div.search_p h2:contains($name)")?.nextElementSiblings()?.toString() + ?.substringBefore(" val title = ele.select("a").text() val href = ele.select("a").attr("href") - val desc = ele.parent()?.textNodes()?.get(index).toString() + val desc = ele.parent()?.textNodes()?.getOrNull(index)?.toString() Episode( href, title,