This commit is contained in:
parent
e993ef6e2d
commit
dd74d87cd8
3 changed files with 38 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 6
|
||||
version = 7
|
||||
|
||||
dependencies{
|
||||
implementation("com.google.code.gson:gson:2.9.0")
|
||||
|
|
|
@ -25,6 +25,7 @@ import com.lagradost.cloudstream3.toRatingInt
|
|||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||
import com.lagradost.cloudstream3.utils.M3u8Helper
|
||||
import com.lagradost.models.PlayerJson
|
||||
import com.lagradost.models.Search
|
||||
import org.jsoup.nodes.Element
|
||||
|
||||
|
||||
|
@ -38,7 +39,7 @@ class HigoTVProvider : MainAPI() {
|
|||
override val hasDownloadSupport = true
|
||||
override val supportedTypes = setOf(TvType.Anime)
|
||||
|
||||
private val searchUrl = "https://higotv.fun/search/doSearch"
|
||||
private val searchUrl = "$mainUrl/search?query="
|
||||
|
||||
// Sections
|
||||
override val mainPage =
|
||||
|
@ -62,6 +63,7 @@ class HigoTVProvider : MainAPI() {
|
|||
private val ratingSelector = ".rt-tb"
|
||||
|
||||
private val listPlayer = object : TypeToken<List<PlayerJson>>() {}.type
|
||||
private val listSearch = object : TypeToken<List<Search>>() {}.type
|
||||
|
||||
private val TAG = "$name-Debug"
|
||||
|
||||
|
@ -90,9 +92,14 @@ class HigoTVProvider : MainAPI() {
|
|||
}
|
||||
|
||||
override suspend fun search(query: String): List<SearchResponse> {
|
||||
val document = app.post(url = searchUrl, data = mapOf("keyword" to query)).document
|
||||
|
||||
return document.select(animeSelector).map { it.toSearchResponse() }
|
||||
val document = app.get(searchUrl + query).text
|
||||
return gson.fromJson<List<Search>>(document, listSearch).map {
|
||||
newAnimeSearchResponse(it.name, "$mainUrl/movies/view/${it.slug}", TvType.Anime) {
|
||||
// this.otherName = engTitle
|
||||
this.posterUrl = it.poster
|
||||
addDubStatus(isDub = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Detailed information
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
package com.lagradost.models
|
||||
|
||||
data class Search (
|
||||
|
||||
val id : Int,
|
||||
val slug : String,
|
||||
val name : String,
|
||||
val longname : String,
|
||||
val engname : String,
|
||||
val age : String,
|
||||
val genre : String,
|
||||
val year : Int,
|
||||
val add_date : String,
|
||||
val country : String,
|
||||
val flagicon : String,
|
||||
val regiser : String,
|
||||
val studio : String,
|
||||
val serii : String,
|
||||
val stan : String,
|
||||
val rating : Int,
|
||||
val description : String,
|
||||
val info_pro_anime : String,
|
||||
val poster : String,
|
||||
val trailer : String,
|
||||
val typeofanime : String,
|
||||
)
|
Loading…
Reference in a new issue