qqmusic-api-python 0.7.2__py3-none-any.whl → 0.7.3__py3-none-any.whl
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/__init__.py +1 -1
- qqmusic_api/models/singer.py +25 -0
- qqmusic_api/modules/singer.py +19 -0
- qqmusic_api/modules/song.py +4 -1
- {qqmusic_api_python-0.7.2.dist-info → qqmusic_api_python-0.7.3.dist-info}/METADATA +2 -2
- {qqmusic_api_python-0.7.2.dist-info → qqmusic_api_python-0.7.3.dist-info}/RECORD +8 -8
- {qqmusic_api_python-0.7.2.dist-info → qqmusic_api_python-0.7.3.dist-info}/WHEEL +1 -1
- {qqmusic_api_python-0.7.2.dist-info → qqmusic_api_python-0.7.3.dist-info}/licenses/LICENSE +0 -0
qqmusic_api/__init__.py
CHANGED
qqmusic_api/models/singer.py
CHANGED
|
@@ -248,6 +248,31 @@ class HomepageTabDetailResponse(Response):
|
|
|
248
248
|
)
|
|
249
249
|
|
|
250
250
|
|
|
251
|
+
class SingerNameSpecialDisplayResponse(Response):
|
|
252
|
+
"""歌手名称特殊展示信息.
|
|
253
|
+
|
|
254
|
+
Attributes:
|
|
255
|
+
display_type: 展示类型, 2 表示名称图片, 0 表示无特殊展示.
|
|
256
|
+
pic_file: 透明 PNG 地址, 无名称图片时为空字符串.
|
|
257
|
+
signature_name_overlap_ratio: 上游返回的签名与名称重叠比例.
|
|
258
|
+
name: 歌手名称.
|
|
259
|
+
"""
|
|
260
|
+
|
|
261
|
+
display_type: int = Field(
|
|
262
|
+
default=0,
|
|
263
|
+
json_schema_extra={"jsonpath": "$.Info.Singer.SingerNameSpecialDisplay.DisplayType"},
|
|
264
|
+
)
|
|
265
|
+
pic_file: str = Field(
|
|
266
|
+
default="",
|
|
267
|
+
json_schema_extra={"jsonpath": "$.Info.Singer.SingerNameSpecialDisplay.PicFile"},
|
|
268
|
+
)
|
|
269
|
+
signature_name_overlap_ratio: float = Field(
|
|
270
|
+
default=0.0,
|
|
271
|
+
json_schema_extra={"jsonpath": "$.Info.Singer.SingerNameSpecialDisplay.SignatureNameOverlapRatio"},
|
|
272
|
+
)
|
|
273
|
+
name: str = Field(default="", json_schema_extra={"jsonpath": "$.Info.Singer.Name"})
|
|
274
|
+
|
|
275
|
+
|
|
251
276
|
class HomepageHeaderResponse(Response):
|
|
252
277
|
"""歌手主页头部响应.
|
|
253
278
|
|
qqmusic_api/modules/singer.py
CHANGED
|
@@ -17,6 +17,7 @@ from ..models.singer import (
|
|
|
17
17
|
SingerDetailResponse,
|
|
18
18
|
SingerIndexPageResponse,
|
|
19
19
|
SingerMvListResponse,
|
|
20
|
+
SingerNameSpecialDisplayResponse,
|
|
20
21
|
SingerSongListResponse,
|
|
21
22
|
SingerTypeListResponse,
|
|
22
23
|
)
|
|
@@ -208,6 +209,24 @@ class SingerApi(ApiModule):
|
|
|
208
209
|
platform=Platform.ANDROID,
|
|
209
210
|
)
|
|
210
211
|
|
|
212
|
+
def get_name_special_display(self, mid: str):
|
|
213
|
+
"""获取歌手名称透明 PNG 展示信息.
|
|
214
|
+
|
|
215
|
+
返回歌手名称、展示类型、图片地址和重叠比例.
|
|
216
|
+
无名称图片时, 返回 display_type=0 和空 pic_file.
|
|
217
|
+
|
|
218
|
+
Args:
|
|
219
|
+
mid: 歌手 MID.
|
|
220
|
+
"""
|
|
221
|
+
return self._build_cgi(
|
|
222
|
+
module="music.UnifiedHomepage.UnifiedHomepageSrv",
|
|
223
|
+
method="GetHomepageHeader",
|
|
224
|
+
param={"SingerMid": mid},
|
|
225
|
+
response_model=SingerNameSpecialDisplayResponse,
|
|
226
|
+
platform=Platform.ANDROID,
|
|
227
|
+
comm={"cv": 20_080_000, "v": 20_080_000},
|
|
228
|
+
)
|
|
229
|
+
|
|
211
230
|
def get_tab_detail(
|
|
212
231
|
self,
|
|
213
232
|
mid: str,
|
qqmusic_api/modules/song.py
CHANGED
|
@@ -283,8 +283,11 @@ class SongApi(ApiModule):
|
|
|
283
283
|
credential: 凭据对象.
|
|
284
284
|
|
|
285
285
|
Raises:
|
|
286
|
-
ValueError: 当 `mid` 数量超过上限时抛出.
|
|
286
|
+
ValueError: 当 `mid` 数量超过上限时抛出. 超限时上游返回错误且无结果, 故提前拒绝.
|
|
287
287
|
"""
|
|
288
|
+
if len(file_info) > self._GET_SONG_URLS_MAX_MID:
|
|
289
|
+
raise ValueError(f"mid 数量不能超过 {self._GET_SONG_URLS_MAX_MID}, 当前为 {len(file_info)}")
|
|
290
|
+
|
|
288
291
|
encrypted = isinstance(file_type, EncryptedSongFileType)
|
|
289
292
|
module, method = (
|
|
290
293
|
("music.vkey.GetVkey", "UrlGetVkey") if not encrypted else ("music.vkey.GetEVkey", "CgiGetEVkey")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
qqmusic_api/__init__.py,sha256=
|
|
1
|
+
qqmusic_api/__init__.py,sha256=1E-oHvtsiObk9c6wfvdGaZGuDu_FnbmjLaqWICO6Jq4,1044
|
|
2
2
|
qqmusic_api/algorithms/__init__.py,sha256=hpRXSLHCFwAJn_kGVLmebXJmwl01shXP-_YBz1V7vMM,1228
|
|
3
3
|
qqmusic_api/algorithms/sign.py,sha256=udSOw4SqPQC_IMqZ9ITxtNbr_8F8iFpgQQ0CYVJgKk8,1082
|
|
4
4
|
qqmusic_api/algorithms/tripledes.py,sha256=an5zZXRPNbkEx3r7RGK9K052V_m0dCKzcqh2iAViDOA,18861
|
|
@@ -22,7 +22,7 @@ qqmusic_api/models/private_message.py,sha256=D-ODrxoXOffIilOCH7TbCy8IoP2hMRSNP7I
|
|
|
22
22
|
qqmusic_api/models/recommend.py,sha256=kv86tcYvr8iU6rlZHK18dLpd3k9ahTTvYGQVVvtXNz4,5251
|
|
23
23
|
qqmusic_api/models/request.py,sha256=MwwmeJcLayF8bcI-46C41QwprDhG4IWsjQBDDmsDRCo,5608
|
|
24
24
|
qqmusic_api/models/search.py,sha256=NskyTH7wc3QkX3H_gaYSe0ct1wPQCYASJxyjIk5YXWM,14539
|
|
25
|
-
qqmusic_api/models/singer.py,sha256=
|
|
25
|
+
qqmusic_api/models/singer.py,sha256=3x867BAeqhnK7bHV8ywulVdQZMftYjbeve5af2lJLIs,14921
|
|
26
26
|
qqmusic_api/models/song.py,sha256=uspopwbBsbgiVCkIzz86Dn6SscYY2vl8ekXDv258HzQ,12047
|
|
27
27
|
qqmusic_api/models/songlist.py,sha256=CdVkDdw7Ro55KKNd0NfMsMZLns0ZTLnkWzsGdSzzlpE,1906
|
|
28
28
|
qqmusic_api/models/top.py,sha256=t-hE4TGQyetLFNeEYM7K--ne3Ht0zq8I_AZ3udVB-HE,3792
|
|
@@ -40,8 +40,8 @@ qqmusic_api/modules/mv.py,sha256=tpcIX_KYIpU2c5D88_PZTnWMxPTklAiaNvjzv8aOA_A,318
|
|
|
40
40
|
qqmusic_api/modules/private_message.py,sha256=3dQIH-vaFwrbFNy96qILSUmjfMNZnapnYv3QpJKFAYo,15970
|
|
41
41
|
qqmusic_api/modules/recommend.py,sha256=B0scy-r4tYeYkWNqT1BzUko_0dr-BiBz1z0m5H9aLp4,4659
|
|
42
42
|
qqmusic_api/modules/search.py,sha256=-vAVsW2HeQoK8oP-bzXe4OKleWZbUyYACl6KNKmCKjY,8787
|
|
43
|
-
qqmusic_api/modules/singer.py,sha256=
|
|
44
|
-
qqmusic_api/modules/song.py,sha256=
|
|
43
|
+
qqmusic_api/modules/singer.py,sha256=s-rklcL9_Yi2LsEe7R6MIR5DBMEgrw096C18IRrWoJQ,10774
|
|
44
|
+
qqmusic_api/modules/song.py,sha256=pxdpU1YO_g4dZgd1SVDRjGRYfaj-pm2Wyyje7yaD64I,16146
|
|
45
45
|
qqmusic_api/modules/songlist.py,sha256=CgO6euJmFj9kY8i2IXYa3NqooMrq_g32IPbF8KAJL_0,6754
|
|
46
46
|
qqmusic_api/modules/top.py,sha256=0bCiJ3FBcBkBxvh_1zLgYBzTM58fzS2XH2hGmfjPgvw,1558
|
|
47
47
|
qqmusic_api/modules/user.py,sha256=9atZXXSMiz-qmwj26K9SD3qLz8FoNJDHtjFGudyhymc,17245
|
|
@@ -50,7 +50,7 @@ qqmusic_api/utils/common.py,sha256=nzfZ9WtT0j8RBpyisYy_7hK6rXiO7bpG1G6OmXUWBAc,2
|
|
|
50
50
|
qqmusic_api/utils/device.py,sha256=2IhWb5ulyoSbMccYP2GguzExMnx9VaEAHYGktNzWPqM,6197
|
|
51
51
|
qqmusic_api/utils/mqtt.py,sha256=nufRKYEhJ2siYM_LRpAHl-B3CiSmM4GT4XdYp3uLMF8,22940
|
|
52
52
|
qqmusic_api/utils/qimei.py,sha256=CTMe3bZepbXYYiYHJ878QNJ3nV0zfua8JvS0JPjJ5Ac,9068
|
|
53
|
-
qqmusic_api_python-0.7.
|
|
54
|
-
qqmusic_api_python-0.7.
|
|
55
|
-
qqmusic_api_python-0.7.
|
|
56
|
-
qqmusic_api_python-0.7.
|
|
53
|
+
qqmusic_api_python-0.7.3.dist-info/METADATA,sha256=wa9iWSVKDgufXxpy2I3jIAuBIi8eiJNnF5umcZDIWe0,4190
|
|
54
|
+
qqmusic_api_python-0.7.3.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
55
|
+
qqmusic_api_python-0.7.3.dist-info/licenses/LICENSE,sha256=xTplwv1WHIfqq_EHLvXcq4ZTBCvBUwhGX1JBNYXrYnE,35146
|
|
56
|
+
qqmusic_api_python-0.7.3.dist-info/RECORD,,
|
|
File without changes
|