migu-api-enhanced 2.9.0 → 2.14.0

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/dist/index.cjs CHANGED
@@ -46,14 +46,21 @@ __export(index_exports, {
46
46
  getAlbumSong: () => getAlbumSong,
47
47
  getColumnInfo: () => getColumnInfo,
48
48
  getComment: () => getComment,
49
+ getConcertComment: () => getConcertComment,
50
+ getConcertDetail: () => getConcertDetail,
51
+ getConcertInfo: () => getConcertInfo,
52
+ getConcertRecommendMv: () => getConcertRecommendMv,
53
+ getConcertUrl: () => getConcertUrl,
49
54
  getDeviceId: () => getDeviceId,
50
55
  getLyric: () => getLyric,
51
56
  getMVRecommend: () => getMVRecommend,
57
+ getMvBySong: () => getMvBySong,
52
58
  getMvHls: () => getMvHls,
53
59
  getMvInfo: () => getMvInfo,
54
60
  getNewCDList: () => getNewCDList,
55
61
  getNewSongList: () => getNewSongList,
56
62
  getNinanByDate: () => getNinanByDate,
63
+ getNinanSignInfo: () => getNinanSignInfo,
57
64
  getNinanSong: () => getNinanSong,
58
65
  getOpNum: () => getOpNum,
59
66
  getPacmToken: () => getPacmToken,
@@ -67,11 +74,13 @@ __export(index_exports, {
67
74
  getRankIndex: () => getRankIndex,
68
75
  getRankInfo: () => getRankInfo,
69
76
  getRecommendPlaylist: () => getRecommendPlaylist,
77
+ getRedirectUrl: () => getRedirectUrl,
70
78
  getResourceInfo: () => getResourceInfo,
71
79
  getSVideoInfo: () => getSVideoInfo,
72
80
  getSVideoSearchSuggest: () => getSVideoSearchSuggest,
73
81
  getSVideoUrl: () => getSVideoUrl,
74
82
  getSVideoUserContent: () => getSVideoUserContent,
83
+ getSVideoUserInfo: () => getSVideoUserInfo,
75
84
  getSceneRecommend: () => getSceneRecommend,
76
85
  getSearchDefault: () => getSearchDefault,
77
86
  getSearchHot: () => getSearchHot,
@@ -92,16 +101,18 @@ __export(index_exports, {
92
101
  getUserHomePage: () => getUserHomePage,
93
102
  getUserMyList: () => getUserMyList,
94
103
  getVersion: () => getVersion,
104
+ getVipPlaylist: () => getVipPlaylist,
95
105
  getVrbtOpNum: () => getVrbtOpNum,
96
106
  getVrbtUrl: () => getVrbtUrl,
107
+ isFollowAuthor: () => isFollowAuthor,
97
108
  likeSong: () => likeSong,
98
109
  loginNP: () => loginNP,
99
110
  loginOneClick: () => loginOneClick,
100
111
  loginPhone: () => loginPhone,
101
112
  loginSim: () => loginSim,
113
+ matchPlaylist: () => matchPlaylist,
102
114
  modules: () => modules_exports,
103
115
  queryUserInfo: () => queryUserInfo,
104
- randomUA: () => randomUA,
105
116
  removeSongFromMyList: () => removeSongFromMyList,
106
117
  removeUserCollect: () => removeUserCollect,
107
118
  removeUserMyList: () => removeUserMyList,
@@ -115,7 +126,7 @@ __export(index_exports, {
115
126
  searchSong: () => searchSong,
116
127
  searchSuggest: () => searchSuggest,
117
128
  searchTicket: () => searchTicket,
118
- ua: () => ua
129
+ signNinan: () => signNinan
119
130
  });
120
131
  module.exports = __toCommonJS(index_exports);
121
132
 
@@ -134,13 +145,20 @@ __export(modules_exports, {
134
145
  getAlbumSong: () => getAlbumSong,
135
146
  getColumnInfo: () => getColumnInfo,
136
147
  getComment: () => getComment,
148
+ getConcertComment: () => getConcertComment,
149
+ getConcertDetail: () => getConcertDetail,
150
+ getConcertInfo: () => getConcertInfo,
151
+ getConcertRecommendMv: () => getConcertRecommendMv,
152
+ getConcertUrl: () => getConcertUrl,
137
153
  getLyric: () => getLyric,
138
154
  getMVRecommend: () => getMVRecommend,
155
+ getMvBySong: () => getMvBySong,
139
156
  getMvHls: () => getMvHls,
140
157
  getMvInfo: () => getMvInfo,
141
158
  getNewCDList: () => getNewCDList,
142
159
  getNewSongList: () => getNewSongList,
143
160
  getNinanByDate: () => getNinanByDate,
161
+ getNinanSignInfo: () => getNinanSignInfo,
144
162
  getNinanSong: () => getNinanSong,
145
163
  getOpNum: () => getOpNum,
146
164
  getPacmToken: () => getPacmToken,
@@ -153,11 +171,13 @@ __export(modules_exports, {
153
171
  getRankIndex: () => getRankIndex,
154
172
  getRankInfo: () => getRankInfo,
155
173
  getRecommendPlaylist: () => getRecommendPlaylist,
174
+ getRedirectUrl: () => getRedirectUrl,
156
175
  getResourceInfo: () => getResourceInfo,
157
176
  getSVideoInfo: () => getSVideoInfo,
158
177
  getSVideoSearchSuggest: () => getSVideoSearchSuggest,
159
178
  getSVideoUrl: () => getSVideoUrl,
160
179
  getSVideoUserContent: () => getSVideoUserContent,
180
+ getSVideoUserInfo: () => getSVideoUserInfo,
161
181
  getSceneRecommend: () => getSceneRecommend,
162
182
  getSearchDefault: () => getSearchDefault,
163
183
  getSearchHot: () => getSearchHot,
@@ -178,13 +198,16 @@ __export(modules_exports, {
178
198
  getUserHomePage: () => getUserHomePage,
179
199
  getUserMyList: () => getUserMyList,
180
200
  getVersion: () => getVersion,
201
+ getVipPlaylist: () => getVipPlaylist,
181
202
  getVrbtOpNum: () => getVrbtOpNum,
182
203
  getVrbtUrl: () => getVrbtUrl,
204
+ isFollowAuthor: () => isFollowAuthor,
183
205
  likeSong: () => likeSong,
184
206
  loginNP: () => loginNP,
185
207
  loginOneClick: () => loginOneClick,
186
208
  loginPhone: () => loginPhone,
187
209
  loginSim: () => loginSim,
210
+ matchPlaylist: () => matchPlaylist,
188
211
  queryUserInfo: () => queryUserInfo,
189
212
  removeSongFromMyList: () => removeSongFromMyList,
190
213
  removeUserCollect: () => removeUserCollect,
@@ -198,12 +221,35 @@ __export(modules_exports, {
198
221
  searchSinger: () => searchSinger,
199
222
  searchSong: () => searchSong,
200
223
  searchSuggest: () => searchSuggest,
201
- searchTicket: () => searchTicket
224
+ searchTicket: () => searchTicket,
225
+ signNinan: () => signNinan
202
226
  });
203
227
 
204
228
  // src/utils/h5fetch.ts
205
229
  var import_axios = __toESM(require("axios"), 1);
206
- var h5fetch = async (url, init) => {
230
+
231
+ // src/utils/setCookie.ts
232
+ var getCookieValue = (cookies, key) => {
233
+ for (const item of cookies) {
234
+ const prefix = `${key}=`;
235
+ if (item.includes(prefix)) {
236
+ const mainPart = item.split(";")[0];
237
+ return mainPart.split("=")[1] || "";
238
+ }
239
+ }
240
+ return "";
241
+ };
242
+ var getSetCookieValueFromObject = (headers, key) => {
243
+ const setCookieHeader = headers["set-cookie"];
244
+ if (!setCookieHeader) {
245
+ return "";
246
+ }
247
+ const cookies = Array.isArray(setCookieHeader) ? setCookieHeader : setCookieHeader.split(",").map((c) => c.trim());
248
+ return getCookieValue(cookies, key);
249
+ };
250
+
251
+ // src/utils/h5fetch.ts
252
+ var _fetch = async (url, init) => {
207
253
  const method = (init?.method || "GET").toUpperCase();
208
254
  const headersRaw = init?.headers;
209
255
  let headers = {};
@@ -224,14 +270,50 @@ var h5fetch = async (url, init) => {
224
270
  url,
225
271
  method,
226
272
  headers,
273
+ params: init?.params,
274
+ maxRedirects: init?.maxRedirects,
227
275
  data: init?.body
228
276
  };
229
277
  if (init?.signal) {
230
278
  axiosConfig.signal = init.signal;
231
279
  }
232
- const response = await (0, import_axios.default)(axiosConfig);
280
+ return await (0, import_axios.default)(axiosConfig);
281
+ };
282
+ var h5fetch = async (url, init) => {
283
+ const response = await _fetch(url, init);
233
284
  return response.data;
234
285
  };
286
+ var ckfetch = async (url, init) => {
287
+ const cookieKeys = init?.cookie ? Object.keys(init.cookie) : [];
288
+ const cookieHeader = init?.cookie ? Object.entries(init.cookie).map(([k, v]) => `${k}=${v}`).join("; ") : "";
289
+ const newHeaders = {};
290
+ if (init?.headers) {
291
+ if (init.headers instanceof Headers) {
292
+ init.headers.forEach((value, key) => {
293
+ newHeaders[key] = value;
294
+ });
295
+ } else if (Array.isArray(init.headers)) {
296
+ init.headers.forEach(([key, value]) => {
297
+ newHeaders[key] = value;
298
+ });
299
+ } else {
300
+ Object.assign(newHeaders, init.headers);
301
+ }
302
+ }
303
+ if (cookieHeader) newHeaders["Cookie"] = cookieHeader;
304
+ const response = await _fetch(url, { ...init, headers: newHeaders });
305
+ const cookies = {};
306
+ for (const key of cookieKeys) {
307
+ const value = getSetCookieValueFromObject(response.headers, key);
308
+ if (value) {
309
+ cookies[key] = value;
310
+ }
311
+ }
312
+ return {
313
+ data: response.data,
314
+ cookies
315
+ };
316
+ };
235
317
 
236
318
  // src/modules/search.ts
237
319
  var searchSong = async (text, page = 1) => {
@@ -447,14 +529,19 @@ var getUrlV1 = async (contentId, copyrightId, resourceType = "2") => {
447
529
  var import_axios2 = __toESM(require("axios"), 1);
448
530
  var getUrlV2 = async (contentId, copyrightId, toneFlag = "PQ", pacmtoken = "") => {
449
531
  const deviceId = getDeviceId();
532
+ const timestamp = Date.now();
450
533
  const headers = {
451
534
  "channel": "014X031",
452
535
  "subchannel": "014X031",
453
536
  "pacmtoken": pacmtoken,
454
537
  "deviceId": deviceId,
455
- "referer": "https://music.migu.cn/",
456
- "location-data": "30.6698676660,104.1229614820",
457
- "location-info": ""
538
+ "ua": "Android_migu",
539
+ "version": "6.8.8",
540
+ "activityId": "MUSIC-WWW",
541
+ "birth": "h5page",
542
+ "signature": "1",
543
+ "timestamp": timestamp.toString(),
544
+ "referer": "https://music.migu.cn/"
458
545
  };
459
546
  const res = await import_axios2.default.get(
460
547
  `https://app.c.nf.migu.cn/strategy/pc/listen/v2.0?contentId=${contentId}&copyrightId=${copyrightId}&scene=&netType=01&resourceType=2&toneFlag=${toneFlag}`,
@@ -519,24 +606,17 @@ var SECURE2 = ["Jk8qzuePiJ1qE3mDYhLQ3T73DtDoAhLP"];
519
606
  function strToUtf8Bytes(e) {
520
607
  return new TextEncoder().encode(e);
521
608
  }
522
- function utf8Bytes2str(e) {
523
- var t = [], n = true, r = false, o = void 0;
524
- try {
525
- for (var a, i = e[Symbol.iterator](); !(n = (a = i.next()).done); n = true) {
526
- var s = a.value;
527
- s < 16 ? t.push(String.fromCharCode(s)) : (t.push("%"), t.push(s.toString(16)));
528
- }
529
- } catch (e2) {
530
- r = true, o = e2;
531
- } finally {
532
- try {
533
- !n && i.return && i.return();
534
- } finally {
535
- if (r)
536
- throw o;
609
+ function utf8Bytes2str(bytes) {
610
+ const result = [];
611
+ for (const byte of bytes) {
612
+ if (byte < 16) {
613
+ result.push(String.fromCharCode(byte));
614
+ } else {
615
+ result.push("%");
616
+ result.push(byte.toString(16));
537
617
  }
538
618
  }
539
- return decodeURIComponent(t.join(""));
619
+ return decodeURIComponent(result.join(""));
540
620
  }
541
621
  function decode(e, t) {
542
622
  if (0 == t.length)
@@ -559,22 +639,22 @@ var decryptData2 = (ab) => {
559
639
  };
560
640
 
561
641
  // src/modules/version.ts
562
- var getVersion = async (channel = "0146921", version = "8.4.0", ua2 = "Android_migu") => {
642
+ var getVersion = async () => {
563
643
  return await h5fetch(
564
- `http://app.c.nf.migu.cn/MIGUM2.0/resource/client/version/v1.0`,
644
+ `http://app.c.nf.migu.cn/column/client/version/v1.0`,
565
645
  {
566
646
  headers: {
567
- "channel": channel,
568
- "ua": ua2,
569
- "version": version
647
+ "ua": "Android_migu",
648
+ "version": "0.0.1"
570
649
  }
571
650
  }
572
651
  );
573
652
  };
574
653
 
575
654
  // src/modules/mv_info.ts
576
- var getMvInfo = async (mvContentId) => {
577
- return await h5fetch(`https://c.musicapp.migu.cn/MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${mvContentId}&resourceType=D&needSimple=01`);
655
+ var getMvInfo = async (mvContentIds) => {
656
+ mvContentIds = mvContentIds.replace(/,/g, "|");
657
+ return await h5fetch(`https://c.musicapp.migu.cn/MIGUM2.0/v1.0/content/resourceinfo.do?resourceId=${mvContentIds}&resourceType=D&needSimple=01`);
578
658
  };
579
659
 
580
660
  // src/modules/mv_hls.ts
@@ -595,7 +675,7 @@ var getMvHls = async (mvContentId, mvCopyrightId, url, size, format = "050012",
595
675
  var import_axios4 = __toESM(require("axios"), 1);
596
676
 
597
677
  // src/utils/rsalib.ts
598
- var import_crypto = __toESM(require("crypto"), 1);
678
+ var import_node_crypto = __toESM(require("crypto"), 1);
599
679
  function hexToBase64Url(hex) {
600
680
  const buffer = Buffer.from(hex, "hex");
601
681
  return buffer.toString("base64url");
@@ -609,7 +689,7 @@ var RSAKey = class {
609
689
  n: hexToBase64Url(modulus),
610
690
  e: hexToBase64Url(exponent)
611
691
  };
612
- this.publicKey = import_crypto.default.createPublicKey({
692
+ this.publicKey = import_node_crypto.default.createPublicKey({
613
693
  key: jwkKey,
614
694
  format: "jwk"
615
695
  });
@@ -625,10 +705,10 @@ var RSAKey = class {
625
705
  }
626
706
  try {
627
707
  const buffer = Buffer.from(text, "utf-8");
628
- const encrypted = import_crypto.default.publicEncrypt(
708
+ const encrypted = import_node_crypto.default.publicEncrypt(
629
709
  {
630
710
  key: this.publicKey,
631
- padding: import_crypto.default.constants.RSA_PKCS1_PADDING
711
+ padding: import_node_crypto.default.constants.RSA_PKCS1_PADDING
632
712
  },
633
713
  buffer
634
714
  );
@@ -730,44 +810,21 @@ var checkToken = async (token = "") => {
730
810
  );
731
811
  };
732
812
 
733
- // src/modules/passport_pacmToken.ts
734
- var import_axios5 = __toESM(require("axios"), 1);
735
-
736
- // src/utils/setCookie.ts
737
- var getCookieValue = (cookies, key) => {
738
- for (const item of cookies) {
739
- const prefix = `${key}=`;
740
- if (item.includes(prefix)) {
741
- const mainPart = item.split(";")[0];
742
- return mainPart.split("=")[1] || "";
743
- }
744
- }
745
- return "";
746
- };
747
- var getSetCookieValueFromObject = (headers, key) => {
748
- const setCookieHeader = headers["set-cookie"];
749
- if (!setCookieHeader) {
750
- return "";
751
- }
752
- const cookies = Array.isArray(setCookieHeader) ? setCookieHeader : setCookieHeader.split(",").map((c) => c.trim());
753
- return getCookieValue(cookies, key);
754
- };
755
-
756
813
  // src/modules/passport_pacmToken.ts
757
814
  var getPacmToken = async (token = "", type = "2", sourceId = "220029", activityId = "MUSIC-WWW") => {
758
- const res = await import_axios5.default.get(
815
+ const { data, cookies } = await ckfetch(
759
816
  `https://c.musicapp.migu.cn/user/h5/token-validate/v3.0?token=${token}&type=${type}&sourceId=${sourceId}&activityId=${activityId}`,
760
817
  {
818
+ cookie: { idmpauth: "true@passport.migu.cn" },
761
819
  headers: {
762
- "Cookie": "idmpauth=true@passport.migu.cn",
763
820
  "Origin": "https://music.migu.cn",
764
821
  "Pragma": "no-cache",
765
822
  "Referer": "https://music.migu.cn/"
766
823
  }
767
824
  }
768
825
  );
769
- const pacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
770
- return { pacmToken, body: res.data };
826
+ const pacmToken = cookies.pacmtoken || "";
827
+ return { pacmToken, body: data };
771
828
  };
772
829
 
773
830
  // src/modules/ticket.ts
@@ -776,60 +833,48 @@ var getTicketInfo = async (page = 1, pageCount = 20) => {
776
833
  };
777
834
 
778
835
  // src/modules/user_badge.ts
779
- var import_axios6 = __toESM(require("axios"), 1);
780
836
  var getUserBadge = async (pacmtoken) => {
781
- const res = await import_axios6.default.get("https://app.c.nf.migu.cn/pc/open/api/member/icon/v1.0", {
837
+ const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/pc/open/api/member/icon/v1.0", {
838
+ cookie: { pacmtoken },
782
839
  headers: {
783
- "Cookie": `pacmtoken=${pacmtoken}`,
784
840
  "Referer": "https://music.migu.cn/",
785
841
  "channel": "014X031",
786
842
  "timestamp": Date.now().toString()
787
843
  }
788
844
  });
789
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
790
- return { data: res.data, newPacmToken };
845
+ return { data, newPacmToken: cookies.pacmtoken || "" };
791
846
  };
792
847
 
793
848
  // src/modules/user_queryInfo.ts
794
- var import_axios7 = __toESM(require("axios"), 1);
795
849
  var queryUserInfo = async (pacmtoken) => {
796
- const res = await import_axios7.default.get("https://app.c.nf.migu.cn/pc/user/h5/queryUserInfo/v1.0", {
850
+ const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/pc/user/h5/queryUserInfo/v1.0", {
851
+ cookie: { pacmtoken },
797
852
  headers: {
798
- "Cookie": `pacmtoken=${pacmtoken}`,
799
853
  "channel": "014X031",
800
854
  "Referer": "https://music.migu.cn/"
801
855
  }
802
856
  });
803
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
804
- return { data: res.data, newPacmToken };
857
+ return { data, newPacmToken: cookies.pacmtoken || "" };
805
858
  };
806
859
 
807
860
  // src/modules/user_homePage.ts
808
- var import_axios8 = __toESM(require("axios"), 1);
809
861
  var getUserHomePage = async (pacmtoken) => {
810
- const res = await import_axios8.default.get("https://app.c.nf.migu.cn/pc/user/home-page/v2.0", {
811
- headers: {
812
- "Cookie": `pacmtoken=${pacmtoken}`
813
- }
862
+ const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/pc/user/home-page/v2.0", {
863
+ cookie: { pacmtoken }
814
864
  });
815
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
816
- return { data: res.data, newPacmToken };
865
+ return { data, newPacmToken: cookies.pacmtoken || "" };
817
866
  };
818
867
 
819
868
  // src/modules/user_recom_today.ts
820
- var import_axios9 = __toESM(require("axios"), 1);
821
869
  var getTodayRecommend = async (pacmtoken) => {
822
- const res = await import_axios9.default.get("https://app.c.nf.migu.cn/pc/v1.0/template/todayRecommendList/release?actionId=1&index=1&templateVersion=5", {
823
- headers: {
824
- "Cookie": `pacmtoken=${pacmtoken}`
825
- }
870
+ const { data, cookies } = await ckfetch("https://app.c.nf.migu.cn/pc/v1.0/template/todayRecommendList/release?actionId=1&index=1&templateVersion=5", {
871
+ cookie: { pacmtoken }
826
872
  });
827
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
828
- return { data: res.data, newPacmToken };
873
+ return { data, newPacmToken: cookies.pacmtoken || "" };
829
874
  };
830
875
 
831
876
  // src/modules/login_sim.ts
832
- var import_axios10 = __toESM(require("axios"), 1);
877
+ var import_axios5 = __toESM(require("axios"), 1);
833
878
  function randomString2() {
834
879
  const random = Array.from({ length: 32 }, () => Math.floor(Math.random() * 16).toString(16)).join("");
835
880
  return random.toLowerCase();
@@ -860,7 +905,7 @@ var loginSim = {
860
905
  $.fingerPrintDetail = fakeFingerprint;
861
906
  $.encMsisdn = encPhone || "";
862
907
  const form = URLParams($);
863
- const send = await import_axios10.default.post(
908
+ const send = await import_axios5.default.post(
864
909
  `https://passport.migu.cn/api/simauth/send`,
865
910
  form,
866
911
  {
@@ -887,7 +932,7 @@ var loginSim = {
887
932
  "sourceID": "220029"
888
933
  };
889
934
  const form = URLParams($);
890
- const query = await import_axios10.default.post(
935
+ const query = await import_axios5.default.post(
891
936
  `https://passport.migu.cn/api/simauth/query`,
892
937
  form,
893
938
  {
@@ -914,27 +959,19 @@ var loginSim = {
914
959
  };
915
960
 
916
961
  // src/modules/user_collect_list.ts
917
- var import_axios11 = __toESM(require("axios"), 1);
918
962
  var getUserCollectList = async (pacmtoken, page = 1, size = 20) => {
919
- const res = await import_axios11.default.get(`https://app.c.nf.migu.cn/user/h5/user/collection/v1.0?pageNo=${page}&type=1&OPType=03&pageSize=${size}&resourceType=2021`, {
920
- headers: {
921
- "Cookie": `pacmtoken=${pacmtoken}`
922
- }
963
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/user/h5/user/collection/v1.0?pageNo=${page}&type=1&OPType=03&pageSize=${size}&resourceType=2021`, {
964
+ cookie: { pacmtoken }
923
965
  });
924
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
925
- return { data: res.data, newPacmToken };
966
+ return { data, newPacmToken: cookies.pacmtoken || "" };
926
967
  };
927
968
 
928
969
  // src/modules/user_myList.ts
929
- var import_axios12 = __toESM(require("axios"), 1);
930
970
  var getUserMyList = async (pacmtoken, queryType = 0, page = 1, size = 20) => {
931
- const res = await import_axios12.default.get(`https://app.c.nf.migu.cn/user/h5/my-music-list/v1.0?queryType=${queryType}&pageNo=${page}&pageSize=${size}`, {
932
- headers: {
933
- "Cookie": `pacmtoken=${pacmtoken}`
934
- }
971
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/user/h5/my-music-list/v1.0?queryType=${queryType}&pageNo=${page}&pageSize=${size}`, {
972
+ cookie: { pacmtoken }
935
973
  });
936
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
937
- return { data: res.data, newPacmToken };
974
+ return { data, newPacmToken: cookies.pacmtoken || "" };
938
975
  };
939
976
 
940
977
  // src/modules/singer_similar.ts
@@ -957,8 +994,8 @@ var getSimilarSongRecommend = async (contentId = "") => {
957
994
  };
958
995
 
959
996
  // src/modules/login_oneclick.ts
960
- var import_axios13 = __toESM(require("axios"), 1);
961
- var import_crypto2 = __toESM(require("crypto"), 1);
997
+ var import_axios6 = __toESM(require("axios"), 1);
998
+ var import_node_crypto2 = __toESM(require("crypto"), 1);
962
999
  var nav = {
963
1000
  "platform": "iPhone",
964
1001
  "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.6 Mobile/15E148 Safari/604.1",
@@ -996,9 +1033,9 @@ var YDRZ = {
996
1033
  return Math.floor(Math.random() * (min - max) + max);
997
1034
  },
998
1035
  getUA() {
999
- const ua2 = nav.userAgent, l = [
1036
+ const ua = nav.userAgent, l = [
1000
1037
  nav.platform,
1001
- ua2,
1038
+ ua,
1002
1039
  nav.appVersion,
1003
1040
  nav.cookieEnabled,
1004
1041
  void 0,
@@ -1009,7 +1046,7 @@ var YDRZ = {
1009
1046
  nav.availHeight,
1010
1047
  nav.colorDepth,
1011
1048
  nav.timezoneOffset
1012
- ], key = l.join("@@"), finalUA = ua2.length > 100 ? ua2.substring(0, 100) : ua2;
1049
+ ], key = l.join("@@"), finalUA = ua.length > 100 ? ua.substring(0, 100) : ua;
1013
1050
  return nav.platform + "@@" + finalUA + "@@" + md5(key);
1014
1051
  },
1015
1052
  uaE(str) {
@@ -1046,7 +1083,7 @@ var YDRZ = {
1046
1083
  "businessType": optparams.businessType,
1047
1084
  "userInformations": this.getUserInfo()
1048
1085
  };
1049
- const res = await import_axios13.default.post(
1086
+ const res = await import_axios6.default.post(
1050
1087
  "https://verify.cmpassport.com/h5/getPreMobile",
1051
1088
  requestData,
1052
1089
  {
@@ -1079,7 +1116,7 @@ function yTime() {
1079
1116
  return f.join("");
1080
1117
  }
1081
1118
  function md5(s) {
1082
- return import_crypto2.default.createHash("md5").update(s, "utf-8").digest("hex");
1119
+ return import_node_crypto2.default.createHash("md5").update(s, "utf-8").digest("hex");
1083
1120
  }
1084
1121
  var genInternetSign = async () => {
1085
1122
  const time = yTime(), e = time, c = "220029", msgId = getDeviceId(), d = msgId;
@@ -1088,7 +1125,7 @@ var genInternetSign = async () => {
1088
1125
  key = encodeURIComponent(key);
1089
1126
  const signature = md5(key);
1090
1127
  const url = `https://passport.migu.cn/api/genInternetSign?preSign=${preSign}&msgid=${msgId}&systemtime=${time}&sourceid=220029&signature=${signature}`;
1091
- const res = await import_axios13.default.get(url);
1128
+ const res = await import_axios6.default.get(url);
1092
1129
  const data = res.data;
1093
1130
  if (!data || data.status !== 2e3) return void 0;
1094
1131
  const rsaSign = data.result?.rsaSign || "";
@@ -1104,7 +1141,7 @@ var getSTToken = async (uniToken) => {
1104
1141
  "isFirst": 1
1105
1142
  };
1106
1143
  const form = URLParams($);
1107
- const res = await import_axios13.default.post(
1144
+ const res = await import_axios6.default.post(
1108
1145
  "https://passport.migu.cn/authn/uniTokenValidate",
1109
1146
  {
1110
1147
  headers: {
@@ -1145,7 +1182,7 @@ var loginOneClick = {
1145
1182
  };
1146
1183
 
1147
1184
  // src/modules/login_phone.ts
1148
- var import_axios14 = __toESM(require("axios"), 1);
1185
+ var import_axios7 = __toESM(require("axios"), 1);
1149
1186
  function randomString3() {
1150
1187
  const random = Array.from({ length: 32 }, () => Math.floor(Math.random() * 16).toString(16)).join("");
1151
1188
  return random.toLowerCase();
@@ -1174,7 +1211,7 @@ var loginPhone = {
1174
1211
  $.fingerPrintDetail = fakeFingerprint;
1175
1212
  $._ = (/* @__PURE__ */ new Date()).getTime().toString();
1176
1213
  const query = URLParams($);
1177
- const res = await import_axios14.default.get(
1214
+ const res = await import_axios7.default.get(
1178
1215
  `https://passport.migu.cn/login/dynamicpassword?${query}`,
1179
1216
  {
1180
1217
  headers: {
@@ -1212,7 +1249,7 @@ var loginPhone = {
1212
1249
  $.fingerPrint = fakeFingerprint;
1213
1250
  $.fingerPrintDetail = fakeFingerprint;
1214
1251
  const form = URLParams($);
1215
- const res = await import_axios14.default.post(
1252
+ const res = await import_axios7.default.post(
1216
1253
  `https://passport.migu.cn/authn/dynamicpassword`,
1217
1254
  form,
1218
1255
  {
@@ -1255,18 +1292,11 @@ var getNinanByDate = async (date) => {
1255
1292
  };
1256
1293
 
1257
1294
  // src/modules/recommend_radio_all.ts
1258
- var import_axios15 = __toESM(require("axios"), 1);
1259
1295
  var getRadioRecommendAll = async (pacmtoken = "") => {
1260
- const res = await import_axios15.default.get(
1261
- `https://app.c.nf.migu.cn/pc/bmw/page-data/music-radio/v1.0?templateVersion=1`,
1262
- {
1263
- headers: {
1264
- "Cookie": `pacmtoken=${pacmtoken}`
1265
- }
1266
- }
1267
- );
1268
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1269
- return { data: res.data, newPacmToken };
1296
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/bmw/page-data/music-radio/v1.0?templateVersion=1`, {
1297
+ cookie: pacmtoken ? { pacmtoken } : void 0
1298
+ });
1299
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1270
1300
  };
1271
1301
 
1272
1302
  // src/modules/svideo_info.ts
@@ -1325,10 +1355,10 @@ var getVrbtUrl = async (contentIds) => {
1325
1355
  };
1326
1356
 
1327
1357
  // src/modules/lyric.ts
1328
- var import_axios16 = __toESM(require("axios"), 1);
1358
+ var import_axios8 = __toESM(require("axios"), 1);
1329
1359
  var getLyric = async (contentId) => {
1330
1360
  if (contentId === "") return { error: "contentId is empty!", success: false };
1331
- const res = await import_axios16.default.get(`https://app.c.nf.migu.cn/resource/song/by-contentids/v2.0?contentId=${contentId}`);
1361
+ const res = await import_axios8.default.get(`https://app.c.nf.migu.cn/resource/song/by-contentids/v2.0?contentId=${contentId}`);
1332
1362
  const code = res.data.code.toString() || "";
1333
1363
  const data = res.data.data || [];
1334
1364
  if (code !== "000000") return {
@@ -1339,7 +1369,7 @@ var getLyric = async (contentId) => {
1339
1369
  if (data.length === 0) return { error: "data.length = 0 !", success: false, data };
1340
1370
  const lrcUrl = data[0].lrcUrl || "";
1341
1371
  if (lrcUrl === "") return { error: "lrcUrl is empty!", success: false, data };
1342
- const lrcRes = await import_axios16.default.get(lrcUrl);
1372
+ const lrcRes = await import_axios8.default.get(lrcUrl);
1343
1373
  if (lrcRes.status !== 200) return {
1344
1374
  success: false,
1345
1375
  status: lrcRes.status,
@@ -1355,78 +1385,57 @@ var getLyric = async (contentId) => {
1355
1385
  };
1356
1386
 
1357
1387
  // src/modules/user_collect_add.ts
1358
- var import_axios17 = __toESM(require("axios"), 1);
1359
1388
  var addUserCollect = async (pacmtoken, playlistId, title) => {
1360
1389
  title = encodeURIComponent(title);
1361
- const res = await import_axios17.default.get(
1362
- `https://app.c.nf.migu.cn/pc/v1.0/user/add_collection.do?outOPType=03&outResourceName=${title}&outResourceType=2021&outResourceId=${playlistId}`,
1363
- {
1364
- headers: {
1365
- "cookie": `pacmtoken=${pacmtoken}`
1366
- }
1367
- }
1368
- );
1369
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1370
- return { data: res.data, newPacmToken };
1390
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/v1.0/user/add_collection.do?outOPType=03&outResourceName=${title}&outResourceType=2021&outResourceId=${playlistId}`, {
1391
+ cookie: { pacmtoken }
1392
+ });
1393
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1371
1394
  };
1372
1395
 
1373
1396
  // src/modules/user_collect_remove.ts
1374
- var import_axios18 = __toESM(require("axios"), 1);
1375
1397
  var removeUserCollect = async (pacmtoken, playlistId) => {
1376
- const res = await import_axios18.default.get(
1377
- `https://app.c.nf.migu.cn/pc/v1.0/user/del_collection.do?oPType=03&resourceType=2021&resourceId=${playlistId}`,
1378
- {
1379
- headers: {
1380
- "cookie": `pacmtoken=${pacmtoken}`
1381
- }
1382
- }
1383
- );
1384
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1385
- return { data: res.data, newPacmToken };
1398
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/v1.0/user/del_collection.do?oPType=03&resourceType=2021&resourceId=${playlistId}`, {
1399
+ cookie: { pacmtoken }
1400
+ });
1401
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1386
1402
  };
1387
1403
 
1388
1404
  // src/modules/user_like.ts
1389
- var import_axios19 = __toESM(require("axios"), 1);
1390
1405
  var likeSong = async (pacmtoken, contentIds) => {
1391
1406
  const contentIdsList = contentIds.split(",");
1392
- const res = await import_axios19.default.post(
1393
- `https://app.c.nf.migu.cn/pc/user/api/add-music-list-song/v1.0`,
1394
- {
1407
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/user/api/add-music-list-song/v1.0`, {
1408
+ method: "POST",
1409
+ cookie: { pacmtoken },
1410
+ body: JSON.stringify({
1395
1411
  contentIds: contentIdsList
1396
- },
1397
- {
1398
- headers: {
1399
- "Cookie": `pacmtoken=${pacmtoken}`
1400
- }
1412
+ }),
1413
+ headers: {
1414
+ "Content-Type": "application/json"
1401
1415
  }
1402
- );
1403
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1404
- return { data: res.data, newPacmToken };
1416
+ });
1417
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1405
1418
  };
1406
1419
 
1407
1420
  // src/modules/user_dislike.ts
1408
- var import_axios20 = __toESM(require("axios"), 1);
1409
1421
  var dislikeSong = async (pacmtoken, contentId) => {
1410
1422
  const body = {
1411
1423
  "channel": "23",
1412
1424
  "contentId": contentId,
1413
1425
  "songflag": "2"
1414
1426
  };
1415
- const res = await import_axios20.default.post(
1416
- `https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`,
1417
- body,
1418
- {
1419
- headers: {
1420
- "Cookie": `pacmtoken=${pacmtoken}`
1421
- }
1427
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`, {
1428
+ method: "POST",
1429
+ cookie: { pacmtoken },
1430
+ body: JSON.stringify(body),
1431
+ headers: {
1432
+ "Content-Type": "application/json"
1422
1433
  }
1423
- );
1424
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1425
- return { data: res.data, newPacmToken };
1434
+ });
1435
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1426
1436
  };
1427
1437
 
1428
1438
  // src/modules/user_myList_edit.ts
1429
- var import_axios21 = __toESM(require("axios"), 1);
1430
1439
  var editUserMyList = async (pacmtoken, title, playlistId) => {
1431
1440
  const body = {
1432
1441
  "title": title,
@@ -1434,50 +1443,41 @@ var editUserMyList = async (pacmtoken, title, playlistId) => {
1434
1443
  "id": playlistId,
1435
1444
  "songflag": "0"
1436
1445
  };
1437
- const res = await import_axios21.default.post(
1438
- `https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`,
1439
- body,
1440
- {
1441
- headers: {
1442
- "Cookie": `pacmtoken=${pacmtoken}`
1443
- }
1446
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`, {
1447
+ method: "POST",
1448
+ cookie: { pacmtoken },
1449
+ body: JSON.stringify(body),
1450
+ headers: {
1451
+ "Content-Type": "application/json"
1444
1452
  }
1445
- );
1446
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1447
- return { data: res.data, newPacmToken };
1453
+ });
1454
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1448
1455
  };
1449
1456
 
1450
1457
  // src/modules/user_myList_add.ts
1451
- var import_axios22 = __toESM(require("axios"), 1);
1452
1458
  var addUserMyList = async (pacmtoken, title) => {
1453
1459
  const body = {
1454
1460
  "title": title,
1455
1461
  "channel": "23",
1456
1462
  "type": "self_build"
1457
1463
  };
1458
- const res = await import_axios22.default.post(
1459
- `https://app.c.nf.migu.cn/pc/open/api/music-list/add/v2.0`,
1460
- body,
1461
- {
1462
- headers: {
1463
- "Cookie": `pacmtoken=${pacmtoken}`
1464
- }
1464
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/open/api/music-list/add/v2.0`, {
1465
+ method: "POST",
1466
+ cookie: { pacmtoken },
1467
+ body: JSON.stringify(body),
1468
+ headers: {
1469
+ "Content-Type": "application/json"
1465
1470
  }
1466
- );
1467
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1468
- return { data: res.data, newPacmToken };
1471
+ });
1472
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1469
1473
  };
1470
1474
 
1471
1475
  // src/modules/user_myList_remove.ts
1472
- var import_axios23 = __toESM(require("axios"), 1);
1473
1476
  var removeUserMyList = async (pacmtoken, playlistId) => {
1474
- const res = await import_axios23.default.get(`https://app.c.nf.migu.cn/pc/v1.0/user/deleteMusicList.do?channel=23&id=${playlistId}`, {
1475
- headers: {
1476
- "Cookie": `pacmtoken=${pacmtoken}`
1477
- }
1477
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/v1.0/user/deleteMusicList.do?channel=23&id=${playlistId}`, {
1478
+ cookie: { pacmtoken }
1478
1479
  });
1479
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1480
- return { data: res.data, newPacmToken };
1480
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1481
1481
  };
1482
1482
 
1483
1483
  // src/modules/radio_song.ts
@@ -1501,27 +1501,23 @@ var getColumnInfo = async (columnId) => {
1501
1501
  };
1502
1502
 
1503
1503
  // src/modules/user_myList_add_song.ts
1504
- var import_axios24 = __toESM(require("axios"), 1);
1505
1504
  var addSongToMyList = async (pacmtoken, playlistId, contentIds) => {
1506
1505
  const body = {
1507
1506
  "id": playlistId,
1508
1507
  "contentIds": contentIds.split(",")
1509
1508
  };
1510
- const res = await import_axios24.default.post(
1511
- `https://app.c.nf.migu.cn/pc/user/api/add-music-list-song/v1.0`,
1512
- body,
1513
- {
1514
- headers: {
1515
- "Cookie": `pacmtoken=${pacmtoken}`
1516
- }
1509
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/user/api/add-music-list-song/v1.0`, {
1510
+ method: "POST",
1511
+ cookie: { pacmtoken },
1512
+ body: JSON.stringify(body),
1513
+ headers: {
1514
+ "Content-Type": "application/json"
1517
1515
  }
1518
- );
1519
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1520
- return { data: res.data, newPacmToken };
1516
+ });
1517
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1521
1518
  };
1522
1519
 
1523
1520
  // src/modules/user_myList_remove_song.ts
1524
- var import_axios25 = __toESM(require("axios"), 1);
1525
1521
  var removeSongFromMyList = async (pacmtoken, playlistId, contentId) => {
1526
1522
  const body = {
1527
1523
  "channel": "23",
@@ -1529,17 +1525,164 @@ var removeSongFromMyList = async (pacmtoken, playlistId, contentId) => {
1529
1525
  "contentId": contentId,
1530
1526
  "id": playlistId
1531
1527
  };
1532
- const res = await import_axios25.default.post(
1533
- `https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`,
1534
- body,
1528
+ const { data, cookies } = await ckfetch(`https://app.c.nf.migu.cn/pc/user/h5-import-musiclist/v1.0`, {
1529
+ method: "POST",
1530
+ cookie: { pacmtoken },
1531
+ body: JSON.stringify(body),
1532
+ headers: {
1533
+ "Content-Type": "application/json"
1534
+ }
1535
+ });
1536
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1537
+ };
1538
+
1539
+ // src/modules/svideo_userInfo.ts
1540
+ var getSVideoUserInfo = async (type, uid = "", videoUserId = "") => {
1541
+ let url = "https://app.c.nf.migu.cn/resource/video-user";
1542
+ if (type === "uid") {
1543
+ url += `/by-uid/v1.0?uid=${uid}`;
1544
+ } else if (type === "videoUserId") {
1545
+ url += `/by-id/v1.0?videoUserId=${videoUserId}`;
1546
+ } else {
1547
+ return { error: "Invalid parameter type", success: false };
1548
+ }
1549
+ return h5fetch(url);
1550
+ };
1551
+
1552
+ // src/modules/concert_info.ts
1553
+ var getConcertInfo = async (concertId) => {
1554
+ return await h5fetch(`http://c.musicapp.migu.cn/MIGUM2.0/v2.0/content/queryConcertSummary.do?columnId=${concertId}`);
1555
+ };
1556
+
1557
+ // src/modules/concert_url.ts
1558
+ var getConcertUrl = async (concertId, liveId, rateLevel = 1) => {
1559
+ return await h5fetch(
1560
+ `http://c.musicapp.migu.cn/MIGUM2.0/v2.1/danmaku/liveServerHosts.do?concertId=${concertId}&liveId=${liveId}&liveType=1&rateLevel=${rateLevel}`,
1561
+ {
1562
+ headers: {
1563
+ "channel": "0146921"
1564
+ //android client
1565
+ }
1566
+ }
1567
+ );
1568
+ };
1569
+
1570
+ // src/modules/concert_detail.ts
1571
+ var getConcertDetail = async (concertId) => {
1572
+ return await h5fetch(`https://app.c.nf.migu.cn/MIGUM3.0/v1.0/template/concert-detail/release?columnId=${concertId}&templateVersion=10`);
1573
+ };
1574
+
1575
+ // src/modules/concert_comment.ts
1576
+ var getConcertComment = async (concertId, page = 1, size = 20) => {
1577
+ return await h5fetch(`http://b.musicapp.migu.cn/MIGUM2.0/v1.0/danmaku/danmakuHisListPage.do?page=${page}&pageSize=${size}&resourceId=${concertId}`);
1578
+ };
1579
+
1580
+ // src/modules/playlist_match.ts
1581
+ var matchPlaylist = async (url) => {
1582
+ url = encodeURIComponent(url);
1583
+ return await h5fetch(`http://c.musicapp.migu.cn/v1.0/content/get-import-songList?url=${url}`);
1584
+ };
1585
+
1586
+ // src/modules/ninan_signInfo.ts
1587
+ var getNinanSignInfo = async (pacmtoken) => {
1588
+ const { data, cookies } = await ckfetch(
1589
+ "http://u.musicapp.migu.cn/MIGUM3.0/user/sign-center/v1.0",
1590
+ {
1591
+ cookie: { pacmtoken },
1592
+ headers: {
1593
+ "channel": "014021I"
1594
+ }
1595
+ }
1596
+ );
1597
+ return {
1598
+ data,
1599
+ newPacmToken: cookies.pacmtoken || ""
1600
+ };
1601
+ };
1602
+
1603
+ // src/modules/ninan_sign.ts
1604
+ var signNinan = async (pacmtoken) => {
1605
+ const { data, cookies } = await ckfetch(
1606
+ "http://c.musicapp.migu.cn/MIGUM2.0/v2.0/user/sign-reward",
1607
+ {
1608
+ cookie: { pacmtoken },
1609
+ headers: {
1610
+ "location-data": "30.6698676660,104.1229614820",
1611
+ "channel": "0146921"
1612
+ }
1613
+ }
1614
+ );
1615
+ return {
1616
+ data,
1617
+ newPacmToken: cookies.pacmtoken || ""
1618
+ };
1619
+ };
1620
+
1621
+ // src/modules/url_redirect.ts
1622
+ var import_axios9 = __toESM(require("axios"), 1);
1623
+ var getRedirectUrl = async (contentId, toneFlag = "PQ") => {
1624
+ return await import_axios9.default.head(
1625
+ `http://app.pd.nf.migu.cn/MIGUM2.0/v1.0/content/sub/listenSong.do`,
1626
+ {
1627
+ maxRedirects: 0,
1628
+ params: {
1629
+ "toneFlag": toneFlag,
1630
+ "copyrightId": "0",
1631
+ "contentId": contentId,
1632
+ "resourceType": "2",
1633
+ "channel": "0"
1634
+ }
1635
+ }
1636
+ ).catch((err) => err.response).then((res) => res?.headers?.location?.split("?")[0] ?? "");
1637
+ };
1638
+
1639
+ // src/modules/concert_mv.ts
1640
+ var getConcertRecommendMv = async (concertId) => {
1641
+ return await h5fetch(`https://app.c.nf.migu.cn/v1.0/liveshow/query-mv-detail?concertId=${concertId}`);
1642
+ };
1643
+
1644
+ // src/modules/mv_song.ts
1645
+ var getMvBySong = async (songId) => {
1646
+ return await h5fetch(
1647
+ `https://app.c.nf.migu.cn/MIGUM2.0/strategy/mv-player/video/v1.0?songId=${songId}`,
1535
1648
  {
1536
1649
  headers: {
1537
- "Cookie": `pacmtoken=${pacmtoken}`
1650
+ "channel": "0146921"
1538
1651
  }
1539
1652
  }
1540
1653
  );
1541
- const newPacmToken = getSetCookieValueFromObject(res.headers, "pacmtoken");
1542
- return { data: res.data, newPacmToken };
1654
+ };
1655
+
1656
+ // src/modules/user_isFollow.ts
1657
+ var isFollowAuthor = async (pacmtoken, authorIds, authorType = "singer") => {
1658
+ const authorList = authorIds.split(",");
1659
+ if (authorList.length === 0 || authorType === "" || authorList.length > 100) {
1660
+ return { success: false, data: { error: "\u4F5C\u8005id\u5217\u8868\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u4E14\u6700\u591A100\u4E2A" }, newPacmToken: "" };
1661
+ }
1662
+ const authors = authorList.map(function(authorId) {
1663
+ return {
1664
+ "authorId": authorId,
1665
+ "authorType": authorType
1666
+ };
1667
+ });
1668
+ const { data, cookies } = await ckfetch(
1669
+ `https://app.u.nf.migu.cn/user/i/social/is-follow-subscribe/v1.0`,
1670
+ {
1671
+ method: "POST",
1672
+ cookie: { pacmtoken },
1673
+ headers: { "Content-Type": "application/json" },
1674
+ body: JSON.stringify({
1675
+ "actionType": 2,
1676
+ authors
1677
+ })
1678
+ }
1679
+ );
1680
+ return { data, newPacmToken: cookies.pacmtoken || "" };
1681
+ };
1682
+
1683
+ // src/modules/playlist_vip.ts
1684
+ var getVipPlaylist = async (size = 10) => {
1685
+ return await h5fetch(`http://app.c.nf.migu.cn/bmw/vip-exclusive/auditions-list/v1.0?pageSize=${size}`);
1543
1686
  };
1544
1687
 
1545
1688
  // src/utils/index.ts
@@ -1548,23 +1691,9 @@ __export(utils_exports, {
1548
1691
  RSAKey: () => RSAKey,
1549
1692
  URLParams: () => URLParams,
1550
1693
  getDeviceId: () => getDeviceId,
1551
- getPublicKey: () => getPublicKey,
1552
- randomUA: () => randomUA,
1553
- ua: () => ua
1694
+ getPublicKey: () => getPublicKey
1554
1695
  });
1555
1696
 
1556
- // src/utils/ua.ts
1557
- var ua = [
1558
- "Mozilla/5.0 (Linux; Android 9; Redmi Note 7 Build/PKQ1.180904.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.121 Mobile Safari/537.36",
1559
- "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36 Edg/149.0.0.0",
1560
- "Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_1 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B150 /sa-sdk-ios/sensors-verify/sc.baertt.com?production ",
1561
- "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/534.31 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/534.31"
1562
- ];
1563
- var randomUA = () => {
1564
- const i = Math.floor(Math.random() * ua.length);
1565
- return ua[i];
1566
- };
1567
-
1568
1697
  // src/index.ts
1569
1698
  function createClient() {
1570
1699
  return modules_exports;
@@ -1587,14 +1716,21 @@ function createClient() {
1587
1716
  getAlbumSong,
1588
1717
  getColumnInfo,
1589
1718
  getComment,
1719
+ getConcertComment,
1720
+ getConcertDetail,
1721
+ getConcertInfo,
1722
+ getConcertRecommendMv,
1723
+ getConcertUrl,
1590
1724
  getDeviceId,
1591
1725
  getLyric,
1592
1726
  getMVRecommend,
1727
+ getMvBySong,
1593
1728
  getMvHls,
1594
1729
  getMvInfo,
1595
1730
  getNewCDList,
1596
1731
  getNewSongList,
1597
1732
  getNinanByDate,
1733
+ getNinanSignInfo,
1598
1734
  getNinanSong,
1599
1735
  getOpNum,
1600
1736
  getPacmToken,
@@ -1608,11 +1744,13 @@ function createClient() {
1608
1744
  getRankIndex,
1609
1745
  getRankInfo,
1610
1746
  getRecommendPlaylist,
1747
+ getRedirectUrl,
1611
1748
  getResourceInfo,
1612
1749
  getSVideoInfo,
1613
1750
  getSVideoSearchSuggest,
1614
1751
  getSVideoUrl,
1615
1752
  getSVideoUserContent,
1753
+ getSVideoUserInfo,
1616
1754
  getSceneRecommend,
1617
1755
  getSearchDefault,
1618
1756
  getSearchHot,
@@ -1633,16 +1771,18 @@ function createClient() {
1633
1771
  getUserHomePage,
1634
1772
  getUserMyList,
1635
1773
  getVersion,
1774
+ getVipPlaylist,
1636
1775
  getVrbtOpNum,
1637
1776
  getVrbtUrl,
1777
+ isFollowAuthor,
1638
1778
  likeSong,
1639
1779
  loginNP,
1640
1780
  loginOneClick,
1641
1781
  loginPhone,
1642
1782
  loginSim,
1783
+ matchPlaylist,
1643
1784
  modules,
1644
1785
  queryUserInfo,
1645
- randomUA,
1646
1786
  removeSongFromMyList,
1647
1787
  removeUserCollect,
1648
1788
  removeUserMyList,
@@ -1656,6 +1796,6 @@ function createClient() {
1656
1796
  searchSong,
1657
1797
  searchSuggest,
1658
1798
  searchTicket,
1659
- ua
1799
+ signNinan
1660
1800
  });
1661
1801
  //# sourceMappingURL=index.cjs.map