anitubeinua: Fix ajax request for episode urls
This commit is contained in:
parent
eca14921b8
commit
0c99673a58
2 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 8
|
version = 9
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -37,6 +37,8 @@ class AnitubeinuaProvider : MainAPI() {
|
||||||
"$mainUrl/f/sort=rating/order=desc/page/" to "Популярні",
|
"$mainUrl/f/sort=rating/order=desc/page/" to "Популярні",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private var dle_login_hash = ""
|
||||||
|
|
||||||
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
|
override suspend fun getMainPage(page: Int, request: MainPageRequest): HomePageResponse {
|
||||||
val document = app.get(request.data + page).document
|
val document = app.get(request.data + page).document
|
||||||
|
|
||||||
|
@ -105,7 +107,7 @@ class AnitubeinuaProvider : MainAPI() {
|
||||||
val subEpisodes = mutableListOf<Episode>()
|
val subEpisodes = mutableListOf<Episode>()
|
||||||
val dubEpisodes = mutableListOf<Episode>()
|
val dubEpisodes = mutableListOf<Episode>()
|
||||||
val id = url.split("/").last().split("-").first()
|
val id = url.split("/").last().split("-").first()
|
||||||
val dle_login_hash = document.body().selectFirst("script")!!.html()
|
dle_login_hash = document.body().selectFirst("script")!!.html()
|
||||||
.substringAfterLast("dle_login_hash = '")
|
.substringAfterLast("dle_login_hash = '")
|
||||||
.substringBefore("';")
|
.substringBefore("';")
|
||||||
|
|
||||||
|
@ -188,10 +190,9 @@ class AnitubeinuaProvider : MainAPI() {
|
||||||
val dataList = data.split(", ")
|
val dataList = data.split(", ")
|
||||||
// Log.d("CakesTwix-Debug", data)
|
// Log.d("CakesTwix-Debug", data)
|
||||||
if (dataList[1].toIntOrNull() != null) { // Its ajax list
|
if (dataList[1].toIntOrNull() != null) { // Its ajax list
|
||||||
|
|
||||||
val ajax =
|
val ajax =
|
||||||
fromPlaylistAjax(
|
fromPlaylistAjax(
|
||||||
"$mainUrl/engine/ajax/playlists.php?news_id=${dataList[1]}&xfield=playlist&time=${Date().time}"
|
"$mainUrl/engine/ajax/playlists.php?news_id=${dataList[1]}&xfield=playlist&user_hash=$dle_login_hash"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Filter by name and isDub
|
// Filter by name and isDub
|
||||||
|
|
Loading…
Reference in a new issue