small fix

This commit is contained in:
hexated 2023-08-30 03:38:46 +07:00
parent 61f728cad1
commit 9b2205ba89
2 changed files with 5 additions and 9 deletions

View file

@ -200,10 +200,10 @@ class IdlixProvider : MainAPI() {
it.attr("data-nume")
}.apmap { nume ->
safeApiCall {
val source = app.get(
url = "$directUrl/wp-json/dooplayer/v2/$id/$type/$nume",
headers = mapOf("X-Requested-With" to "XMLHttpRequest"),
referer = data
val source = app.post(
url = "$directUrl/wp-admin/admin-ajax.php", data = mapOf(
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
), headers = mapOf("X-Requested-With" to "XMLHttpRequest"), referer = data
).let { tryParseJson<ResponseHash>(it.text) } ?: return@safeApiCall
var decrypted = AesHelper.cryptoAESHandler(source.embed_url,source.key.toByteArray(), false)?.fixBloat() ?: return@safeApiCall

View file

@ -472,11 +472,7 @@ object SoraExtractor : SoraStream() {
it.attr("data-type")
)
}.apmap { (id, nume, type) ->
val json = if(encrypt) app.get(
url = "$referer/wp-json/dooplayer/v2/$id/$type/$nume",
headers = headers,
referer = url
) else app.post(
val json = app.post(
url = "$referer/wp-admin/admin-ajax.php", data = mapOf(
"action" to "doo_player_ajax", "post" to id, "nume" to nume, "type" to type
), headers = headers, referer = url