mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
fixed home 123tv
This commit is contained in:
parent
531a12d217
commit
a6db92b2d4
1 changed files with 18 additions and 9 deletions
|
@ -30,21 +30,30 @@ class OnetwothreeTv : MainAPI() {
|
||||||
|
|
||||||
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
|
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
|
||||||
|
|
||||||
val document = if(request.name.contains("USA")) {
|
val document = if (request.name.contains("USA")) {
|
||||||
app.post( "$mainUrl/wp-admin/admin-ajax.php" , data = mapOf(
|
app.post(
|
||||||
"action" to "_123tv_load_more_videos_from_category",
|
"$mainUrl/wp-admin/admin-ajax.php", data = mapOf(
|
||||||
"cat_id" to request.data,
|
"action" to "_123tv_load_more_videos_from_category",
|
||||||
"page_num" to "${page.minus(1)}"
|
"cat_id" to request.data,
|
||||||
), headers = mapOf(
|
"page_num" to "${page.minus(1)}"
|
||||||
"X-Requested-With" to "XMLHttpRequest"
|
), headers = mapOf(
|
||||||
)).document
|
"X-Requested-With" to "XMLHttpRequest"
|
||||||
|
)
|
||||||
|
).document
|
||||||
} else {
|
} else {
|
||||||
app.get(request.data).document
|
app.get(request.data).document
|
||||||
}
|
}
|
||||||
val home = document.select("div.col-md-3.col-sm-6").mapNotNull {
|
val home = document.select("div.col-md-3.col-sm-6").mapNotNull {
|
||||||
it.toSearchResult()
|
it.toSearchResult()
|
||||||
}
|
}
|
||||||
return newHomePageResponse(request.name, home)
|
return newHomePageResponse(
|
||||||
|
list = HomePageList(
|
||||||
|
name = request.name,
|
||||||
|
list = home,
|
||||||
|
isHorizontalImages = true
|
||||||
|
),
|
||||||
|
hasNext = true
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue