summaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2021-09-09 01:44:39 -0700
committerxyz <gky44px1999@gmail.com>2021-09-09 01:44:39 -0700
commit53bccd9c504204e622340455f26839721ea1f2c0 (patch)
tree27248d22d495e5b58218273cebe1e1a11f1a6647 /.local
parent690506f61b8e658b4fbabf3087a842df08287741 (diff)
refactor
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/curlncm2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/curlncm b/.local/bin/curlncm
index b8ddb168..88e7d08d 100755
--- a/.local/bin/curlncm
+++ b/.local/bin/curlncm
@@ -59,7 +59,7 @@ else
data="$(curl -s -G --data-urlencode id="$rid" -d limit="$dj_max" 'https://music.163.com/djradio' | grep 'songlist\|tt f-thide' | sed -e 's/.*songlist-\(.*\)" class.*/\1/g' -e 's/.*title="\(.*\)".*/\1/g' | paste -sd '\t\n' | sort | tr '/' '_')"
# can only curl featured 50 songs for the artist, can improve
elif [ -n "$aid" ]; then
- data="$(curl -s -G --data-urlencode id="$aid" 'https://music.163.com/artist' | grep -E '\[\{.*\}\]' | sed -e 's/.*>\[{/\[{/' -e 's/}\]<.*/}\]/' | jq -r '.[]|[.id,.name]|@tsv' | sort | tr '/' '_')"
+ data="$(curl -s -G --data-urlencode id="$aid" 'https://music.163.com/artist' | grep '\[{.*}\]' | sed -e 's/.*>\[{/\[{/' -e 's/}\]<.*/}\]/' | jq -r '.[]|[.id,.name]|@tsv' | sort | tr '/' '_')"
fi
# awk code not print separator at beginning and end steal from:
# https://unix.stackexchange.com/a/581785/459013