mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fix #254
This commit is contained in:
parent
62d9783705
commit
f511569c34
8 changed files with 137 additions and 33 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 15
|
||||
version = 16
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -9,7 +9,7 @@ import org.jsoup.nodes.Element
|
|||
import java.net.URLDecoder
|
||||
|
||||
class LayarKacaProvider : MainAPI() {
|
||||
override var mainUrl = "https://tv1.lk21official.pro"
|
||||
override var mainUrl = "https://tv3.lk21official.pro"
|
||||
private var seriesUrl = "https://tv1.nontondrama.click"
|
||||
override var name = "LayarKaca"
|
||||
override val hasMainPage = true
|
||||
|
@ -72,11 +72,11 @@ class LayarKacaProvider : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val document = app.get("$mainUrl/?s=$query").document
|
||||
return document.select("div.search-item").map {
|
||||
val title = it.selectFirst("h2 > a")!!.text().trim()
|
||||
val href = fixUrl(it.selectFirst("a")!!.attr("href"))
|
||||
val posterUrl = fixUrl(it.selectFirst("img.img-thumbnail")?.attr("src").toString())
|
||||
val document = app.get("$mainUrl/search.php?s=$query").document
|
||||
return document.select("div.search-item").mapNotNull {
|
||||
val title = it.selectFirst("a")?.attr("title") ?: ""
|
||||
val href = fixUrl(it.selectFirst("a")?.attr("href") ?: return@mapNotNull null)
|
||||
val posterUrl = fixUrlNull(it.selectFirst("img.img-thumbnail")?.attr("src"))
|
||||
newTvSeriesSearchResponse(title, href, TvType.TvSeries) {
|
||||
this.posterUrl = posterUrl
|
||||
}
|
||||
|
@ -172,8 +172,6 @@ class LayarKacaProvider : MainAPI() {
|
|||
return app.get(this, referer = "$seriesUrl/").document.select("div.embed iframe").attr("src")
|
||||
}
|
||||
|
||||
private fun decode(input: String): String = URLDecoder.decode(input, "utf-8").replace(" ", "%20")
|
||||
|
||||
}
|
||||
|
||||
open class Emturbovid : ExtractorApi() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue