add jq as dependency for json parsing

This commit is contained in:
ksyasuda 2022-01-15 02:00:14 -08:00
parent 44438b3a47
commit 86531b3a59

View File

@ -92,7 +92,7 @@ decrypt_link() {
logger "ajax -> $ajax" > /dev/stderr logger "ajax -> $ajax" > /dev/stderr
#send the request to the ajax url #send the request to the ajax url
curl -s -H 'x-requested-with:XMLHttpRequest' "$ajax_url" -d "id=$ajax" -d "time=69420691337800813569" | tr '"' '\n' | sed -nE 's/.*cdn\.com.*/\0/p' | sed 's/\\//g' curl -s -H 'x-requested-with:XMLHttpRequest' "$ajax_url" -d "id=$ajax" -d "time=69420691337800813569" | jq -r '.source[].file'
logger "END: decrypt_link()" > /dev/stderr logger "END: decrypt_link()" > /dev/stderr
} }
@ -847,7 +847,7 @@ while getopts 'hd:Hsvq:c-:f:t:T:CQ:D:' OPT; do
done done
shift $((OPTIND - 1)) shift $((OPTIND - 1))
dep_ch "$player_fn" "curl" "sed" "grep" "sqlite3" "rofi" "git" "aria2c" dep_ch "$player_fn" "curl" "sed" "grep" "sqlite3" "rofi" "git" "aria2c" "jq"
######## ########
# main # # main #