Created
March 13, 2021 22:16
-
-
Save TianyiShi2001/41c692021896b9a78db9a95457129d2b to your computer and use it in GitHub Desktop.
Download .lrc lyrics from NetEase Music
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USAGE="USAGE: ${0##*/} music_id [output_file] " | |
[[ $# -lt 1 || $1 == '-h' || $1 == '--help' ]] && echo $USAGE && exit 1 | |
ID=$1 | |
OUT=${2:-_lyric.lrc} | |
curl http://music.163.com/api/song/media?id=${ID} | | |
jq -r '.lyric' | | |
sed 's/\\n/\n/g' | | |
sed 's/\\"/"/g' >${OUT} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment