From 18c07cc0693550fb3e7f0936aa4095a210e3c0c8 Mon Sep 17 00:00:00 2001 From: sora Date: Sun, 10 Sep 2023 19:56:48 +0700 Subject: [PATCH] TimefourTv: added search page --- TimefourTv/build.gradle.kts | 2 +- TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/TimefourTv/build.gradle.kts b/TimefourTv/build.gradle.kts index 8194a3f8..41074ab6 100644 --- a/TimefourTv/build.gradle.kts +++ b/TimefourTv/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 17 +version = 18 cloudstream { diff --git a/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt b/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt index 2ecb947b..690a5b8d 100644 --- a/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt +++ b/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt @@ -110,6 +110,13 @@ open class TimefourTv : MainAPI() { } + override suspend fun search(query: String): List { + val document = app.get("$daddyUrl/24-7-channels.php").document + return document.select("div.grid-container div.grid-item:contains($query)").mapNotNull { + it.toSearchDaddy() + } + } + private suspend fun loadSchedule(url: String): LoadResponse { val name = url.removePrefix("$mainUrl/") val doc = app.get("$mainUrl/schedule.php").document