From 30d77715e3b0022fd16fd3221d29e437d59b2fa9 Mon Sep 17 00:00:00 2001 From: Jianhui Yuan Xu <107997665+NeumoNeumo@users.noreply.github.com> Date: Wed, 21 Aug 2024 23:41:24 +0800 Subject: [PATCH] Fix: json parse error when `video` is in the json response --- client/plik.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/plik.sh b/client/plik.sh index 76d6ccb0..7d3c21f0 100755 --- a/client/plik.sh +++ b/client/plik.sh @@ -12,8 +12,7 @@ set -e green='\e[0;32m' endColor='\e[0m' function jsonValue() { - KEY=$1 - sed -e "s/,/\n/g" | sed -e "s/[\"{}]//g" | grep $KEY | cut -d ":" -f2- + echo $(cat | sed -n "s/.*\"$1\":\"\([^\"]*\)\".*/\1/p") } function qecho(){