migu-api-enhanced 2.27.1 → 2.27.4
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.
- package/README.md +14 -8
- package/dist/YDRZ-HSTSW5FC.mjs +11 -0
- package/dist/YDRZ-HSTSW5FC.mjs.map +1 -0
- package/dist/YDRZ-KF4GXM2T.cjs +11 -0
- package/dist/YDRZ-KF4GXM2T.cjs.map +1 -0
- package/dist/activity/index.cjs +85 -0
- package/dist/activity/index.cjs.map +1 -0
- package/dist/activity/index.d.cts +70 -0
- package/dist/activity/index.d.ts +70 -0
- package/dist/activity/index.mjs +85 -0
- package/dist/activity/index.mjs.map +1 -0
- package/dist/chunk-4ZNJQZKT.mjs +95 -0
- package/dist/chunk-4ZNJQZKT.mjs.map +1 -0
- package/dist/chunk-AJYZYXNE.mjs +18 -0
- package/dist/chunk-AJYZYXNE.mjs.map +1 -0
- package/dist/chunk-C56WQXBU.cjs +13 -0
- package/dist/chunk-C56WQXBU.cjs.map +1 -0
- package/dist/chunk-EIM46AX6.mjs +144 -0
- package/dist/chunk-EIM46AX6.mjs.map +1 -0
- package/dist/chunk-HDGZY5R6.mjs +13 -0
- package/dist/chunk-HDGZY5R6.mjs.map +1 -0
- package/dist/chunk-ILRMRBMK.cjs +71 -0
- package/dist/chunk-ILRMRBMK.cjs.map +1 -0
- package/dist/chunk-JRQEIAY5.mjs +21 -0
- package/dist/chunk-JRQEIAY5.mjs.map +1 -0
- package/dist/chunk-KGXC32BN.cjs +185 -0
- package/dist/chunk-KGXC32BN.cjs.map +1 -0
- package/dist/chunk-QEH62Z4S.cjs +18 -0
- package/dist/chunk-QEH62Z4S.cjs.map +1 -0
- package/dist/chunk-QMBC3CRQ.mjs +51 -0
- package/dist/chunk-QMBC3CRQ.mjs.map +1 -0
- package/dist/chunk-QTK2O5KQ.mjs +71 -0
- package/dist/chunk-QTK2O5KQ.mjs.map +1 -0
- package/dist/chunk-RI7PQIHG.cjs +144 -0
- package/dist/chunk-RI7PQIHG.cjs.map +1 -0
- package/dist/chunk-TIKOSETY.cjs +51 -0
- package/dist/chunk-TIKOSETY.cjs.map +1 -0
- package/dist/chunk-TOFOR57V.cjs +21 -0
- package/dist/chunk-TOFOR57V.cjs.map +1 -0
- package/dist/chunk-VE3TRZRD.mjs +185 -0
- package/dist/chunk-VE3TRZRD.mjs.map +1 -0
- package/dist/chunk-ZEGJU5LW.cjs +95 -0
- package/dist/chunk-ZEGJU5LW.cjs.map +1 -0
- package/dist/decryptMrc-EGKXYBTB.mjs +11 -0
- package/dist/decryptMrc-EGKXYBTB.mjs.map +1 -0
- package/dist/decryptMrc-OOH5UIFN.cjs +11 -0
- package/dist/decryptMrc-OOH5UIFN.cjs.map +1 -0
- package/dist/index.cjs +1606 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1004 -2
- package/dist/index.d.ts +1004 -2
- package/dist/{modules/index.js → index.mjs} +85 -971
- package/dist/index.mjs.map +1 -0
- package/dist/login/index.cjs +315 -0
- package/dist/login/index.cjs.map +1 -0
- package/dist/login/index.d.cts +57 -0
- package/dist/login/index.d.ts +57 -0
- package/dist/login/index.mjs +315 -0
- package/dist/login/index.mjs.map +1 -0
- package/dist/mrc/index.cjs +39 -0
- package/dist/mrc/index.cjs.map +1 -0
- package/dist/mrc/index.d.cts +37 -0
- package/dist/mrc/index.d.ts +37 -0
- package/dist/mrc/index.mjs +39 -0
- package/dist/mrc/index.mjs.map +1 -0
- package/dist/publicKey-EHY5LDOP.cjs +8 -0
- package/dist/publicKey-EHY5LDOP.cjs.map +1 -0
- package/dist/publicKey-LX6G3T7L.mjs +8 -0
- package/dist/publicKey-LX6G3T7L.mjs.map +1 -0
- package/dist/rsalib-GGMEGQT2.cjs +9 -0
- package/dist/rsalib-GGMEGQT2.cjs.map +1 -0
- package/dist/rsalib-HO4SSCTO.mjs +9 -0
- package/dist/rsalib-HO4SSCTO.mjs.map +1 -0
- package/dist/utils/index.cjs +46 -421
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +46 -2
- package/dist/utils/index.d.ts +46 -2
- package/dist/utils/index.mjs +81 -0
- package/dist/utils/index.mjs.map +1 -0
- package/package.json +21 -11
- package/dist/index.js +0 -4
- package/dist/index.js.map +0 -1
- package/dist/modules/index.cjs +0 -2666
- package/dist/modules/index.cjs.map +0 -1
- package/dist/modules/index.d.cts +0 -1156
- package/dist/modules/index.d.ts +0 -1156
- package/dist/modules/index.js.map +0 -1
- package/dist/utils/index.js +0 -406
- package/dist/utils/index.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,27 +1,1607 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
// src/
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkILRMRBMKcjs = require('./chunk-ILRMRBMK.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkQEH62Z4Scjs = require('./chunk-QEH62Z4S.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkZEGJU5LWcjs = require('./chunk-ZEGJU5LW.cjs');
|
|
11
|
+
|
|
12
|
+
// src/modules/search.ts
|
|
13
|
+
var searchSong = async (text, page = 1) => {
|
|
14
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/song/v1.0?pageNo=${page}&text=${text}`);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// src/modules/search_playlist.ts
|
|
18
|
+
var searchPlaylist = async (text, page = 1, typeOrder = 0) => {
|
|
19
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/bmw/search/music-list/v1.0?pageNo=${page}&text=${text}&typeOrder=${typeOrder}`);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// src/modules/search_album.ts
|
|
23
|
+
var searchAlbum = async (text, page = 1, typeOrder = 0) => {
|
|
24
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/album/v1.0?pageNo=${page}&text=${text}&typeOrder=${typeOrder}`);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
// src/modules/search_singer.ts
|
|
28
|
+
var searchSinger = async (text, page = 1) => {
|
|
29
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/singer/v2.0?pageNo=${page}&text=${text}`);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// src/modules/search_concert.ts
|
|
33
|
+
var searchConcert = async (text, page = 1) => {
|
|
34
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/concert/v1.0?pageNo=${page}&text=${text}`);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
// src/modules/search_hot.ts
|
|
38
|
+
var getSearchHot = async () => {
|
|
39
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.u.nf.migu.cn/bmw/hot-search/search-rank-list/v1.0`);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// src/modules/search_default.ts
|
|
43
|
+
var getSearchDefault = async () => {
|
|
44
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/column/search/default-text/v3.0?resourceVersion=2`);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// src/modules/search_mv.ts
|
|
48
|
+
var searchMv = async (text, page = 1, typeOrder = 0) => {
|
|
49
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/video/v1.0?pageNo=${page}&text=${text}&typeOrder=${typeOrder}`);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
// src/modules/search_suggest.ts
|
|
53
|
+
var searchSuggest = async (text) => {
|
|
54
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/suggest/v1.0?text=${text}`);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// src/modules/search_rbt.ts
|
|
58
|
+
var searchRbt = async (text, page = 1) => {
|
|
59
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/rbt/v1.0?pageNo=${page}&text=${text}`);
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// src/modules/search_ticket.ts
|
|
63
|
+
var searchTicket = async (text, page = 1) => {
|
|
64
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/ticket/v1.0?pageNo=${page}&text=${text}`);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// src/modules/search_singerTab.ts
|
|
68
|
+
var getSearchSingerTab = async () => {
|
|
69
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.u.nf.migu.cn/MIGUM3.0/bmw/singer-index/tabs/v2.0`);
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/modules/search_singerTab_list.ts
|
|
73
|
+
var getSearchSingerTabList = async (tab = "") => {
|
|
74
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.u.nf.migu.cn/MIGUM3.0/bmw/singer-index/list/v1.0?tab=${tab}&templateVersion=3`);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
// src/modules/album_info.ts
|
|
78
|
+
var getAlbumInfo = async (albumId) => {
|
|
79
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/MIGUM3.0/resource/album/v2.0?albumId=${albumId}`);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// src/modules/album_song.ts
|
|
83
|
+
var getAlbumSong = async (albumId, page = 1) => {
|
|
84
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/MIGUM3.0/resource/album/song/v2.0?albumId=${albumId}&pageNo=${page}`);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// src/modules/playlist_info.ts
|
|
88
|
+
var getPlaylistInfo = async (playlistId) => {
|
|
89
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/resource/playlist/v2.0?playlistId=${playlistId}`);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
// src/modules/playlist_song.ts
|
|
93
|
+
var getPlaylistSong = async (playlistId, page = 1, size = 20) => {
|
|
94
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/MIGUM3.0/resource/playlist/song/v2.0?pageNo=${page}&pageSize=${size}&playlistId=${playlistId}`);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
// src/modules/singer_index.ts
|
|
98
|
+
var getSingerIndex = async (singerId) => {
|
|
99
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/singer/index/v1.0?singerId=${singerId}`);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// src/modules/singer_song.ts
|
|
103
|
+
var getSingerSong = async (singerId, page = 1) => {
|
|
104
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/singer/song/v1.0?pageNo=${page}&singerId=${singerId}&type=1`);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// src/modules/singer_album.ts
|
|
108
|
+
var getSingerAlbum = async (singerId, page = 1) => {
|
|
109
|
+
const res = await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/singer/album/v1.0?singerId=${singerId}&pageNo=${page}`);
|
|
110
|
+
_optionalChain([res, 'optionalAccess', _ => _.data, 'optionalAccess', _2 => _2.header, 'optionalAccess', _3 => _3.nextPageUrl]) ? res.data.header.hasNext = true : res.data.header.hasNext = false;
|
|
111
|
+
return res;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// src/modules/rank_index.ts
|
|
115
|
+
var getRankIndex = async () => {
|
|
116
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/pc/bmw/rank/rank-index/v1.0`);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// src/modules/rank_info.ts
|
|
120
|
+
var getRankInfo = async (rankId, page = 1) => {
|
|
121
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/rank/rank-info/v1.0?pageNo=${page}&rankId=${rankId}`);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
// src/modules/recommend_playlist.ts
|
|
125
|
+
var getRecommendPlaylist = async () => {
|
|
126
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/index-show/recommend-playlist/v3.0`);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// src/modules/recommend_song.ts
|
|
130
|
+
var getSceneRecommend = async (scene = "TODAY_RECOMMEND", size = 10) => {
|
|
131
|
+
let params = "";
|
|
132
|
+
if (scene === "PRIVATE_FM") {
|
|
133
|
+
params = "scene=PRIVATE_FM&algorithm=v1&action=1";
|
|
134
|
+
} else if (scene === "TODAY_RECOMMEND") {
|
|
135
|
+
params = `scene=TODAY_RECOMMEND&action=1&size=${size}`;
|
|
136
|
+
} else {
|
|
137
|
+
return { error: "scene\u53C2\u6570\u9519\u8BEF PRIVATE_FM \u6216 TODAY_RECOMMEND" };
|
|
138
|
+
}
|
|
139
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
140
|
+
`https://app.c.nf.migu.cn/pc/resource-dataloader/recommend-song/v1.0?${params}`,
|
|
141
|
+
{
|
|
142
|
+
headers: {
|
|
143
|
+
"deviceId": _chunkQEH62Z4Scjs.getDeviceId.call(void 0, )
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// src/modules/recommend_radio.ts
|
|
150
|
+
var getRadioRecommend = async (type = 1) => {
|
|
151
|
+
if (type !== 1 && type !== 2) {
|
|
152
|
+
return { error: "type must be 1 or 2" };
|
|
153
|
+
}
|
|
154
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
155
|
+
`https://app.c.nf.migu.cn/pc/column/music-radio/recommend/song/v2.0?remain=0&actionId=1&type=${type}`,
|
|
156
|
+
{
|
|
157
|
+
method: "GET",
|
|
158
|
+
headers: {
|
|
159
|
+
"Referer": "https://music.migu.cn/",
|
|
160
|
+
"channel": "014X031",
|
|
161
|
+
"deviceId": _chunkQEH62Z4Scjs.getDeviceId.call(void 0, ),
|
|
162
|
+
"recommendstatus": "1"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// src/modules/comment.ts
|
|
169
|
+
var getComment = async (resourceId, resourceType = 2, size = 20, hotCommentStart = 0) => {
|
|
170
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://u.musicapp.migu.cn/MIGUM3.0/user/comment/stack/v1.0?resourceId=${resourceId}&resourceType=${resourceType}&pageSize=${size}&hotCommentStart=${hotCommentStart}&platformType=1&commentId=0&queryType=1`);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
// src/modules/resourceinfo.ts
|
|
174
|
+
var getResourceInfo = async (resourceIds = "", copyrightIds = "", resourceType = 2) => {
|
|
175
|
+
resourceIds = resourceIds.replace(/,/g, "|");
|
|
176
|
+
copyrightIds = copyrightIds.replace(/,/g, "|");
|
|
177
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.u.nf.migu.cn/MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${resourceIds}©rightId=${copyrightIds}&resourceType=${resourceType}`);
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// src/modules/can-listen.ts
|
|
181
|
+
var checkCanListen = async (contentIds) => {
|
|
182
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
183
|
+
`https://app.c.nf.migu.cn/strategy/pc/can-listen/v1.0`,
|
|
184
|
+
{
|
|
185
|
+
method: "post",
|
|
186
|
+
headers: {
|
|
187
|
+
"Content-Type": "application/json",
|
|
188
|
+
"channel": "014X031"
|
|
189
|
+
// music.migu.cn
|
|
190
|
+
},
|
|
191
|
+
body: JSON.stringify({
|
|
192
|
+
"contentIds": contentIds
|
|
193
|
+
})
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// src/modules/opNum.ts
|
|
199
|
+
var getOpNum = async (ids) => {
|
|
200
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/opnum/query-optype-v1.0?opType=play&resourceType=2021&ids=${ids}`);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// src/modules/url_v1.ts
|
|
204
|
+
var getUrlV1 = async (contentId, copyrightId, toneFlag = "PQ", resourceType = "2") => {
|
|
205
|
+
const data = await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
206
|
+
`https://app.c.nf.migu.cn/MIGUM3.0/strategy/pc/listen/v1.0?contentId=${contentId}©rightId=${copyrightId}&resourceType=${resourceType}&toneFlag=PQ`,
|
|
207
|
+
{
|
|
208
|
+
headers: {
|
|
209
|
+
"Channel": "014X031"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
data.data.oriUrl = data.data.url || "";
|
|
214
|
+
data.data.url = _chunkILRMRBMKcjs.changeQuality.call(void 0, data.data.url || "", toneFlag, "PQ", true);
|
|
215
|
+
return data;
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
// src/modules/url_v2.ts
|
|
219
|
+
var _axios = require('axios'); var _axios2 = _interopRequireDefault(_axios);
|
|
220
|
+
var getUrlV2 = async (contentId, copyrightId, toneFlag = "PQ", pacmtoken = "") => {
|
|
221
|
+
const deviceId = _chunkQEH62Z4Scjs.getDeviceId.call(void 0, );
|
|
222
|
+
const timestamp = Date.now();
|
|
223
|
+
const headers = {
|
|
224
|
+
"channel": "014X031",
|
|
225
|
+
"subchannel": "014X031",
|
|
226
|
+
"pacmtoken": pacmtoken,
|
|
227
|
+
"deviceId": deviceId,
|
|
228
|
+
"ua": "Android_migu",
|
|
229
|
+
"version": "6.8.8",
|
|
230
|
+
"activityId": "MUSIC-WWW",
|
|
231
|
+
"birth": "h5page",
|
|
232
|
+
"signature": "1",
|
|
233
|
+
"timestamp": timestamp.toString(),
|
|
234
|
+
"referer": "https://music.migu.cn/"
|
|
235
|
+
};
|
|
236
|
+
const res = await _axios2.default.get(
|
|
237
|
+
`https://app.c.nf.migu.cn/strategy/pc/listen/v2.0?contentId=${contentId}©rightId=${copyrightId}&scene=&netType=01&resourceType=2&toneFlag=${toneFlag}`,
|
|
238
|
+
{
|
|
239
|
+
headers,
|
|
240
|
+
responseType: "arraybuffer"
|
|
241
|
+
}
|
|
242
|
+
);
|
|
243
|
+
return await decryptData(res.data);
|
|
244
|
+
};
|
|
245
|
+
var SECURE = "Jk8qzuePiJ1qE3mDYhLQ3T73DtDoAhLP";
|
|
246
|
+
var aw = 171;
|
|
247
|
+
var iw = 205;
|
|
248
|
+
var ow = 1;
|
|
249
|
+
function textEncode(e) {
|
|
250
|
+
return new TextEncoder().encode(e);
|
|
251
|
+
}
|
|
252
|
+
function textDecode(e) {
|
|
253
|
+
return new TextDecoder("utf-8").decode(e);
|
|
254
|
+
}
|
|
255
|
+
function decryptBlob(e, r) {
|
|
256
|
+
if (r.length == 0)
|
|
257
|
+
return null;
|
|
258
|
+
var n = e.length;
|
|
259
|
+
if (n < 4 || !(e[0] == aw && e[1] == iw) || e[2] != ow)
|
|
260
|
+
return null;
|
|
261
|
+
for (var t = e[3], a = textEncode(r), i = a.length, o = new Uint8Array(n - 4), s = 0, c = 4; c < n; c++, s++)
|
|
262
|
+
o[s] = e[c] + t - a[s % i];
|
|
263
|
+
return o;
|
|
264
|
+
}
|
|
265
|
+
function decryptData(buf) {
|
|
266
|
+
let l = buf, a = SECURE, u = decryptBlob(new Uint8Array(l), a), p = u ? textDecode(u) : null;
|
|
267
|
+
try {
|
|
268
|
+
const data = p ? JSON.parse(p) : null;
|
|
269
|
+
return data;
|
|
270
|
+
} catch (e) {
|
|
271
|
+
return null;
|
|
272
|
+
}
|
|
273
|
+
;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
// src/modules/url_h5v2.4.ts
|
|
277
|
+
|
|
278
|
+
var getUrlH5V24 = async (contentId, copyrightId, toneFlag = "PQ") => {
|
|
279
|
+
const headers = {
|
|
280
|
+
"birth": "h5page",
|
|
281
|
+
"channel": "014X031",
|
|
282
|
+
"Referer": "https://y.migu.cn/",
|
|
283
|
+
"location-data": "30.6698676660,104.1229614820",
|
|
284
|
+
"location-info": ""
|
|
285
|
+
};
|
|
286
|
+
const res = await _axios2.default.get(
|
|
287
|
+
`https://c.musicapp.migu.cn/strategy/listen-url/h5/v2.4?contentId=${contentId}©rightId=${copyrightId}&resourceType=2&netType=01&toneFlag=PQ&scene=&lowerQualityContentId=${contentId}`,
|
|
288
|
+
{
|
|
289
|
+
headers,
|
|
290
|
+
responseType: "arraybuffer"
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
const data = await decryptData2(res.data);
|
|
294
|
+
if (_optionalChain([data, 'optionalAccess', _4 => _4.data, 'optionalAccess', _5 => _5.url]) === "") {
|
|
295
|
+
return { success: false, error: "URL \u4E3A\u7A7A" };
|
|
296
|
+
}
|
|
297
|
+
data.data.oriUrl = data.data.url || "";
|
|
298
|
+
data.data.url = _chunkILRMRBMKcjs.changeQuality.call(void 0, data.data.url || "", toneFlag, "PQ", true);
|
|
299
|
+
return data;
|
|
300
|
+
};
|
|
301
|
+
var SECURE2 = ["Jk8qzuePiJ1qE3mDYhLQ3T73DtDoAhLP"];
|
|
302
|
+
function strToUtf8Bytes(e) {
|
|
303
|
+
return new TextEncoder().encode(e);
|
|
304
|
+
}
|
|
305
|
+
function utf8Bytes2str(bytes) {
|
|
306
|
+
const result = [];
|
|
307
|
+
for (const byte of bytes) {
|
|
308
|
+
if (byte < 16) {
|
|
309
|
+
result.push(String.fromCharCode(byte));
|
|
310
|
+
} else {
|
|
311
|
+
result.push("%");
|
|
312
|
+
result.push(byte.toString(16));
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
return decodeURIComponent(result.join(""));
|
|
316
|
+
}
|
|
317
|
+
function decode(e, t) {
|
|
318
|
+
if (0 == t.length)
|
|
319
|
+
return null;
|
|
320
|
+
var n = e.length;
|
|
321
|
+
if (n < 4)
|
|
322
|
+
return null;
|
|
323
|
+
if (171 != e[0] || 205 != e[1])
|
|
324
|
+
return null;
|
|
325
|
+
if (1 != e[2])
|
|
326
|
+
return null;
|
|
327
|
+
for (var r = e[3], o = strToUtf8Bytes(t), a = o.length, i = new Uint8Array(n - 4), s = 0, c = 4; c < n; c++, s++)
|
|
328
|
+
i[s] = e[c] + r - o[s % a];
|
|
329
|
+
return i;
|
|
330
|
+
}
|
|
331
|
+
var decryptData2 = (ab) => {
|
|
332
|
+
const r = decode(new Uint8Array(ab), SECURE2[0]);
|
|
333
|
+
const d = utf8Bytes2str(r);
|
|
334
|
+
return JSON.parse(d);
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
// src/modules/version.ts
|
|
338
|
+
var getVersion = async () => {
|
|
339
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
340
|
+
`http://app.c.nf.migu.cn/column/client/version/v1.0`,
|
|
341
|
+
{
|
|
342
|
+
headers: {
|
|
343
|
+
"ua": "Android_migu",
|
|
344
|
+
"version": "0.0.1"
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
// src/modules/mv_info.ts
|
|
351
|
+
var getMvInfo = async (mvContentIds) => {
|
|
352
|
+
mvContentIds = mvContentIds.replace(/,/g, "|");
|
|
353
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://c.musicapp.migu.cn/MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${mvContentIds}&resourceType=D&needSimple=01`);
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// src/modules/mv_hls.ts
|
|
357
|
+
var getMvHls = async (mvContentId, mvCopyrightId, url, size, format = "050012", needHttps = true) => {
|
|
358
|
+
url = encodeURIComponent(url);
|
|
359
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
360
|
+
`https://c.musicapp.migu.cn/MIGUM2.0/v1.0/content/mvplayinfo.do?format=${format}&mvContentId=${mvContentId}&mvCopyrightId=${mvCopyrightId}&needHttps=${needHttps}&size=${size}&url=${url}`,
|
|
361
|
+
{
|
|
362
|
+
method: "GET",
|
|
363
|
+
headers: {
|
|
364
|
+
"Channel": "014021I"
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
);
|
|
368
|
+
};
|
|
369
|
+
|
|
370
|
+
// src/modules/passport_checkToken.ts
|
|
371
|
+
var checkToken = async (token = "") => {
|
|
372
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
373
|
+
`https://c.musicapp.migu.cn/mgateway/api/checkPacMtoken`,
|
|
374
|
+
{
|
|
375
|
+
headers: {
|
|
376
|
+
"pacmtoken": token
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
);
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
// src/modules/passport_pacmToken.ts
|
|
383
|
+
var getPacmToken = async (token = "", type = "2", sourceId = "220029", activityId = "MUSIC-WWW") => {
|
|
384
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0,
|
|
385
|
+
`https://c.musicapp.migu.cn/user/h5/token-validate/v3.0?token=${token}&type=${type}&sourceId=${sourceId}&activityId=${activityId}`,
|
|
386
|
+
{
|
|
387
|
+
cookie: { idmpauth: "true@passport.migu.cn" },
|
|
388
|
+
headers: {
|
|
389
|
+
"Origin": "https://music.migu.cn",
|
|
390
|
+
"Pragma": "no-cache",
|
|
391
|
+
"Referer": "https://music.migu.cn/"
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
);
|
|
395
|
+
const pacmToken = cookies.pacmtoken || "";
|
|
396
|
+
return { pacmToken, body: data };
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
// src/modules/ticket.ts
|
|
400
|
+
var getTicketInfo = async (page = 1, size = 20) => {
|
|
401
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/MIGUM3.0/v1.0/ticket/home/ticket?pageNum=${page}&pageCount=${size}`);
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
// src/modules/user_badge.ts
|
|
405
|
+
var getUserBadge = async (pacmtoken) => {
|
|
406
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/pc/open/api/member/icon/v1.0", {
|
|
407
|
+
cookie: { pacmtoken },
|
|
408
|
+
headers: {
|
|
409
|
+
"Referer": "https://music.migu.cn/",
|
|
410
|
+
"channel": "014X031",
|
|
411
|
+
"timestamp": Date.now().toString()
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
// src/modules/user_queryInfo.ts
|
|
418
|
+
var queryUserInfo = async (pacmtoken) => {
|
|
419
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/pc/user/h5/queryUserInfo/v1.0", {
|
|
420
|
+
cookie: { pacmtoken },
|
|
421
|
+
headers: {
|
|
422
|
+
"channel": "014X031",
|
|
423
|
+
"Referer": "https://music.migu.cn/"
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
// src/modules/user_homePage.ts
|
|
430
|
+
var getUserHomePage = async (pacmtoken) => {
|
|
431
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/pc/user/home-page/v2.0", {
|
|
432
|
+
cookie: { pacmtoken }
|
|
433
|
+
});
|
|
434
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
// src/modules/user_recom_today.ts
|
|
438
|
+
var getTodayRecommend = async (pacmtoken) => {
|
|
439
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/pc/v1.0/template/todayRecommendList/release?actionId=1&index=1&templateVersion=5", {
|
|
440
|
+
cookie: { pacmtoken }
|
|
441
|
+
});
|
|
442
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
// src/modules/user_collect_list.ts
|
|
446
|
+
var getUserCollectList = async (pacmtoken, page = 1, size = 20) => {
|
|
447
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/user/h5/user/collection/v1.0?pageNo=${page}&type=1&OPType=03&pageSize=${size}&resourceType=2021`, {
|
|
448
|
+
cookie: { pacmtoken }
|
|
449
|
+
});
|
|
450
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
// src/modules/user_myList.ts
|
|
454
|
+
var getUserMyList = async (pacmtoken, queryType = 0, page = 1, size = 20) => {
|
|
455
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/user/h5/my-music-list/v1.0?queryType=${queryType}&pageNo=${page}&pageSize=${size}`, {
|
|
456
|
+
cookie: { pacmtoken }
|
|
457
|
+
});
|
|
458
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
// src/modules/singer_similar.ts
|
|
462
|
+
var getSingerSimilar = async (singerId) => {
|
|
463
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/bmw/recommend-singer/similar/v1.0?singerId=${singerId}`);
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
// src/modules/recommend_similarSong.ts
|
|
467
|
+
var getSimilarSongRecommend = async (contentId = "") => {
|
|
468
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
469
|
+
`https://app.c.nf.migu.cn/bmw/recommend-song/similar/v1.0?contentId=${contentId}`,
|
|
470
|
+
{
|
|
471
|
+
method: "GET",
|
|
472
|
+
headers: {
|
|
473
|
+
"deviceId": _chunkQEH62Z4Scjs.getDeviceId.call(void 0, ),
|
|
474
|
+
"recommendstatus": "1"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
);
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
// src/modules/mv_recommend.ts
|
|
481
|
+
var getMVRecommend = async (mvContentId, page = 1) => {
|
|
482
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://c.musicapp.migu.cn/MIGUM3.0/v3.0/content/recommend-mv?resourceId=${mvContentId}&pageNumber=${page}&resourceType=D`);
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
// src/modules/playlist_square_page.ts
|
|
486
|
+
var getSquarePage = async () => {
|
|
487
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/pc/bmw/page-data/playlist-square-recommend/v1.0?templateVersion=2`);
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
// src/modules/search_lrc.ts
|
|
491
|
+
var searchLrc = async (text, page = 1) => {
|
|
492
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/search/lrc/v1.0?pageNo=${page}&text=${text}`);
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
// src/modules/recommend_radio_all.ts
|
|
496
|
+
var getRadioRecommendAll = async (pacmtoken = "") => {
|
|
497
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/pc/bmw/page-data/music-radio/v1.0?templateVersion=1`, {
|
|
498
|
+
cookie: pacmtoken ? { pacmtoken } : void 0
|
|
499
|
+
});
|
|
500
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
// src/modules/svideo_info.ts
|
|
504
|
+
var getSVideoInfo = async (contentIds) => {
|
|
505
|
+
const contentIdList = contentIds.split(",");
|
|
506
|
+
contentIdList.map((item) => {
|
|
507
|
+
return "6000," + item;
|
|
508
|
+
}).join("|");
|
|
509
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/resource/video-info/by-id/v1.0?requestParams=${contentIdList}`);
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
// src/modules/svideo_search.ts
|
|
513
|
+
var searchSVideo = async (text, page = 1) => {
|
|
514
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
515
|
+
`https://app.c.nf.migu.cn/bmw/hot-search/search/videos/v1.0?pageIndex=${page}&text=${text}`,
|
|
516
|
+
{
|
|
517
|
+
headers: {
|
|
518
|
+
"deviceid": _chunkQEH62Z4Scjs.getDeviceId.call(void 0, )
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
);
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
// src/modules/svideo_searchSuggest.ts
|
|
525
|
+
var getSVideoSearchSuggest = async (text) => {
|
|
526
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/resource-dataloader/search-suggest/search/v1.0?text=${text}`);
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
// src/modules/svideo_url.ts
|
|
530
|
+
var getSVideoUrl = async (contentIds, formatType = "HQ") => {
|
|
531
|
+
contentIds = contentIds.replace(/,/g, "|");
|
|
532
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/strategy/short-video/play/v1.0?contentIds=${contentIds}&formatType=${formatType}`);
|
|
533
|
+
};
|
|
534
|
+
|
|
535
|
+
// src/modules/svideo_userContent.ts
|
|
536
|
+
var getSVideoUserContent = async (videoUserId, nextPageId = "") => {
|
|
537
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/user/i/user-content-list/v1.0?nextPageId=${nextPageId}&videoUserId=${videoUserId}`);
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
// src/modules/vrbt_opNum.ts
|
|
541
|
+
var getVrbtOpNum = async (contentIds) => {
|
|
542
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/resource/vrbt/opnum/v1.0?resourceType=M&contentIds=${contentIds}`);
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
// src/modules/vrbt_url.ts
|
|
546
|
+
var getVrbtUrl = async (contentIds) => {
|
|
547
|
+
contentIds = contentIds.replace(/,/g, "|");
|
|
548
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
549
|
+
`https://app.c.nf.migu.cn/strategy/vrbt/play/v1.0?contentIds=${contentIds}`,
|
|
550
|
+
{
|
|
551
|
+
headers: {
|
|
552
|
+
"channel": "014X031"
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
);
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
// src/modules/lyric.ts
|
|
559
|
+
|
|
560
|
+
var getLyric = async (contentId, type = "lrc") => {
|
|
561
|
+
if (contentId === "") return { error: "contentId is empty!", success: false };
|
|
562
|
+
const types = type.split(",");
|
|
563
|
+
if (types.length === 0) return { error: "types is empty!", success: false };
|
|
564
|
+
const res = await _axios2.default.get(`https://app.u.nf.migu.cn/MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${contentId}&resourceType=2`);
|
|
565
|
+
const code = res.data.code.toString() || "";
|
|
566
|
+
const data = res.data.resource[0] || {};
|
|
567
|
+
if (code !== "000000") return {
|
|
568
|
+
success: false,
|
|
569
|
+
status: res.status,
|
|
570
|
+
error: res.data.info || res.data
|
|
571
|
+
};
|
|
572
|
+
if (data.length === 0) return { error: "data.length = 0 !", success: false, data };
|
|
573
|
+
let lrc, lrcUrl, trc, trcUrl;
|
|
574
|
+
if (types.includes("lrc")) {
|
|
575
|
+
lrcUrl = data.lrcUrl || "";
|
|
576
|
+
if (lrcUrl !== "") {
|
|
577
|
+
const lrcRes = await _axios2.default.get(lrcUrl);
|
|
578
|
+
if (lrcRes.status === 200) {
|
|
579
|
+
lrc = lrcRes.data || "";
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
if (types.includes("trc")) {
|
|
584
|
+
trcUrl = data.trcUrl || "";
|
|
585
|
+
if (trcUrl !== "") {
|
|
586
|
+
const trcRes = await _axios2.default.get(trcUrl);
|
|
587
|
+
if (trcRes.status === 200) {
|
|
588
|
+
trc = trcRes.data || "";
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
return {
|
|
593
|
+
success: true,
|
|
594
|
+
lrc,
|
|
595
|
+
lrcUrl,
|
|
596
|
+
trc,
|
|
597
|
+
trcUrl
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
// src/modules/user_collect_add.ts
|
|
602
|
+
var addUserCollect = async (pacmtoken, type, contentId, title, userId) => {
|
|
603
|
+
let jsonParams = {};
|
|
604
|
+
if (type === "playlist") {
|
|
605
|
+
jsonParams = {
|
|
606
|
+
outOPType: "03",
|
|
607
|
+
outResourceType: "2021",
|
|
608
|
+
outResourceId: contentId,
|
|
609
|
+
outResourceName: encodeURIComponent(title || "")
|
|
610
|
+
};
|
|
611
|
+
} else if (type === "comment") {
|
|
612
|
+
jsonParams = {
|
|
613
|
+
outOPType: "08",
|
|
614
|
+
outResourceType: "3002",
|
|
615
|
+
outOwner: userId,
|
|
616
|
+
outResourceId: contentId,
|
|
617
|
+
outResourceName: "%E8%AF%84%E8%AE%BA"
|
|
618
|
+
//=评论
|
|
619
|
+
};
|
|
620
|
+
} else if (type === "album") {
|
|
621
|
+
jsonParams = {
|
|
622
|
+
outOPType: "03",
|
|
623
|
+
outResourceType: "2003",
|
|
624
|
+
outResourceId: contentId,
|
|
625
|
+
outResourceName: encodeURIComponent(title || "")
|
|
626
|
+
};
|
|
627
|
+
} else {
|
|
628
|
+
return { success: false, err: "\u672A\u77E5type\u7C7B\u578B -playlist\u6216comment\u6216album" };
|
|
629
|
+
}
|
|
630
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0,
|
|
631
|
+
`https://app.u.nf.migu.cn/MIGUM2.0/v1.0/user/add_collection.do`,
|
|
632
|
+
{ params: jsonParams, cookie: { pacmtoken } }
|
|
633
|
+
);
|
|
634
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
// src/modules/user_collect_remove.ts
|
|
638
|
+
var removeUserCollect = async (pacmtoken, type, contentId, userId) => {
|
|
639
|
+
let jsonParams = {};
|
|
640
|
+
if (type === "playlist") {
|
|
641
|
+
jsonParams = {
|
|
642
|
+
OPType: "03",
|
|
643
|
+
resourceType: "2021",
|
|
644
|
+
resourceId: contentId
|
|
645
|
+
};
|
|
646
|
+
} else if (type === "comment") {
|
|
647
|
+
jsonParams = {
|
|
648
|
+
OPType: "08",
|
|
649
|
+
resourceType: "3002",
|
|
650
|
+
outOwner: userId,
|
|
651
|
+
resourceId: contentId
|
|
652
|
+
};
|
|
653
|
+
} else if (type === "album") {
|
|
654
|
+
jsonParams = {
|
|
655
|
+
OPType: "03",
|
|
656
|
+
resourceType: "2003",
|
|
657
|
+
resourceId: contentId
|
|
658
|
+
};
|
|
659
|
+
} else {
|
|
660
|
+
return { success: false, err: "\u672A\u77E5type\u7C7B\u578B -playlist,comment\u6216album" };
|
|
661
|
+
}
|
|
662
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0,
|
|
663
|
+
`https://app.u.nf.migu.cn/MIGUM2.0/v1.0/user/del_collection.do`,
|
|
664
|
+
{ params: jsonParams, cookie: { pacmtoken } }
|
|
665
|
+
);
|
|
666
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
// src/modules/user_like_add.ts
|
|
670
|
+
var likeSong = async (pacmtoken, contentIds) => {
|
|
671
|
+
const contentIdsList = contentIds.split(",");
|
|
672
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/pc/user/api/add-music-list-song/v1.0`, {
|
|
673
|
+
method: "POST",
|
|
674
|
+
cookie: { pacmtoken },
|
|
675
|
+
body: JSON.stringify({
|
|
676
|
+
contentIds: contentIdsList
|
|
677
|
+
}),
|
|
678
|
+
headers: {
|
|
679
|
+
"Content-Type": "application/json"
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
683
|
+
};
|
|
684
|
+
|
|
685
|
+
// src/modules/user_dislike.ts
|
|
686
|
+
var dislikeSong = async (pacmtoken, contentId) => {
|
|
687
|
+
const body = {
|
|
688
|
+
"channel": "23",
|
|
689
|
+
"contentId": contentId,
|
|
690
|
+
"songflag": "2"
|
|
691
|
+
};
|
|
692
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`, {
|
|
693
|
+
method: "POST",
|
|
694
|
+
cookie: { pacmtoken },
|
|
695
|
+
body: JSON.stringify(body),
|
|
696
|
+
headers: {
|
|
697
|
+
"Content-Type": "application/json"
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
// src/modules/user_myList_edit.ts
|
|
704
|
+
var editUserMyList = async (pacmtoken, title, playlistId) => {
|
|
705
|
+
const body = {
|
|
706
|
+
"title": title,
|
|
707
|
+
"channel": "23",
|
|
708
|
+
"id": playlistId,
|
|
709
|
+
"songflag": "0"
|
|
710
|
+
};
|
|
711
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`, {
|
|
712
|
+
method: "POST",
|
|
713
|
+
cookie: { pacmtoken },
|
|
714
|
+
body: JSON.stringify(body),
|
|
715
|
+
headers: {
|
|
716
|
+
"Content-Type": "application/json"
|
|
717
|
+
}
|
|
718
|
+
});
|
|
719
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
// src/modules/user_myList_add.ts
|
|
723
|
+
var addUserMyList = async (pacmtoken, title) => {
|
|
724
|
+
const body = {
|
|
725
|
+
"title": title,
|
|
726
|
+
"channel": "23",
|
|
727
|
+
"type": "self_build"
|
|
728
|
+
};
|
|
729
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/pc/open/api/music-list/add/v2.0`, {
|
|
730
|
+
method: "POST",
|
|
731
|
+
cookie: { pacmtoken },
|
|
732
|
+
body: JSON.stringify(body),
|
|
733
|
+
headers: {
|
|
734
|
+
"Content-Type": "application/json"
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
// src/modules/user_myList_remove.ts
|
|
741
|
+
var removeUserMyList = async (pacmtoken, playlistId) => {
|
|
742
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/pc/v1.0/user/deleteMusicList.do?channel=23&id=${playlistId}`, {
|
|
743
|
+
cookie: { pacmtoken }
|
|
744
|
+
});
|
|
745
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
746
|
+
};
|
|
747
|
+
|
|
748
|
+
// src/modules/radio_song.ts
|
|
749
|
+
var getRadioSong = async (radioId, page = 1) => {
|
|
750
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/pc/column/music-radio/scene/song/v3.0?remain=0&pageNo=${page}&actionId=1&radioId=${radioId}`);
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
// src/modules/column_newCD.ts
|
|
754
|
+
var getNewCDList = async () => {
|
|
755
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/pc/v1.0/template/get-new-cd-list-header`);
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
// src/modules/column_newSong.ts
|
|
759
|
+
var getNewSongList = async () => {
|
|
760
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/pc/v1.0/template/get-new-music-list-header`);
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
// src/modules/column_info.ts
|
|
764
|
+
var getColumnInfo = async (columnId) => {
|
|
765
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/column/column-info/h5/v2.0?columnId=${columnId}`);
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
// src/modules/user_myList_song_add.ts
|
|
769
|
+
var addSongToMyList = async (pacmtoken, playlistId, contentIds) => {
|
|
770
|
+
const body = {
|
|
771
|
+
"id": playlistId,
|
|
772
|
+
"contentIds": contentIds.split(",")
|
|
773
|
+
};
|
|
774
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/pc/user/api/add-music-list-song/v1.0`, {
|
|
775
|
+
method: "POST",
|
|
776
|
+
cookie: { pacmtoken },
|
|
777
|
+
body: JSON.stringify(body),
|
|
778
|
+
headers: {
|
|
779
|
+
"Content-Type": "application/json"
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
// src/modules/user_myList_song_remove.ts
|
|
786
|
+
var removeSongFromMyList = async (pacmtoken, playlistId, contentId) => {
|
|
787
|
+
const body = {
|
|
788
|
+
"channel": "23",
|
|
789
|
+
"songflag": "2",
|
|
790
|
+
"contentId": contentId,
|
|
791
|
+
"id": playlistId
|
|
792
|
+
};
|
|
793
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`, {
|
|
794
|
+
method: "POST",
|
|
795
|
+
cookie: { pacmtoken },
|
|
796
|
+
body: JSON.stringify(body),
|
|
797
|
+
headers: {
|
|
798
|
+
"Content-Type": "application/json"
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
// src/modules/svideo_userInfo.ts
|
|
805
|
+
var getSVideoUserInfo = async (type, uid = "", videoUserId = "") => {
|
|
806
|
+
let url = "https://app.c.nf.migu.cn/resource/video-user";
|
|
807
|
+
if (type === "uid") {
|
|
808
|
+
url += `/by-uid/v1.0?uid=${uid}`;
|
|
809
|
+
} else if (type === "videoUserId") {
|
|
810
|
+
url += `/by-id/v1.0?videoUserId=${videoUserId}`;
|
|
811
|
+
} else {
|
|
812
|
+
return { error: "Invalid parameter type", success: false };
|
|
813
|
+
}
|
|
814
|
+
return _chunkZEGJU5LWcjs.h5fetch.call(void 0, url);
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
// src/modules/concert_info.ts
|
|
818
|
+
var getConcertInfo = async (concertId) => {
|
|
819
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://c.musicapp.migu.cn/MIGUM2.0/v2.0/content/queryConcertSummary.do?columnId=${concertId}`);
|
|
820
|
+
};
|
|
821
|
+
|
|
822
|
+
// src/modules/concert_url.ts
|
|
823
|
+
var getConcertUrl = async (concertId, liveId, rateLevel = 1) => {
|
|
824
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
825
|
+
`http://c.musicapp.migu.cn/MIGUM2.0/v2.1/danmaku/liveServerHosts.do?concertId=${concertId}&liveId=${liveId}&liveType=1&rateLevel=${rateLevel}`,
|
|
826
|
+
{
|
|
827
|
+
headers: {
|
|
828
|
+
"channel": "0146921"
|
|
829
|
+
//android client
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
);
|
|
833
|
+
};
|
|
834
|
+
|
|
835
|
+
// src/modules/concert_detail.ts
|
|
836
|
+
var getConcertDetail = async (concertId) => {
|
|
837
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/MIGUM3.0/v1.0/template/concert-detail/release?columnId=${concertId}&templateVersion=10`);
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
// src/modules/concert_comment.ts
|
|
841
|
+
var getConcertComment = async (concertId, page = 1, size = 20) => {
|
|
842
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://b.musicapp.migu.cn/MIGUM2.0/v1.0/danmaku/danmakuHisListPage.do?page=${page}&pageSize=${size}&resourceId=${concertId}`);
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
// src/modules/playlist_match.ts
|
|
846
|
+
var matchPlaylist = async (url) => {
|
|
847
|
+
url = encodeURIComponent(url);
|
|
848
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://c.musicapp.migu.cn/v1.0/content/get-import-songList?url=${url}`);
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
// src/modules/url_redirect.ts
|
|
852
|
+
|
|
853
|
+
var getRedirectUrl = async (contentId, toneFlag = "PQ", copyrightId, isVip = true) => {
|
|
854
|
+
if (isVip && (!copyrightId || copyrightId === "0")) return "";
|
|
855
|
+
return await _axios2.default.head(
|
|
856
|
+
isVip ? `https://c.musicapp.migu.cn/strategy/listen-song/v2.3` : `https://app.pd.nf.migu.cn/MIGUM2.0/v1.0/content/sub/listenSong.do`,
|
|
857
|
+
{
|
|
858
|
+
maxRedirects: 0,
|
|
859
|
+
params: {
|
|
860
|
+
"toneFlag": "PQ",
|
|
861
|
+
"copyrightId": copyrightId || "0",
|
|
862
|
+
"contentId": contentId,
|
|
863
|
+
"resourceType": "2",
|
|
864
|
+
"channel": "0146921"
|
|
865
|
+
},
|
|
866
|
+
headers: { "User-Agent": "okhttp/3.14.9" }
|
|
867
|
+
// !==null
|
|
868
|
+
}
|
|
869
|
+
).catch((err) => err.response).then((res) => _nullishCoalesce(_optionalChain([res, 'optionalAccess', _6 => _6.headers, 'optionalAccess', _7 => _7.location, 'optionalAccess', _8 => _8.split, 'call', _9 => _9("?"), 'access', _10 => _10[0]]), () => ( ""))).then((url) => _chunkILRMRBMKcjs.changeQuality.call(void 0, url, toneFlag, "PQ"));
|
|
870
|
+
};
|
|
871
|
+
|
|
872
|
+
// src/modules/concert_mv.ts
|
|
873
|
+
var getConcertRecommendMv = async (concertId) => {
|
|
874
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/v1.0/liveshow/query-mv-detail?concertId=${concertId}`);
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
// src/modules/mv_song.ts
|
|
878
|
+
var getMvBySong = async (songId) => {
|
|
879
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
880
|
+
`https://app.c.nf.migu.cn/MIGUM2.0/strategy/mv-player/video/v1.0?songId=${songId}`,
|
|
881
|
+
{
|
|
882
|
+
headers: {
|
|
883
|
+
"channel": "0146921"
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
);
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
// src/modules/user_isFollow.ts
|
|
890
|
+
var isFollowAuthor = async (pacmtoken, authorIds, authorType = "singer") => {
|
|
891
|
+
const authorList = authorIds.split(",");
|
|
892
|
+
if (authorList.length === 0 || authorType === "" || authorList.length > 100) {
|
|
893
|
+
return { success: false, data: { error: "\u4F5C\u8005id\u5217\u8868\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u4E14\u6700\u591A100\u4E2A" }, newPacmToken: "" };
|
|
894
|
+
}
|
|
895
|
+
const authors = authorList.map(function(authorId) {
|
|
896
|
+
return {
|
|
897
|
+
"authorId": authorId,
|
|
898
|
+
"authorType": authorType
|
|
899
|
+
};
|
|
900
|
+
});
|
|
901
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0,
|
|
902
|
+
`https://app.u.nf.migu.cn/user/i/social/is-follow-subscribe/v1.0`,
|
|
903
|
+
{
|
|
904
|
+
method: "POST",
|
|
905
|
+
cookie: { pacmtoken },
|
|
906
|
+
headers: { "Content-Type": "application/json" },
|
|
907
|
+
body: JSON.stringify({
|
|
908
|
+
"actionType": 2,
|
|
909
|
+
authors
|
|
910
|
+
})
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
914
|
+
};
|
|
915
|
+
|
|
916
|
+
// src/modules/playlist_vip.ts
|
|
917
|
+
var getVipPlaylist = async (size = 10) => {
|
|
918
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/bmw/vip-exclusive/auditions-list/v1.0?pageSize=${size}`);
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
// src/modules/user_page_header.ts
|
|
922
|
+
var getUserHeader = async (userId) => {
|
|
923
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
924
|
+
`https://app.c.nf.migu.cn/user/api/my-page-header/v1.0`,
|
|
925
|
+
{ params: { userId } }
|
|
926
|
+
);
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
// src/modules/user_page_song.ts
|
|
930
|
+
var getUserSongPage = async (userId, videoUserId) => {
|
|
931
|
+
if (!userId && !videoUserId) {
|
|
932
|
+
return { data: { error: "userId or videoUserId is required" } };
|
|
933
|
+
}
|
|
934
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
935
|
+
`https://app.c.nf.migu.cn/user/api/my-page-music/v1.0`,
|
|
936
|
+
{
|
|
937
|
+
params: { userId, videoUserId },
|
|
938
|
+
headers: { "channel": "0146931" }
|
|
939
|
+
}
|
|
940
|
+
);
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
// src/modules/page_info.ts
|
|
944
|
+
var getPageInfo = async (id, type) => {
|
|
945
|
+
if (!id && !type) {
|
|
946
|
+
return { success: false, data: { error: "id and type is required" } };
|
|
947
|
+
}
|
|
948
|
+
if (!["pageId", "sceneId"].includes(type)) {
|
|
949
|
+
return { success: false, data: { error: "choose pageId or sceneId to get page info" } };
|
|
950
|
+
}
|
|
951
|
+
const base = "https://app.c.nf.migu.cn/bmw", h = { headers: { recommendstatus: "1" } };
|
|
952
|
+
if (type === "pageId") return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `${base}/page-info/v2.0?pageId=${id}`, h);
|
|
953
|
+
if (type === "sceneId") return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `${base}/page/view/v1.0?columnId=${id}`, h);
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
// src/modules/page_tab.ts
|
|
957
|
+
var getPageTab = async () => {
|
|
958
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/bmw/music/nav-bar/v1.0`);
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
// src/modules/svideo_recommend.ts
|
|
962
|
+
var getSVideoRecommend = async (pacmtoken) => {
|
|
963
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/resource-dataloader/recommend-video/v2.0", {
|
|
964
|
+
method: "GET",
|
|
965
|
+
cookie: { pacmtoken },
|
|
966
|
+
params: {
|
|
967
|
+
currentScreen: 1,
|
|
968
|
+
scene: "home_selected"
|
|
969
|
+
},
|
|
970
|
+
headers: { "Content-Type": "application/json" }
|
|
971
|
+
});
|
|
972
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
// src/modules/follow_following_vra.ts
|
|
976
|
+
var getFollowingVra = async (userId, page = 1) => {
|
|
977
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
978
|
+
`https://app.c.nf.migu.cn/bmw/page-data/vrbt/follow-videouserlist/v2.0`,
|
|
979
|
+
{ params: {
|
|
980
|
+
offset: page - 1,
|
|
981
|
+
templateVersion: 1,
|
|
982
|
+
uid: userId
|
|
983
|
+
} }
|
|
984
|
+
);
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
// src/modules/follow_follower.ts
|
|
988
|
+
var getFollowerList = async (params) => {
|
|
989
|
+
if (params.type === "music") return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
990
|
+
`https://app.c.nf.migu.cn/MIGUM2.0/v1.0/user/follower.do`,
|
|
991
|
+
{ params: {
|
|
992
|
+
pageNo: params.page || 1,
|
|
993
|
+
pageSize: params.size || 20,
|
|
994
|
+
userId: params.userId
|
|
995
|
+
} }
|
|
996
|
+
);
|
|
997
|
+
if (params.type === "vrbt") {
|
|
998
|
+
if (!params.userId && !params.videoUserId) return {
|
|
999
|
+
success: false,
|
|
1000
|
+
error: "userId or videoUserId is required"
|
|
1001
|
+
};
|
|
1002
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1003
|
+
`https://app.c.nf.migu.cn/user/i/social/fans-list/v1.0`,
|
|
1004
|
+
{ params: {
|
|
1005
|
+
userId: params.userId,
|
|
1006
|
+
videoUserId: params.videoUserId
|
|
1007
|
+
} }
|
|
1008
|
+
);
|
|
1009
|
+
}
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1012
|
+
// src/modules/follow_following.ts
|
|
1013
|
+
var getFollowingList = async (userId, type, page = 1, size = 20) => {
|
|
1014
|
+
if (!userId) return { success: false, error: "userId is required" };
|
|
1015
|
+
if (type !== "user" && type !== "singer") return { success: false, error: "type is invalid" };
|
|
1016
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1017
|
+
`https://app.c.nf.migu.cn/MIGUM2.0/v1.0/user/followingSingers.do`,
|
|
1018
|
+
{ params: {
|
|
1019
|
+
"pageNo": page,
|
|
1020
|
+
"pageSize": size,
|
|
1021
|
+
"userId": userId,
|
|
1022
|
+
"userType": type === "singer" ? "1" : "2"
|
|
1023
|
+
} }
|
|
1024
|
+
);
|
|
1025
|
+
};
|
|
1026
|
+
|
|
1027
|
+
// src/modules/follow_add.ts
|
|
1028
|
+
var addFollower = async (pacmtoken, singerId) => {
|
|
1029
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0,
|
|
1030
|
+
`https://app.u.nf.migu.cn/user/social/api/add-follow/v1.0`,
|
|
1031
|
+
{
|
|
1032
|
+
params: {
|
|
1033
|
+
"followId": singerId,
|
|
1034
|
+
"type": "1"
|
|
1035
|
+
},
|
|
1036
|
+
cookie: { pacmtoken }
|
|
1037
|
+
}
|
|
1038
|
+
);
|
|
1039
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1040
|
+
};
|
|
1041
|
+
|
|
1042
|
+
// src/modules/follow_remove.ts
|
|
1043
|
+
var removeFollower = async (pacmtoken, singerId) => {
|
|
1044
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0,
|
|
1045
|
+
`https://app.u.nf.migu.cn/user/social/api/delete-follow/v1.0?followId=${singerId}`,
|
|
1046
|
+
{ cookie: { pacmtoken } }
|
|
1047
|
+
);
|
|
1048
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1049
|
+
};
|
|
1050
|
+
|
|
1051
|
+
// src/modules/passport_logout.ts
|
|
1052
|
+
var logout = async (pacmtoken) => {
|
|
1053
|
+
const { data } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://c.musicapp.migu.cn/mgateway/api/clearPacMtoken`, {
|
|
1054
|
+
cookie: { pacmtoken }
|
|
1055
|
+
});
|
|
1056
|
+
return data;
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
// src/modules/share_video.ts
|
|
1060
|
+
var shareVideo = async (resourceType, contentId, userId) => {
|
|
1061
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1062
|
+
`https://app.c.nf.migu.cn/resource/share-info/v2.0`,
|
|
1063
|
+
{ params: {
|
|
1064
|
+
"appId": "music",
|
|
1065
|
+
contentId,
|
|
1066
|
+
shareType: resourceType,
|
|
1067
|
+
uid: userId || void 0
|
|
1068
|
+
} }
|
|
1069
|
+
);
|
|
1070
|
+
};
|
|
1071
|
+
|
|
1072
|
+
// src/modules/share_common.ts
|
|
1073
|
+
var shareCommon = async (resourceType, contentId, contentName, targetUserName, copyrightId) => {
|
|
1074
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1075
|
+
`https://app.c.nf.migu.cn/MIGUM2.0/v1.0/content/shareInfo.do`,
|
|
1076
|
+
{ params: {
|
|
1077
|
+
"appId": "music",
|
|
1078
|
+
resourceType,
|
|
1079
|
+
contentId,
|
|
1080
|
+
contentName,
|
|
1081
|
+
targetUserName,
|
|
1082
|
+
copyrightId: copyrightId || void 0,
|
|
1083
|
+
specialType: ["2003", "5"].includes(resourceType) ? "2" : void 0
|
|
1084
|
+
} }
|
|
1085
|
+
);
|
|
1086
|
+
};
|
|
1087
|
+
|
|
1088
|
+
// src/modules/user_audioBook.ts
|
|
1089
|
+
var getUserAudioBook = async (pacmtoken, recentListenNum = 10, recommendNum = 5) => {
|
|
1090
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://pd.musicapp.migu.cn/bmw/audio-book/my-audio-book/v1.0", {
|
|
1091
|
+
cookie: { pacmtoken },
|
|
1092
|
+
headers: { "isMock": "00" },
|
|
1093
|
+
params: {
|
|
1094
|
+
"recentListenCount": recentListenNum,
|
|
1095
|
+
"recommendCount": recommendNum
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
// src/modules/user_listenRank.ts
|
|
1102
|
+
var getListenRank = async (pacmtoken, type) => {
|
|
1103
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/MIGUM3.0/bmw/listen-song/ranking/v1.0`, {
|
|
1104
|
+
method: "POST",
|
|
1105
|
+
cookie: { pacmtoken },
|
|
1106
|
+
body: JSON.stringify({ "type": type === "year" ? 2 : 1 }),
|
|
1107
|
+
headers: { "Content-Type": "application/json" }
|
|
1108
|
+
});
|
|
1109
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1110
|
+
};
|
|
1111
|
+
|
|
1112
|
+
// src/modules/cloud_url.ts
|
|
1113
|
+
var getCloudUrl = async (pacmtoken, contentId, toneFlag = "PQ") => {
|
|
1114
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/MIGUM3.0/strategy/cloud/listen-url/v1.0", {
|
|
1115
|
+
cookie: { pacmtoken },
|
|
1116
|
+
headers: { "channel": "0146931", "version": "7.41.13" },
|
|
1117
|
+
params: {
|
|
1118
|
+
contentId,
|
|
1119
|
+
"formatType": toneFlag,
|
|
1120
|
+
"type": "0"
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
// src/modules/url_dl_v1.ts
|
|
1127
|
+
var getDLUrlV1 = async (songId, toneFlag = "PQ") => {
|
|
1128
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1129
|
+
`https://app.c.nf.migu.cn/MIGUM2.0/strategy/download-url/by-songid/v1.0`,
|
|
1130
|
+
{
|
|
1131
|
+
headers: { "channel": "0146931", "version": "7.41.13" },
|
|
1132
|
+
params: {
|
|
1133
|
+
"formatType": toneFlag,
|
|
1134
|
+
songId
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
);
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
// src/modules/url_m2.ts
|
|
1141
|
+
var getUrlM2 = async (contentId, toneFlag = "PQ", copyrightId, songId, albumId) => {
|
|
1142
|
+
const data = await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1143
|
+
`https://app.c.nf.migu.cn/MIGUM2.0/v2.1/content/listen-url`,
|
|
1144
|
+
{
|
|
1145
|
+
params: {
|
|
1146
|
+
"netType": "01",
|
|
1147
|
+
"resourceType": "2",
|
|
1148
|
+
contentId,
|
|
1149
|
+
"toneFlag": "PQ",
|
|
1150
|
+
// PQ 默认返回,覆盖处理
|
|
1151
|
+
"copyrightId": copyrightId || void 0,
|
|
1152
|
+
"albumId": albumId || void 0,
|
|
1153
|
+
"songId": songId || void 0
|
|
1154
|
+
},
|
|
1155
|
+
headers: { "channel": "0146832", "version": "7.41.13" }
|
|
1156
|
+
}
|
|
1157
|
+
);
|
|
1158
|
+
if (_optionalChain([data, 'optionalAccess', _11 => _11.data, 'optionalAccess', _12 => _12.url]) === "") {
|
|
1159
|
+
return { success: false, error: "URL \u4E3A\u7A7A" };
|
|
1160
|
+
}
|
|
1161
|
+
data.data.oriUrl = data.data.url || "";
|
|
1162
|
+
data.data.url = _chunkILRMRBMKcjs.changeQuality.call(void 0, data.data.url || "", toneFlag, "PQ", true);
|
|
1163
|
+
if (_optionalChain([data, 'optionalAccess', _13 => _13.data, 'optionalAccess', _14 => _14.songItem, 'optionalAccess', _15 => _15.z3dCode])) {
|
|
1164
|
+
const a = "ftp://218.200.160.122:21/", b = "https://freetyst.nf.migu.cn/";
|
|
1165
|
+
const z3dCode = data.data.songItem.z3dCode;
|
|
1166
|
+
z3dCode.url = encodeURI(_optionalChain([z3dCode, 'optionalAccess', _16 => _16.url, 'optionalAccess', _17 => _17.replace, 'call', _18 => _18(a, b)]) || "");
|
|
1167
|
+
z3dCode.iosUrl = encodeURI(_optionalChain([z3dCode, 'optionalAccess', _19 => _19.iosUrl, 'optionalAccess', _20 => _20.replace, 'call', _21 => _21(a, b)]) || "");
|
|
1168
|
+
z3dCode.androidUrl = encodeURI(_optionalChain([z3dCode, 'optionalAccess', _22 => _22.androidUrl, 'optionalAccess', _23 => _23.replace, 'call', _24 => _24(a, b)]) || "");
|
|
1169
|
+
z3dCode.h5Url = encodeURI(_optionalChain([z3dCode, 'optionalAccess', _25 => _25.h5Url, 'optionalAccess', _26 => _26.replace, 'call', _27 => _27(a, b)]) || "");
|
|
1170
|
+
data.data.songItem.z3dCode = z3dCode;
|
|
1171
|
+
}
|
|
1172
|
+
return data;
|
|
1173
|
+
};
|
|
1174
|
+
|
|
1175
|
+
// src/modules/user_emoji_action.ts
|
|
1176
|
+
var emojiAction = async (pacmtoken, contentId, emojiId, action) => {
|
|
1177
|
+
if (action !== "add" && action !== "cancel") {
|
|
1178
|
+
return { data: { success: false, error: "action\u5FC5\u987B\u662Fadd\u6216cancel" }, newPacmToken: "" };
|
|
1179
|
+
}
|
|
1180
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/user/api/resource-react-emoji/add-cancel/v1.0`, {
|
|
1181
|
+
method: "POST",
|
|
1182
|
+
cookie: { pacmtoken },
|
|
1183
|
+
body: JSON.stringify({
|
|
1184
|
+
"resourceId": contentId,
|
|
1185
|
+
"resourceType": "2",
|
|
1186
|
+
"emojiId": emojiId,
|
|
1187
|
+
"operType": action
|
|
1188
|
+
}),
|
|
1189
|
+
headers: { "Content-Type": "application/json" }
|
|
1190
|
+
});
|
|
1191
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1192
|
+
};
|
|
1193
|
+
|
|
1194
|
+
// src/modules/user_emoji_num.ts
|
|
1195
|
+
var getEmojiNum = async (pacmtoken, contentIds) => {
|
|
1196
|
+
const contentIdList = contentIds.split(",");
|
|
1197
|
+
if (contentIdList.length === 0 || contentIdList.length > 100) {
|
|
1198
|
+
return { data: { success: false, error: "contentIdList\u957F\u5EA6\u5FC5\u987B\u57281-100\u4E4B\u95F4" }, newPacmToken: "" };
|
|
1199
|
+
}
|
|
1200
|
+
const resourceModuleQueryParam = contentIdList.map((id) => ({
|
|
1201
|
+
"emojiNum": 6,
|
|
1202
|
+
"resourceId": id,
|
|
1203
|
+
"resourceType": "2"
|
|
1204
|
+
}));
|
|
1205
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/user/api/resource-module/query/v1.0`, {
|
|
1206
|
+
method: "POST",
|
|
1207
|
+
cookie: pacmtoken ? { pacmtoken } : void 0,
|
|
1208
|
+
body: JSON.stringify({ resourceModuleQueryParam }),
|
|
1209
|
+
headers: { "Content-Type": "application/json" }
|
|
1210
|
+
});
|
|
1211
|
+
return { data, newPacmToken: pacmtoken ? cookies.pacmtoken || "" : void 0 };
|
|
1212
|
+
};
|
|
1213
|
+
|
|
1214
|
+
// src/modules/user_heartthrob.ts
|
|
1215
|
+
var getUserHeartthrob = async (pacmtoken, songId) => {
|
|
1216
|
+
if (!pacmtoken) return { data: { success: false, code: "290001", info: "\u8BF7\u5148\u767B\u5F55" }, newPacmToken: "" };
|
|
1217
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/MIGUM3.0/resource-dataloader/recommend-song-listen/v1.0", {
|
|
1218
|
+
cookie: { pacmtoken },
|
|
1219
|
+
params: { "songId": songId }
|
|
1220
|
+
});
|
|
1221
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1224
|
+
// src/modules/cloud_delete.ts
|
|
1225
|
+
var deleteCloudMusic = async (pacmtoken, contentIds) => {
|
|
1226
|
+
const contentList = contentIds.split(",");
|
|
1227
|
+
if (contentList.length === 0 || contentList.length > 100) {
|
|
1228
|
+
return { data: { success: false, error: "contentIds is empty or more than 100" }, newPacmToken: void 0 };
|
|
1229
|
+
}
|
|
1230
|
+
const deleteSongInfos = contentList.map((item) => ({
|
|
1231
|
+
"contentId": item,
|
|
1232
|
+
"type": "0"
|
|
1233
|
+
}));
|
|
1234
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/user/cloud/music/local/v1.0", {
|
|
1235
|
+
method: "DELETE",
|
|
1236
|
+
body: JSON.stringify(deleteSongInfos),
|
|
1237
|
+
cookie: { pacmtoken },
|
|
1238
|
+
headers: { "channel": "0146931", "Content-Type": "application/json" }
|
|
1239
|
+
});
|
|
1240
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
// src/modules/user_message_interaction.ts
|
|
1244
|
+
var getInteractionMsg = async (pacmtoken, type, page = 1, size = 10) => {
|
|
1245
|
+
if (!["fans", "collection"].includes(type)) {
|
|
1246
|
+
return { data: { success: false, error: "type must be fans or collection" }, newPacmToken: void 0 };
|
|
1247
|
+
}
|
|
1248
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.u.nf.migu.cn/MIGUM2.0/v2.0/user/interaction.do`, {
|
|
1249
|
+
cookie: { pacmtoken },
|
|
1250
|
+
params: { "type": type === "fans" ? 2 : 1, pageNo: page, pageSize: size }
|
|
1251
|
+
});
|
|
1252
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1253
|
+
};
|
|
1254
|
+
|
|
1255
|
+
// src/modules/user_message_notice.ts
|
|
1256
|
+
var getNoticeMsg = async (pacmtoken, page = 1, size = 10) => {
|
|
1257
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.u.nf.migu.cn/MIGUM2.0/v1.0/user/notifies.do`, {
|
|
1258
|
+
cookie: { pacmtoken },
|
|
1259
|
+
params: { pageNo: page, pageSize: size }
|
|
1260
|
+
});
|
|
1261
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1262
|
+
};
|
|
1263
|
+
|
|
1264
|
+
// src/modules/user_message_thumbs.ts
|
|
1265
|
+
var getThumbsMsg = async (pacmtoken, page = 1, size = 10) => {
|
|
1266
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.u.nf.migu.cn/MIGUM2.0/v1.0/user/thumbsDetail.do`, {
|
|
1267
|
+
cookie: { pacmtoken },
|
|
1268
|
+
params: { pageNo: page, pageSize: size }
|
|
1269
|
+
});
|
|
1270
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
// src/modules/cloud_upload.ts
|
|
1274
|
+
var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);
|
|
1275
|
+
function getExt(file) {
|
|
1276
|
+
const index = file.name.lastIndexOf(".");
|
|
1277
|
+
if (index <= 0) return "";
|
|
1278
|
+
return file.name.substring(index + 1).toLowerCase();
|
|
1279
|
+
}
|
|
1280
|
+
async function getHash(file) {
|
|
1281
|
+
const hash = _crypto2.default.createHash("md5");
|
|
1282
|
+
const reader = file.stream().getReader();
|
|
1283
|
+
while (true) {
|
|
1284
|
+
const { done, value } = await reader.read();
|
|
1285
|
+
if (done) {
|
|
1286
|
+
break;
|
|
1287
|
+
}
|
|
1288
|
+
hash.update(value);
|
|
1289
|
+
}
|
|
1290
|
+
return hash.digest("hex");
|
|
1291
|
+
}
|
|
1292
|
+
var getCloudUploadUrl = async (pacmtoken, file) => {
|
|
1293
|
+
const ext = getExt(file);
|
|
1294
|
+
if (!["mp3", "wav", "flac"].includes(ext)) {
|
|
1295
|
+
return { data: { success: false, error: "file ext is not supported" }, newPacmToken: void 0 };
|
|
1296
|
+
}
|
|
1297
|
+
const hash = await getHash(file), size = file.size;
|
|
1298
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/MIGUM3.0/user/cloud/meta/upload/v1.0", {
|
|
1299
|
+
method: "POST",
|
|
1300
|
+
body: JSON.stringify([{
|
|
1301
|
+
"contentId": hash,
|
|
1302
|
+
"contentName": file.name,
|
|
1303
|
+
"contentSize": size,
|
|
1304
|
+
"needUpload": true
|
|
1305
|
+
}]),
|
|
1306
|
+
cookie: { pacmtoken },
|
|
1307
|
+
headers: { "channel": "0146931", "Content-Type": "application/json" }
|
|
1308
|
+
});
|
|
1309
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1310
|
+
};
|
|
1311
|
+
|
|
1312
|
+
// src/modules/comment_delete.ts
|
|
1313
|
+
var deleteComment = async (pacmtoken, resourceId) => {
|
|
1314
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0,
|
|
1315
|
+
`https://app.u.nf.migu.cn/MIGUM2.0/v1.0/user/delComment.do`,
|
|
1316
|
+
{
|
|
1317
|
+
method: "GET",
|
|
1318
|
+
params: { resourceId, hasAudited: "false" },
|
|
1319
|
+
cookie: { pacmtoken },
|
|
1320
|
+
headers: {
|
|
1321
|
+
"channel": "0146891",
|
|
1322
|
+
"Content-Type": "application/json"
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
);
|
|
1326
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
// src/modules/singer_letter.ts
|
|
1330
|
+
var getSingerLetter = async (singerId, pageId) => {
|
|
1331
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/user/blog/api/love-letter/query/v1.0?resourceId=${singerId}&nextPageId=${pageId}`);
|
|
1332
|
+
};
|
|
1333
|
+
|
|
1334
|
+
// src/modules/singer_mv.ts
|
|
1335
|
+
var getSingerMv = async (singerId, page) => {
|
|
1336
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/bmw/singer/video/v1.0?pageNo=${page || 1}&singerId=${singerId}`);
|
|
1337
|
+
};
|
|
1338
|
+
|
|
1339
|
+
// src/modules/cloud_dl.ts
|
|
1340
|
+
var getCloudDLUrl = async (pacmtoken, contentId, toneFlag = "PQ") => {
|
|
1341
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/MIGUM3.0/strategy/cloud/download-url/v1.0", {
|
|
1342
|
+
cookie: { pacmtoken },
|
|
1343
|
+
headers: { "channel": "0146931", "version": "7.41.13" },
|
|
1344
|
+
params: {
|
|
1345
|
+
contentId,
|
|
1346
|
+
"formatType": toneFlag,
|
|
1347
|
+
"type": "0"
|
|
1348
|
+
}
|
|
1349
|
+
});
|
|
1350
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
// src/modules/user_phoneInfo.ts
|
|
1354
|
+
var getUserPhoneInfo = async (pacmtoken) => {
|
|
1355
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/MIGUM2.0/v1.0/tone/isrbtuser.do", {
|
|
1356
|
+
cookie: { pacmtoken },
|
|
1357
|
+
headers: {
|
|
1358
|
+
"channel": "0146921",
|
|
1359
|
+
"version": "8.8.0"
|
|
1360
|
+
}
|
|
1361
|
+
});
|
|
1362
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1363
|
+
};
|
|
1364
|
+
|
|
1365
|
+
// src/modules/recommend_listenFreely_tab.ts
|
|
1366
|
+
var getListenFreelyTab = async (pacmtoken = "") => {
|
|
1367
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `https://app.c.nf.migu.cn/bmw/page/view/listen-freely/v1.0`, {
|
|
1368
|
+
cookie: pacmtoken ? { pacmtoken } : void 0
|
|
1369
|
+
});
|
|
1370
|
+
return { data, newPacmToken: cookies.pacmtoken || void 0 };
|
|
1371
|
+
};
|
|
1372
|
+
|
|
1373
|
+
// src/modules/recommend_listenFreely.ts
|
|
1374
|
+
var getListenFreelySongs = async (pacmtoken, modelId = "701000") => {
|
|
1375
|
+
if (!pacmtoken) return { data: { success: false, code: "290001", info: "\u8BF7\u5148\u767B\u5F55" }, newPacmToken: void 0 };
|
|
1376
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, `http://app.c.nf.migu.cn/resource-dataloader/recommend/listen-freely/v2.0?modelId=${modelId}`, {
|
|
1377
|
+
cookie: { pacmtoken }
|
|
1378
|
+
});
|
|
1379
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1380
|
+
};
|
|
1381
|
+
|
|
1382
|
+
// src/modules/playlist_square_listByTag.ts
|
|
1383
|
+
var getSquareListByTag = async (tagId, page) => {
|
|
1384
|
+
const res = await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `http://app.c.nf.migu.cn/MIGUM3.0/v1.0/template/musiclistplaza-listbytag?templateVersion=1&tagId=${tagId}&pageNumber=${page}`);
|
|
1385
|
+
res.data.contentItemList = _optionalChain([res, 'optionalAccess', _28 => _28.data, 'optionalAccess', _29 => _29.contentItemList, 'optionalAccess', _30 => _30.itemList, 'optionalAccess', _31 => _31.reduce, 'call', _32 => _32((acc, item) => {
|
|
1386
|
+
if (!item.actionUrl || !item.actionUrl.includes("song-list-info")) {
|
|
1387
|
+
return acc;
|
|
1388
|
+
}
|
|
1389
|
+
item.playlistId = item.actionUrl.split("id=")[1].split("&")[0] || "";
|
|
1390
|
+
acc.push(item);
|
|
1391
|
+
return acc;
|
|
1392
|
+
}, [])]) || [];
|
|
1393
|
+
res.data.hasNext = res.data.contentItemList.length < 30 ? false : _optionalChain([res, 'optionalAccess', _33 => _33.data, 'optionalAccess', _34 => _34.nextPageUrl]) !== void 0 && _optionalChain([res, 'optionalAccess', _35 => _35.data, 'optionalAccess', _36 => _36.nextPageUrl]) !== "";
|
|
1394
|
+
return res;
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
// src/modules/playlist_square_recommend.ts
|
|
1398
|
+
var getSquareRecommend = async () => {
|
|
1399
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/pc/bmw/playlist-square/recommend-playlist/v1.0?templateVersion=2`);
|
|
1400
|
+
};
|
|
1401
|
+
|
|
1402
|
+
// src/modules/playlist_square_tag.ts
|
|
1403
|
+
var getSquareTag = async (needMoreTag = true) => {
|
|
1404
|
+
const baseTag = await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/pc/bmw/playlist-square/tab/v1.0`);
|
|
1405
|
+
if (!needMoreTag) {
|
|
1406
|
+
return baseTag;
|
|
1407
|
+
}
|
|
1408
|
+
const moreTag = await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/pc/v1.0/template/musiclistplaza-taglist/release`);
|
|
1409
|
+
baseTag.data.moreTag = moreTag.data.map((item) => {
|
|
1410
|
+
const title = _optionalChain([item, 'optionalAccess', _37 => _37.header, 'optionalAccess', _38 => _38.title]);
|
|
1411
|
+
const tagList = _optionalChain([item, 'optionalAccess', _39 => _39.content, 'access', _40 => _40.map, 'call', _41 => _41((it) => ({
|
|
1412
|
+
tagName: it.texts[0],
|
|
1413
|
+
tagId: it.texts[1]
|
|
1414
|
+
}))]);
|
|
1415
|
+
return { title, tagList };
|
|
1416
|
+
});
|
|
1417
|
+
return baseTag;
|
|
1418
|
+
};
|
|
1419
|
+
|
|
1420
|
+
// src/modules/resourceinfo_song.ts
|
|
1421
|
+
var getSongInfo = async (contentIds) => {
|
|
1422
|
+
contentIds = contentIds.replace(/,/g, "|");
|
|
1423
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/resource/song/by-contentids/v2.0?contentId=${contentIds}`);
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
// src/modules/user_ordered.ts
|
|
1427
|
+
var getUserOrdered = async (pacmtoken) => {
|
|
1428
|
+
if (!pacmtoken) return { data: { success: false, code: "290001", info: "\u8BF7\u5148\u767B\u5F55" }, newPacmToken: void 0 };
|
|
1429
|
+
const { data, cookies } = await _chunkZEGJU5LWcjs.ckfetch.call(void 0, "https://app.c.nf.migu.cn/MIGUM3.0/strategy/song-ordered/v2.0", {
|
|
1430
|
+
cookie: { pacmtoken },
|
|
1431
|
+
headers: { "channel": "014X031" }
|
|
1432
|
+
});
|
|
1433
|
+
return { data, newPacmToken: cookies.pacmtoken || "" };
|
|
1434
|
+
};
|
|
1435
|
+
|
|
1436
|
+
// src/modules/dalbum_info.ts
|
|
1437
|
+
var getDAlbumInfo = async (dAlbumId) => {
|
|
1438
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/MIGUM3.0/resource/dalbum/v2.0?dAlbumId=${dAlbumId}`);
|
|
1439
|
+
};
|
|
1440
|
+
|
|
1441
|
+
// src/modules/dalbum_song.ts
|
|
1442
|
+
var getDAlbumSong = async (dAlbumId) => {
|
|
1443
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0, `https://app.c.nf.migu.cn/MIGUM3.0/resource/dalbum/song/v2.0?dAlbumId=${dAlbumId}`);
|
|
1444
|
+
};
|
|
1445
|
+
|
|
1446
|
+
// src/modules/dalbum_pay.ts
|
|
1447
|
+
var getDAlbumPay = async (dAlbumId) => {
|
|
1448
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1449
|
+
`https://app.c.nf.migu.cn/MIGUM3.0/strategy/album-sub-rank/v1.0?queryType=01&resourceId=${dAlbumId}`,
|
|
1450
|
+
{ headers: { "channel": "0146891" } }
|
|
1451
|
+
);
|
|
1452
|
+
};
|
|
1453
|
+
|
|
1454
|
+
// src/modules/page_scroll.ts
|
|
1455
|
+
var getPageScroll = async (dataId, page = 1, size = 20, styleCode) => {
|
|
1456
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1457
|
+
`https://app.c.nf.migu.cn/bmw/page-view-datasource/v1.0`,
|
|
1458
|
+
{
|
|
1459
|
+
params: {
|
|
1460
|
+
dataId,
|
|
1461
|
+
"pageNum": page,
|
|
1462
|
+
"pageSize": size,
|
|
1463
|
+
"styleCode": styleCode || void 0
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
);
|
|
1467
|
+
};
|
|
1468
|
+
|
|
1469
|
+
// src/modules/page_dataSource.ts
|
|
1470
|
+
var getPageDataSource = async (body) => {
|
|
1471
|
+
return await _chunkZEGJU5LWcjs.h5fetch.call(void 0,
|
|
1472
|
+
`https://app.c.nf.migu.cn/bmw/page-datasource/v3.0`,
|
|
1473
|
+
{
|
|
1474
|
+
method: "POST",
|
|
1475
|
+
body: JSON.stringify(body),
|
|
1476
|
+
headers: { "Content-Type": "application/json", "recommendstatus": "1" }
|
|
1477
|
+
}
|
|
1478
|
+
);
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
|
|
1493
|
+
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
|
|
1501
|
+
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
|
|
1520
|
+
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
|
|
1605
|
+
|
|
1606
|
+
exports.addFollower = addFollower; exports.addSongToMyList = addSongToMyList; exports.addUserCollect = addUserCollect; exports.addUserMyList = addUserMyList; exports.checkCanListen = checkCanListen; exports.checkToken = checkToken; exports.deleteCloudMusic = deleteCloudMusic; exports.deleteComment = deleteComment; exports.dislikeSong = dislikeSong; exports.editUserMyList = editUserMyList; exports.emojiAction = emojiAction; exports.getAlbumInfo = getAlbumInfo; exports.getAlbumSong = getAlbumSong; exports.getCloudDLUrl = getCloudDLUrl; exports.getCloudUploadUrl = getCloudUploadUrl; exports.getCloudUrl = getCloudUrl; exports.getColumnInfo = getColumnInfo; exports.getComment = getComment; exports.getConcertComment = getConcertComment; exports.getConcertDetail = getConcertDetail; exports.getConcertInfo = getConcertInfo; exports.getConcertRecommendMv = getConcertRecommendMv; exports.getConcertUrl = getConcertUrl; exports.getDAlbumInfo = getDAlbumInfo; exports.getDAlbumPay = getDAlbumPay; exports.getDAlbumSong = getDAlbumSong; exports.getDLUrlV1 = getDLUrlV1; exports.getEmojiNum = getEmojiNum; exports.getFollowerList = getFollowerList; exports.getFollowingList = getFollowingList; exports.getFollowingVra = getFollowingVra; exports.getInteractionMsg = getInteractionMsg; exports.getListenFreelySongs = getListenFreelySongs; exports.getListenFreelyTab = getListenFreelyTab; exports.getListenRank = getListenRank; exports.getLyric = getLyric; exports.getMVRecommend = getMVRecommend; exports.getMvBySong = getMvBySong; exports.getMvHls = getMvHls; exports.getMvInfo = getMvInfo; exports.getNewCDList = getNewCDList; exports.getNewSongList = getNewSongList; exports.getNoticeMsg = getNoticeMsg; exports.getOpNum = getOpNum; exports.getPacmToken = getPacmToken; exports.getPageDataSource = getPageDataSource; exports.getPageInfo = getPageInfo; exports.getPageScroll = getPageScroll; exports.getPageTab = getPageTab; exports.getPlaylistInfo = getPlaylistInfo; exports.getPlaylistSong = getPlaylistSong; exports.getRadioRecommend = getRadioRecommend; exports.getRadioRecommendAll = getRadioRecommendAll; exports.getRadioSong = getRadioSong; exports.getRankIndex = getRankIndex; exports.getRankInfo = getRankInfo; exports.getRecommendPlaylist = getRecommendPlaylist; exports.getRedirectUrl = getRedirectUrl; exports.getResourceInfo = getResourceInfo; exports.getSVideoInfo = getSVideoInfo; exports.getSVideoRecommend = getSVideoRecommend; exports.getSVideoSearchSuggest = getSVideoSearchSuggest; exports.getSVideoUrl = getSVideoUrl; exports.getSVideoUserContent = getSVideoUserContent; exports.getSVideoUserInfo = getSVideoUserInfo; exports.getSceneRecommend = getSceneRecommend; exports.getSearchDefault = getSearchDefault; exports.getSearchHot = getSearchHot; exports.getSearchSingerTab = getSearchSingerTab; exports.getSearchSingerTabList = getSearchSingerTabList; exports.getSimilarSongRecommend = getSimilarSongRecommend; exports.getSingerAlbum = getSingerAlbum; exports.getSingerIndex = getSingerIndex; exports.getSingerLetter = getSingerLetter; exports.getSingerMv = getSingerMv; exports.getSingerSimilar = getSingerSimilar; exports.getSingerSong = getSingerSong; exports.getSongInfo = getSongInfo; exports.getSquareListByTag = getSquareListByTag; exports.getSquarePage = getSquarePage; exports.getSquareRecommend = getSquareRecommend; exports.getSquareTag = getSquareTag; exports.getThumbsMsg = getThumbsMsg; exports.getTicketInfo = getTicketInfo; exports.getTodayRecommend = getTodayRecommend; exports.getUrlH5V24 = getUrlH5V24; exports.getUrlM2 = getUrlM2; exports.getUrlV1 = getUrlV1; exports.getUrlV2 = getUrlV2; exports.getUserAudioBook = getUserAudioBook; exports.getUserBadge = getUserBadge; exports.getUserCollectList = getUserCollectList; exports.getUserHeader = getUserHeader; exports.getUserHeartthrob = getUserHeartthrob; exports.getUserHomePage = getUserHomePage; exports.getUserMyList = getUserMyList; exports.getUserOrdered = getUserOrdered; exports.getUserPhoneInfo = getUserPhoneInfo; exports.getUserSongPage = getUserSongPage; exports.getVersion = getVersion; exports.getVipPlaylist = getVipPlaylist; exports.getVrbtOpNum = getVrbtOpNum; exports.getVrbtUrl = getVrbtUrl; exports.isFollowAuthor = isFollowAuthor; exports.likeSong = likeSong; exports.logout = logout; exports.matchPlaylist = matchPlaylist; exports.queryUserInfo = queryUserInfo; exports.removeFollower = removeFollower; exports.removeSongFromMyList = removeSongFromMyList; exports.removeUserCollect = removeUserCollect; exports.removeUserMyList = removeUserMyList; exports.searchAlbum = searchAlbum; exports.searchConcert = searchConcert; exports.searchLrc = searchLrc; exports.searchMv = searchMv; exports.searchPlaylist = searchPlaylist; exports.searchRbt = searchRbt; exports.searchSVideo = searchSVideo; exports.searchSinger = searchSinger; exports.searchSong = searchSong; exports.searchSuggest = searchSuggest; exports.searchTicket = searchTicket; exports.shareCommon = shareCommon; exports.shareVideo = shareVideo;
|
|
27
1607
|
//# sourceMappingURL=index.cjs.map
|