qqmusic-api-python 0.1.10__tar.gz → 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- qqmusic_api_python-0.2.0/.gitignore +178 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/PKG-INFO +29 -39
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/README.md +15 -26
- qqmusic_api_python-0.2.0/pyproject.toml +100 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/__init__.py +5 -3
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/album.py +2 -2
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/album.json +22 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/login.json +196 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/lyric.json +25 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/mv.json +26 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/search.json +74 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/singer.json +48 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/song.json +118 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/songlist.json +17 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/top.json +20 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/api/user.json +171 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/file_type.json +58 -0
- qqmusic_api_python-0.2.0/qqmusic_api/data/search_type.json +11 -0
- qqmusic_api_python-0.2.0/qqmusic_api/exceptions/__init__.py +17 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/exceptions/api_exception.py +8 -1
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/login.py +14 -18
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/login_utils.py +1 -1
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/lyric.py +2 -2
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/mv.py +1 -1
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/search.py +6 -7
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/singer.py +1 -1
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/song.py +25 -26
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/songlist.py +1 -1
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/top.py +1 -1
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/user.py +6 -7
- qqmusic_api_python-0.1.10/qqmusic_api/utils/utils.py → qqmusic_api_python-0.2.0/qqmusic_api/utils/common.py +16 -4
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/utils/credential.py +18 -2
- qqmusic_api_python-0.2.0/qqmusic_api/utils/device.py +99 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/utils/network.py +54 -87
- qqmusic_api_python-0.2.0/qqmusic_api/utils/qimei.py +157 -0
- qqmusic_api_python-0.2.0/qqmusic_api/utils/session.py +162 -0
- qqmusic_api_python-0.2.0/qqmusic_api/utils/sign.py +67 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/utils/sync.py +2 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/conftest.py +3 -2
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_login.py +1 -1
- qqmusic_api_python-0.2.0/tests/test_qimei.py +6 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_search.py +3 -1
- qqmusic_api_python-0.2.0/tests/test_sign.py +13 -0
- qqmusic_api_python-0.1.10/pyproject.toml +0 -148
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/album.json +0 -22
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/login.json +0 -196
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/lyric.json +0 -25
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/mv.json +0 -26
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/search.json +0 -74
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/singer.json +0 -48
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/song.json +0 -118
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/songlist.json +0 -17
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/top.json +0 -20
- qqmusic_api_python-0.1.10/qqmusic_api/data/api/user.json +0 -171
- qqmusic_api_python-0.1.10/qqmusic_api/data/file_type.json +0 -58
- qqmusic_api_python-0.1.10/qqmusic_api/data/search_type.json +0 -11
- qqmusic_api_python-0.1.10/qqmusic_api/exceptions/__init__.py +0 -9
- qqmusic_api_python-0.1.10/qqmusic_api/utils/qimei.py +0 -301
- qqmusic_api_python-0.1.10/tests/test_qimei.py +0 -5
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/LICENSE +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/utils/__init__.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/qqmusic_api/utils/tripledes.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_album.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_lyric.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_mv.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_singer.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_song.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_songlist.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_top.py +0 -0
- {qqmusic_api_python-0.1.10 → qqmusic_api_python-0.2.0}/tests/test_user.py +0 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/python
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=python
|
|
3
|
+
|
|
4
|
+
### Python ###
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
device.json
|
|
10
|
+
|
|
11
|
+
# C extensions
|
|
12
|
+
*.so
|
|
13
|
+
|
|
14
|
+
# Distribution / packaging
|
|
15
|
+
.Python
|
|
16
|
+
build/
|
|
17
|
+
develop-eggs/
|
|
18
|
+
dist/
|
|
19
|
+
downloads/
|
|
20
|
+
eggs/
|
|
21
|
+
.eggs/
|
|
22
|
+
lib/
|
|
23
|
+
lib64/
|
|
24
|
+
parts/
|
|
25
|
+
sdist/
|
|
26
|
+
var/
|
|
27
|
+
wheels/
|
|
28
|
+
share/python-wheels/
|
|
29
|
+
*.egg-info/
|
|
30
|
+
.installed.cfg
|
|
31
|
+
*.egg
|
|
32
|
+
MANIFEST
|
|
33
|
+
|
|
34
|
+
# PyInstaller
|
|
35
|
+
# Usually these files are written by a python script from a template
|
|
36
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
37
|
+
*.manifest
|
|
38
|
+
*.spec
|
|
39
|
+
|
|
40
|
+
# Installer logs
|
|
41
|
+
pip-log.txt
|
|
42
|
+
pip-delete-this-directory.txt
|
|
43
|
+
|
|
44
|
+
# Unit test / coverage reports
|
|
45
|
+
htmlcov/
|
|
46
|
+
.tox/
|
|
47
|
+
.nox/
|
|
48
|
+
.coverage
|
|
49
|
+
.coverage.*
|
|
50
|
+
.cache
|
|
51
|
+
nosetests.xml
|
|
52
|
+
coverage.xml
|
|
53
|
+
*.cover
|
|
54
|
+
*.py,cover
|
|
55
|
+
.hypothesis/
|
|
56
|
+
.pytest_cache/
|
|
57
|
+
cover/
|
|
58
|
+
|
|
59
|
+
# Translations
|
|
60
|
+
*.mo
|
|
61
|
+
*.pot
|
|
62
|
+
|
|
63
|
+
# Django stuff:
|
|
64
|
+
*.log
|
|
65
|
+
local_settings.py
|
|
66
|
+
db.sqlite3
|
|
67
|
+
db.sqlite3-journal
|
|
68
|
+
|
|
69
|
+
# Flask stuff:
|
|
70
|
+
instance/
|
|
71
|
+
.webassets-cache
|
|
72
|
+
|
|
73
|
+
# Scrapy stuff:
|
|
74
|
+
.scrapy
|
|
75
|
+
|
|
76
|
+
# Sphinx documentation
|
|
77
|
+
docs/_build/
|
|
78
|
+
|
|
79
|
+
# PyBuilder
|
|
80
|
+
.pybuilder/
|
|
81
|
+
target/
|
|
82
|
+
|
|
83
|
+
# Jupyter Notebook
|
|
84
|
+
.ipynb_checkpoints
|
|
85
|
+
|
|
86
|
+
# IPython
|
|
87
|
+
profile_default/
|
|
88
|
+
ipython_config.py
|
|
89
|
+
|
|
90
|
+
# pyenv
|
|
91
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
92
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
93
|
+
.python-version
|
|
94
|
+
|
|
95
|
+
# pipenv
|
|
96
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
97
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
98
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
99
|
+
# install all needed dependencies.
|
|
100
|
+
#Pipfile.lock
|
|
101
|
+
|
|
102
|
+
# poetry
|
|
103
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
104
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
105
|
+
# commonly ignored for libraries.
|
|
106
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
107
|
+
#poetry.lock
|
|
108
|
+
|
|
109
|
+
# pdm
|
|
110
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
111
|
+
#pdm.lock
|
|
112
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
113
|
+
# in version control.
|
|
114
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
115
|
+
.pdm.toml
|
|
116
|
+
.pdm-python
|
|
117
|
+
|
|
118
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
119
|
+
__pypackages__/
|
|
120
|
+
|
|
121
|
+
# Celery stuff
|
|
122
|
+
celerybeat-schedule
|
|
123
|
+
celerybeat.pid
|
|
124
|
+
|
|
125
|
+
# SageMath parsed files
|
|
126
|
+
*.sage.py
|
|
127
|
+
|
|
128
|
+
# Environments
|
|
129
|
+
.env
|
|
130
|
+
.venv
|
|
131
|
+
env/
|
|
132
|
+
venv/
|
|
133
|
+
ENV/
|
|
134
|
+
env.bak/
|
|
135
|
+
venv.bak/
|
|
136
|
+
|
|
137
|
+
# Spyder project settings
|
|
138
|
+
.spyderproject
|
|
139
|
+
.spyproject
|
|
140
|
+
|
|
141
|
+
# Rope project settings
|
|
142
|
+
.ropeproject
|
|
143
|
+
|
|
144
|
+
# mkdocs documentation
|
|
145
|
+
/site
|
|
146
|
+
|
|
147
|
+
# mypy
|
|
148
|
+
.mypy_cache/
|
|
149
|
+
.dmypy.json
|
|
150
|
+
dmypy.json
|
|
151
|
+
|
|
152
|
+
# Pyre type checker
|
|
153
|
+
.pyre/
|
|
154
|
+
|
|
155
|
+
# pytype static type analyzer
|
|
156
|
+
.pytype/
|
|
157
|
+
|
|
158
|
+
# Cython debug symbols
|
|
159
|
+
cython_debug/
|
|
160
|
+
|
|
161
|
+
# PyCharm
|
|
162
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
163
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
164
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
165
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
166
|
+
#.idea/
|
|
167
|
+
|
|
168
|
+
### Python Patch ###
|
|
169
|
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
|
170
|
+
poetry.toml
|
|
171
|
+
|
|
172
|
+
# ruff
|
|
173
|
+
.ruff_cache/
|
|
174
|
+
|
|
175
|
+
# LSP config files
|
|
176
|
+
pyrightconfig.json
|
|
177
|
+
|
|
178
|
+
# End of https://www.toptal.com/developers/gitignore/api/python
|
|
@@ -1,59 +1,55 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: qqmusic-api-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: QQ音乐API封装库
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Project-URL: homepage, https://luren-dc.github.io/QQMusicApi/
|
|
6
|
+
Project-URL: repository, https://github.com/luren-dc/QQMusicApi
|
|
7
|
+
Project-URL: documentation, https://luren-dc.github.io/QQMusicApi/
|
|
8
|
+
Author-email: Luren <68656403+luren-dc@users.noreply.github.com>
|
|
9
|
+
Maintainer-email: Luren <68656403+luren-dc@users.noreply.github.com>
|
|
8
10
|
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: api,music,qqmusic,tencentmusic
|
|
9
13
|
Classifier: Development Status :: 4 - Beta
|
|
10
|
-
Classifier: Natural Language :: Chinese (Simplified)
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
14
|
Classifier: Framework :: Pytest
|
|
13
15
|
Classifier: Framework :: aiohttp
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Natural Language :: Chinese (Simplified)
|
|
14
18
|
Classifier: Programming Language :: Python
|
|
15
19
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
20
|
Classifier: Programming Language :: Python :: 3.9
|
|
17
21
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
18
22
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
Project-URL: documentation, https://github.com/luren-dc/QQMusicApi
|
|
22
|
-
Requires-Python: <3.13,>=3.9
|
|
23
|
-
Requires-Dist: cryptography<42.0.0,>=41.0.2
|
|
24
|
-
Requires-Dist: typing-extensions>=4.12.2
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Requires-Dist: cryptography<44.0.1,>=44.0.0
|
|
25
25
|
Requires-Dist: httpx>=0.27.0
|
|
26
|
+
Requires-Dist: typing-extensions>=4.12.2
|
|
26
27
|
Description-Content-Type: text/markdown
|
|
27
28
|
|
|
28
29
|
<div align="center">
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
<a href="https://www.python.org">
|
|
32
|
-
<img src="https://img.shields.io/badge/python-3.9|3.10|3.11|3.12-blue" alt="Python">
|
|
33
|
-
</a>
|
|
34
|
-
<a href="https://github.com/astral-sh/ruff">
|
|
35
|
-
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
|
|
30
|
+
<a>
|
|
31
|
+
<img src="https://socialify.git.ci/luren-dc/QQMusicApi/image?description=1&font=Source%20Code%20Pro&language=1&logo=https%3A%2F%2Fy.qq.com%2Fmediastyle%2Fmod%2Fmobile%2Fimg%2Flogo.svg&name=1&pattern=Overlapping%20Hexagons&theme=Auto">
|
|
36
32
|
</a>
|
|
37
|
-
<a href="https://
|
|
38
|
-
<img src="https://img.shields.io/
|
|
33
|
+
<a href="https://www.python.org">
|
|
34
|
+
<img src="https://img.shields.io/badge/Python-3.9|3.10|3.11|3.12-blue" alt="Python">
|
|
39
35
|
</a>
|
|
40
36
|
<a href="https://github.com/luren-dc/QQMusicApi?tab=MIT-1-ov-file">
|
|
41
|
-
<img src="https://img.shields.io/github/license/luren-dc/
|
|
37
|
+
<img src="https://img.shields.io/github/license/luren-dc/QQMusicApi" alt="GitHub license">
|
|
42
38
|
</a>
|
|
43
39
|
<a href="https://github.com/luren-dc/QQMusicApi/stargazers">
|
|
44
40
|
<img src="https://img.shields.io/github/stars/luren-dc/QQMusicApi?color=yellow&label=Github%20Stars" alt="STARS">
|
|
45
41
|
</a>
|
|
46
42
|
<a href="https://github.com/luren-dc/QQMusicApi/actions/workflows/testing.yml">
|
|
47
|
-
<img src="https://github.com/luren-dc/QQMusicApi/actions/workflows/testing.yml/badge.svg?branch=
|
|
43
|
+
<img src="https://github.com/luren-dc/QQMusicApi/actions/workflows/testing.yml/badge.svg?branch=main" alt="Testing">
|
|
48
44
|
</a>
|
|
49
45
|
</div>
|
|
50
46
|
|
|
51
47
|
---
|
|
52
48
|
|
|
53
|
-
> [!
|
|
49
|
+
> [!IMPORTANT]
|
|
54
50
|
> 本仓库的所有内容仅供学习和参考之用,禁止用于商业用途
|
|
55
51
|
>
|
|
56
|
-
>
|
|
52
|
+
> **音乐平台不易,请尊重版权,支持正版。**
|
|
57
53
|
|
|
58
54
|
**文档**: <a href="https://luren-dc.github.io/QQMusicApi" target="_blank">https://luren-dc.github.io/QQMusicApi</a>
|
|
59
55
|
|
|
@@ -67,12 +63,10 @@ Description-Content-Type: text/markdown
|
|
|
67
63
|
|
|
68
64
|
- 涵盖常见 API
|
|
69
65
|
- 调用简便,函数命名易懂,代码注释详细
|
|
70
|
-
-
|
|
66
|
+
- 完全异步操作
|
|
71
67
|
|
|
72
68
|
## 依赖
|
|
73
69
|
|
|
74
|
-
- ~~[AIOHTTP](https://docs.aiohttp.org/)~~
|
|
75
|
-
- ~~[Requests](https://requests.readthedocs.io/)~~
|
|
76
70
|
- [Cryptography](https://cryptography.io/)
|
|
77
71
|
- [HTTPX](https://github.com/encode/httpx/)
|
|
78
72
|
|
|
@@ -100,18 +94,14 @@ async def main():
|
|
|
100
94
|
asyncio.run(main())
|
|
101
95
|
```
|
|
102
96
|
|
|
103
|
-
##
|
|
97
|
+
## Licence
|
|
104
98
|
|
|
105
|
-
|
|
106
|
-
[](https://github.com/Rain120/qq-music-api)
|
|
107
|
-
[](https://github.com/jsososo/QQMusicApi)
|
|
99
|
+
本项目基于 **[MIT License](https://github.com/luren-dc/QQMusicApi?tab=MIT-1-ov-file)** 许可证发行。
|
|
108
100
|
|
|
109
|
-
|
|
110
|
-
[](https://github.com/chenmozhijin/LDDC)
|
|
101
|
+
## 免责声明
|
|
111
102
|
|
|
112
|
-
|
|
113
|
-
[](https://github.com/Nemo2011/bilibili-api)
|
|
103
|
+
由于使用本项目产生的包括由于本协议或由于使用或无法使用本项目而引起的任何性质的任何直接、间接、特殊、偶然或结果性损害(包括但不限于因商誉损失、停工、计算机故障或故障引起的损害赔偿,或任何及所有其他商业损害或损失)由使用者负责
|
|
114
104
|
|
|
115
|
-
##
|
|
105
|
+
## 贡献者
|
|
116
106
|
|
|
117
|
-
|
|
107
|
+
[](https://github.com/luren-dc/QQMusicApi/graphs/contributors)
|
|
@@ -1,32 +1,27 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
<a href="https://www.python.org">
|
|
5
|
-
<img src="https://img.shields.io/badge/python-3.9|3.10|3.11|3.12-blue" alt="Python">
|
|
6
|
-
</a>
|
|
7
|
-
<a href="https://github.com/astral-sh/ruff">
|
|
8
|
-
<img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
|
|
2
|
+
<a>
|
|
3
|
+
<img src="https://socialify.git.ci/luren-dc/QQMusicApi/image?description=1&font=Source%20Code%20Pro&language=1&logo=https%3A%2F%2Fy.qq.com%2Fmediastyle%2Fmod%2Fmobile%2Fimg%2Flogo.svg&name=1&pattern=Overlapping%20Hexagons&theme=Auto">
|
|
9
4
|
</a>
|
|
10
|
-
<a href="https://
|
|
11
|
-
<img src="https://img.shields.io/
|
|
5
|
+
<a href="https://www.python.org">
|
|
6
|
+
<img src="https://img.shields.io/badge/Python-3.9|3.10|3.11|3.12-blue" alt="Python">
|
|
12
7
|
</a>
|
|
13
8
|
<a href="https://github.com/luren-dc/QQMusicApi?tab=MIT-1-ov-file">
|
|
14
|
-
<img src="https://img.shields.io/github/license/luren-dc/
|
|
9
|
+
<img src="https://img.shields.io/github/license/luren-dc/QQMusicApi" alt="GitHub license">
|
|
15
10
|
</a>
|
|
16
11
|
<a href="https://github.com/luren-dc/QQMusicApi/stargazers">
|
|
17
12
|
<img src="https://img.shields.io/github/stars/luren-dc/QQMusicApi?color=yellow&label=Github%20Stars" alt="STARS">
|
|
18
13
|
</a>
|
|
19
14
|
<a href="https://github.com/luren-dc/QQMusicApi/actions/workflows/testing.yml">
|
|
20
|
-
<img src="https://github.com/luren-dc/QQMusicApi/actions/workflows/testing.yml/badge.svg?branch=
|
|
15
|
+
<img src="https://github.com/luren-dc/QQMusicApi/actions/workflows/testing.yml/badge.svg?branch=main" alt="Testing">
|
|
21
16
|
</a>
|
|
22
17
|
</div>
|
|
23
18
|
|
|
24
19
|
---
|
|
25
20
|
|
|
26
|
-
> [!
|
|
21
|
+
> [!IMPORTANT]
|
|
27
22
|
> 本仓库的所有内容仅供学习和参考之用,禁止用于商业用途
|
|
28
23
|
>
|
|
29
|
-
>
|
|
24
|
+
> **音乐平台不易,请尊重版权,支持正版。**
|
|
30
25
|
|
|
31
26
|
**文档**: <a href="https://luren-dc.github.io/QQMusicApi" target="_blank">https://luren-dc.github.io/QQMusicApi</a>
|
|
32
27
|
|
|
@@ -40,12 +35,10 @@
|
|
|
40
35
|
|
|
41
36
|
- 涵盖常见 API
|
|
42
37
|
- 调用简便,函数命名易懂,代码注释详细
|
|
43
|
-
-
|
|
38
|
+
- 完全异步操作
|
|
44
39
|
|
|
45
40
|
## 依赖
|
|
46
41
|
|
|
47
|
-
- ~~[AIOHTTP](https://docs.aiohttp.org/)~~
|
|
48
|
-
- ~~[Requests](https://requests.readthedocs.io/)~~
|
|
49
42
|
- [Cryptography](https://cryptography.io/)
|
|
50
43
|
- [HTTPX](https://github.com/encode/httpx/)
|
|
51
44
|
|
|
@@ -73,18 +66,14 @@ async def main():
|
|
|
73
66
|
asyncio.run(main())
|
|
74
67
|
```
|
|
75
68
|
|
|
76
|
-
##
|
|
69
|
+
## Licence
|
|
77
70
|
|
|
78
|
-
|
|
79
|
-
[](https://github.com/Rain120/qq-music-api)
|
|
80
|
-
[](https://github.com/jsososo/QQMusicApi)
|
|
71
|
+
本项目基于 **[MIT License](https://github.com/luren-dc/QQMusicApi?tab=MIT-1-ov-file)** 许可证发行。
|
|
81
72
|
|
|
82
|
-
|
|
83
|
-
[](https://github.com/chenmozhijin/LDDC)
|
|
73
|
+
## 免责声明
|
|
84
74
|
|
|
85
|
-
|
|
86
|
-
[](https://github.com/Nemo2011/bilibili-api)
|
|
75
|
+
由于使用本项目产生的包括由于本协议或由于使用或无法使用本项目而引起的任何性质的任何直接、间接、特殊、偶然或结果性损害(包括但不限于因商誉损失、停工、计算机故障或故障引起的损害赔偿,或任何及所有其他商业损害或损失)由使用者负责
|
|
87
76
|
|
|
88
|
-
##
|
|
77
|
+
## 贡献者
|
|
89
78
|
|
|
90
|
-
|
|
79
|
+
[](https://github.com/luren-dc/QQMusicApi/graphs/contributors)
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "qqmusic-api-python"
|
|
3
|
+
description = "QQ音乐API封装库"
|
|
4
|
+
authors = [
|
|
5
|
+
{ name = "Luren", email = "68656403+luren-dc@users.noreply.github.com" },
|
|
6
|
+
]
|
|
7
|
+
dependencies = [
|
|
8
|
+
"cryptography>=44.0.0,<44.0.1",
|
|
9
|
+
"typing-extensions>=4.12.2",
|
|
10
|
+
"httpx>=0.27.0",
|
|
11
|
+
]
|
|
12
|
+
requires-python = ">=3.9"
|
|
13
|
+
readme = "README.md"
|
|
14
|
+
license = { text = "MIT" }
|
|
15
|
+
maintainers = [
|
|
16
|
+
{ name = "Luren", email = "68656403+luren-dc@users.noreply.github.com" },
|
|
17
|
+
]
|
|
18
|
+
keywords = ["music", "api", "qqmusic", "tencentmusic"]
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 4 - Beta",
|
|
21
|
+
"Natural Language :: Chinese (Simplified)",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Framework :: Pytest",
|
|
24
|
+
"Framework :: aiohttp",
|
|
25
|
+
"Programming Language :: Python",
|
|
26
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
27
|
+
"Programming Language :: Python :: 3.9",
|
|
28
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
29
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
30
|
+
]
|
|
31
|
+
dynamic = ["version"]
|
|
32
|
+
|
|
33
|
+
[project.urls]
|
|
34
|
+
homepage = "https://luren-dc.github.io/QQMusicApi/"
|
|
35
|
+
repository = "https://github.com/luren-dc/QQMusicApi"
|
|
36
|
+
documentation = "https://luren-dc.github.io/QQMusicApi/"
|
|
37
|
+
|
|
38
|
+
[build-system]
|
|
39
|
+
requires = ["hatchling"]
|
|
40
|
+
build-backend = "hatchling.build"
|
|
41
|
+
|
|
42
|
+
[tool.uv]
|
|
43
|
+
package = true
|
|
44
|
+
|
|
45
|
+
[tool.hatch.version]
|
|
46
|
+
path = "qqmusic_api/__init__.py"
|
|
47
|
+
|
|
48
|
+
[tool.hatch.build.targets.wheel]
|
|
49
|
+
packages = ["qqmusic_api"]
|
|
50
|
+
|
|
51
|
+
[tool.hatch.build.targets.sdist]
|
|
52
|
+
include = ["/qqmusic_api", "/tests", "LISENCE", "README.md"]
|
|
53
|
+
|
|
54
|
+
[dependency-groups]
|
|
55
|
+
testing = [
|
|
56
|
+
"pytest<9.0.0,>=8.2.0",
|
|
57
|
+
"pytest-asyncio<1.0.0,>=0.23.6",
|
|
58
|
+
"pytest-sugar<2.0.0,>=1.0.0",
|
|
59
|
+
]
|
|
60
|
+
docs = [
|
|
61
|
+
"mkdocs-material>=9.5.29",
|
|
62
|
+
"mkdocstrings-python>=1.10.5",
|
|
63
|
+
"mkdocstrings>=0.25.1",
|
|
64
|
+
"mkdocs>=1.6.0",
|
|
65
|
+
"markdown-callouts>=0.4.0",
|
|
66
|
+
"griffe-inherited-docstrings>=1.0.0",
|
|
67
|
+
"docstring-inheritance>=2.2.1",
|
|
68
|
+
"griffe-modernized-annotations>=1.0.8",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
[tool.commitizen]
|
|
72
|
+
name = "cz_gitmoji"
|
|
73
|
+
|
|
74
|
+
[tool.basedpyright]
|
|
75
|
+
venvPath = "."
|
|
76
|
+
venv = ".venv"
|
|
77
|
+
include = ["qqmusic_api"]
|
|
78
|
+
exclude = ["tests", "examples"]
|
|
79
|
+
pythonVersion = "3.9"
|
|
80
|
+
typeCheckingMode = "standard"
|
|
81
|
+
|
|
82
|
+
[tool.ruff]
|
|
83
|
+
line-length = 120
|
|
84
|
+
extend-exclude = ["docs"]
|
|
85
|
+
|
|
86
|
+
[tool.ruff.lint]
|
|
87
|
+
extend-select = ["Q", "RUF", "C90", "UP", "I", "D", "ASYNC", "C4", "FURB", "R", "PERF"]
|
|
88
|
+
ignore = ["D105", "D107", "D205", "D415"]
|
|
89
|
+
pydocstyle = { convention = "google" }
|
|
90
|
+
|
|
91
|
+
[tool.ruff.lint.per-file-ignores]
|
|
92
|
+
"tests/*" = ["D"]
|
|
93
|
+
"examples/*" = ["D", "T"]
|
|
94
|
+
"qqmusic_api/__init__.py" = ["F405", "D"]
|
|
95
|
+
"qqmusic_api/**/__init__.py" = ["F405", "D"]
|
|
96
|
+
|
|
97
|
+
[tool.pytest.ini_options]
|
|
98
|
+
addopts = "-rxXs"
|
|
99
|
+
asyncio_mode = "auto"
|
|
100
|
+
asyncio_default_fixture_loop_scope = "session"
|
|
@@ -2,17 +2,18 @@ import logging
|
|
|
2
2
|
|
|
3
3
|
from . import album, login, login_utils, lyric, mv, search, singer, song, songlist, top, user
|
|
4
4
|
from .utils.credential import Credential
|
|
5
|
-
from .utils.
|
|
5
|
+
from .utils.session import create_session, get_session, set_session, set_session_credential
|
|
6
6
|
from .utils.sync import sync
|
|
7
7
|
|
|
8
|
-
__version__ = "0.
|
|
8
|
+
__version__ = "0.2.0"
|
|
9
9
|
|
|
10
10
|
logger = logging.getLogger("qqmusicapi")
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
__all__ = [
|
|
14
|
-
"album",
|
|
15
14
|
"Credential",
|
|
15
|
+
"album",
|
|
16
|
+
"create_session",
|
|
16
17
|
"get_session",
|
|
17
18
|
"login",
|
|
18
19
|
"login_utils",
|
|
@@ -20,6 +21,7 @@ __all__ = [
|
|
|
20
21
|
"mv",
|
|
21
22
|
"search",
|
|
22
23
|
"set_session",
|
|
24
|
+
"set_session_credential",
|
|
23
25
|
"singer",
|
|
24
26
|
"song",
|
|
25
27
|
"songlist",
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import Literal, Optional
|
|
4
4
|
|
|
5
|
+
from .utils.common import get_api
|
|
5
6
|
from .utils.network import Api
|
|
6
|
-
from .utils.utils import get_api
|
|
7
7
|
|
|
8
8
|
API = get_api("album")
|
|
9
9
|
|
|
@@ -40,7 +40,7 @@ class Album:
|
|
|
40
40
|
"""初始化专辑类
|
|
41
41
|
|
|
42
42
|
Note:
|
|
43
|
-
歌曲 mid 和 id
|
|
43
|
+
歌曲 mid 和 id,两者至少提供一个
|
|
44
44
|
|
|
45
45
|
Args:
|
|
46
46
|
mid: 专辑 mid
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"detail": {
|
|
3
|
+
"module": "music.musichallAlbum.AlbumInfoServer",
|
|
4
|
+
"method": "GetAlbumDetail",
|
|
5
|
+
"params": {
|
|
6
|
+
"albumMid": "str 专辑 mid",
|
|
7
|
+
"albumId": "str 专辑 id"
|
|
8
|
+
},
|
|
9
|
+
"comment": "获取专辑信息"
|
|
10
|
+
},
|
|
11
|
+
"song": {
|
|
12
|
+
"module": "music.musichallAlbum.AlbumSongList",
|
|
13
|
+
"method": "GetAlbumSongList",
|
|
14
|
+
"params": {
|
|
15
|
+
"albumMid": "str 专辑 mid",
|
|
16
|
+
"albumId": "str 专辑 id",
|
|
17
|
+
"begin": "int 开启位置",
|
|
18
|
+
"num": "int 返回数量"
|
|
19
|
+
},
|
|
20
|
+
"comment": "获取专辑歌曲"
|
|
21
|
+
}
|
|
22
|
+
}
|