Skip to content

ylw1997/qqmusic-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qqmusicapi

QQ 音乐 API 文档和测试仓库。

内容

  • docs/apis/*.md: 每个 API 一份 Markdown 文档
  • tests/qqmusic_api_test.py: Python 测试客户端
  • .github/workflows/check.yml: 基础语法校验

当前支持接口

凭据

公开读接口不需要凭据。用户相关、VIP 播放链接、我的歌单等接口需要:

$env:QQMUSIC_MUSICID="你的 musicid"
$env:QQMUSIC_MUSICKEY="你的 musickey"

脚本不会把凭据写入文件。

扫码登录

支持微信扫码登录。脚本会保存并打开二维码图片,扫码确认后自动轮询并输出 userInfo.musiciduserInfo.musickey,之后可以把它们设置为环境变量调用用户相关接口。

python tests/qqmusic_api_test.py wx-login

只获取二维码,不自动轮询:

python tests/qqmusic_api_test.py wx-login-qr
python tests/qqmusic_api_test.py qq-login-qr

拿到凭据后:

$env:QQMUSIC_MUSICID="扫码返回的 musicid"
$env:QQMUSIC_MUSICKEY="扫码返回的 musickey"
python tests/qqmusic_api_test.py user-info

测试

cd APIS/qqmusicapi
python tests/qqmusic_api_test.py all

单独测试:

python tests/qqmusic_api_test.py search-songs --keyword "周杰伦"
python tests/qqmusic_api_test.py song-detail --mid 0039MnYb0qxYhV
python tests/qqmusic_api_test.py lyric --mid 0039MnYb0qxYhV
python tests/qqmusic_api_test.py rank-lists

写入类接口默认 dry-run,必须显式加 --execute 才会真实调用:

python tests/qqmusic_api_test.py add-songs --dirid 201 --song-id 123 --execute

文档

docs/README.md

About

qq音乐的api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages