g2thend

获取歌词

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

分类:

技术点:

相关文章:

  • 2021-12-31
  • 2019-01-07
  • 2021-08-17
  • 2021-12-07
  • 2021-07-13
  • 2021-08-14
  • 2021-08-18
  • 2022-01-13
猜你喜欢
  • 2021-10-17
  • 2021-10-25
  • 2021-05-28
  • 2021-11-06
  • 2021-10-04
  • 2021-10-14
  • 2022-01-27
相关资源
相似解决方案