From 9b7996ae7293fe269fe5b8531fbf8442124b1484 Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 4 Sep 2021 02:09:23 -0700 Subject: refactor --- .local/bin/curlkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/curlkg b/.local/bin/curlkg index dfd7d077..9924d209 100755 --- a/.local/bin/curlkg +++ b/.local/bin/curlkg @@ -26,7 +26,7 @@ download_dir="${1:-"$PWD"}" get_json () { - curl -s -G --data-urlencode type=get_uinfo -d outCharset=utf-8 -d start="$1" -d num=$num -d share_uid="$uid" "$homepage_url" | sed -e 's/^MusicJsonCallback(//' -e 's/)$//' + curl -s -G --data-urlencode type=get_uinfo -d outCharset=utf-8 -d start="$1" -d num=$num -d share_uid="$uid" "$homepage_url" | sed 's/.*({\(.*\)}).*/{\1}/' } # is it possible not to write to a file? only pipe stdout? should I? -- cgit v1.2.3-70-g09d2