获取歌词
import requests
import json
headers = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36',
'Referer': 'https://music.163.com/'
}
##可能会获取不到歌词
res = requests.get("https://music.163.com/api/song/lyric?id=521784134&lv=1&kv=1&tv=-1", headers=headers)
s = json.loads(res.text)
print(s['lrc']['lyric'])
https://www.cnblogs.com/weixuqin/p/8905867.html
https://www.zhihu.com/question/36081767
http://music.163.com/api/v1/resource/comments/R_SO_4_516997458