qqmusic-api-python 0.2.1__py3-none-any.whl → 0.2.2__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/lyric.py +7 -7
- {qqmusic_api_python-0.2.1.dist-info → qqmusic_api_python-0.2.2.dist-info}/METADATA +1 -1
- {qqmusic_api_python-0.2.1.dist-info → qqmusic_api_python-0.2.2.dist-info}/RECORD +6 -6
- {qqmusic_api_python-0.2.1.dist-info → qqmusic_api_python-0.2.2.dist-info}/WHEEL +0 -0
- {qqmusic_api_python-0.2.1.dist-info → qqmusic_api_python-0.2.2.dist-info}/licenses/LICENSE +0 -0
qqmusic_api/__init__.py
CHANGED
qqmusic_api/lyric.py
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"""歌词 API"""
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import re
|
|
4
4
|
|
|
5
5
|
from .utils.common import get_api, qrc_decrypt
|
|
6
6
|
from .utils.network import Api
|
|
7
7
|
|
|
8
8
|
API = get_api("lyric")
|
|
9
9
|
|
|
10
|
+
QRC_PATTERN = re.compile(r'<Lyric_.* LyricType=".*" LyricContent="(?P<content>.*?)"/>', re.DOTALL)
|
|
11
|
+
|
|
10
12
|
|
|
11
13
|
async def get_lyric(
|
|
12
14
|
*,
|
|
@@ -52,14 +54,12 @@ async def get_lyric(
|
|
|
52
54
|
res = await Api(**API["info"]).update_params(**params).result
|
|
53
55
|
|
|
54
56
|
lyric = qrc_decrypt(res["lyric"])
|
|
57
|
+
|
|
55
58
|
|
|
56
59
|
if lyric and qrc:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
lyric = lyric_info[0].attrib.get("LyricContent", lyric)
|
|
61
|
-
except Exception:
|
|
62
|
-
pass
|
|
60
|
+
m_qrc = QRC_PATTERN.search(lyric)
|
|
61
|
+
if m_qrc and m_qrc.group("content"):
|
|
62
|
+
lyric = m_qrc.group("content")
|
|
63
63
|
|
|
64
64
|
return {
|
|
65
65
|
"lyric": lyric,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
qqmusic_api/__init__.py,sha256=
|
|
1
|
+
qqmusic_api/__init__.py,sha256=MsB0ijfLk7SvlC28_k-NqeSxN8wu_hRx62qg_7yNKBA,620
|
|
2
2
|
qqmusic_api/album.py,sha256=cHasufexbQwQoqUWcF2C0-9ELtoyKMxjk7BNkQ5rCO8,2205
|
|
3
3
|
qqmusic_api/login.py,sha256=zRUPcmAZ5LiUfO9uShJfZ5Xc4n2bCxe55kDxLpknB0k,13289
|
|
4
4
|
qqmusic_api/login_utils.py,sha256=_sObteyghUSDSHCkAeFHQrgpf7FO_5I_YyQKIts-3Vg,4153
|
|
5
|
-
qqmusic_api/lyric.py,sha256=
|
|
5
|
+
qqmusic_api/lyric.py,sha256=TCVi8tJ_so8-S14be6e6B2pDYFLw94sKKF5C7MZ0hU4,1563
|
|
6
6
|
qqmusic_api/mv.py,sha256=FUpOFphGsui6I1rPe4Z2B6dTbKF_lCUE1lQSD_igWmk,2833
|
|
7
7
|
qqmusic_api/search.py,sha256=V4sfFt-xmc7wKgYxN_hSSFKL8mISoDZ5BxXj0RuxY6U,3214
|
|
8
8
|
qqmusic_api/singer.py,sha256=YPBjh0s6vUX7Gy03jOqJcJ47DgPZp1hVRE7w767PvG0,4688
|
|
@@ -34,7 +34,7 @@ qqmusic_api/utils/session.py,sha256=wPe8kQ31WFCLhzwGGBzJPjDDAiS65E1DQ4Q54FYBLfU,
|
|
|
34
34
|
qqmusic_api/utils/sign.py,sha256=774CzI1WNHSh0CVkgY1MZLjgj7R5WVX8Q3ZUyU70lbk,1395
|
|
35
35
|
qqmusic_api/utils/sync.py,sha256=av7Z4sdL5myf8ceR-pn26_31cvkN5h9D7-iE4Q0OrTs,741
|
|
36
36
|
qqmusic_api/utils/tripledes.py,sha256=v_ivJ64MD3AZ8soN_7wx_3wL0rSBXCDeqe0GyOHrXLk,15852
|
|
37
|
-
qqmusic_api_python-0.2.
|
|
38
|
-
qqmusic_api_python-0.2.
|
|
39
|
-
qqmusic_api_python-0.2.
|
|
40
|
-
qqmusic_api_python-0.2.
|
|
37
|
+
qqmusic_api_python-0.2.2.dist-info/METADATA,sha256=Fb1e1k5LC1RYbU65ZJ-Z8d3tI-rsZkefEdJB9NZOt3I,3849
|
|
38
|
+
qqmusic_api_python-0.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
39
|
+
qqmusic_api_python-0.2.2.dist-info/licenses/LICENSE,sha256=dWHDhxdkwc4EVZ0xMf13_qTkjzPqbI1YL_1OzmZxaxU,1062
|
|
40
|
+
qqmusic_api_python-0.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|