From 72d27d983e43cd910d6f2ed383837a974b8f2570 Mon Sep 17 00:00:00 2001 From: xyz Date: Sat, 4 Sep 2021 19:53:43 -0700 Subject: refactor --- .local/bin/curlncm | 1 + 1 file changed, 1 insertion(+) (limited to '.local/bin') diff --git a/.local/bin/curlncm b/.local/bin/curlncm index 424249c3..d18f98d4 100755 --- a/.local/bin/curlncm +++ b/.local/bin/curlncm @@ -57,6 +57,7 @@ else # need to consider second page of djradio if [ -n "$rid" ]; then 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 '/' '_')" fi -- cgit v1.2.3-70-g09d2