diff options
author | xyz <gky44px1999@gmail.com> | 2021-09-04 19:53:43 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-09-04 19:53:43 -0700 |
commit | 72d27d983e43cd910d6f2ed383837a974b8f2570 (patch) | |
tree | f4a97eea97e23449bf0702b8e07fc20beeb6a8db /.local | |
parent | bce097ec8b355a2e26ad745e271506fcdd0c0d96 (diff) |
refactor
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/curlncm | 1 |
1 files changed, 1 insertions, 0 deletions
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 |