@ikenxuan/amagi 5.1.0 → 5.1.1
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.
|
@@ -226,8 +226,19 @@ var qtparam = async (BASEURL, cookie) => {
|
|
|
226
226
|
let isvip;
|
|
227
227
|
logininfo.data.vipStatus === 1 ? isvip = true : isvip = false;
|
|
228
228
|
if (isvip) {
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
const fnval = 4048;
|
|
230
|
+
return {
|
|
231
|
+
QUERY: `&fnval=${fnval}&fourk=1&${sign}`,
|
|
232
|
+
STATUS: "isLogin",
|
|
233
|
+
isvip
|
|
234
|
+
};
|
|
235
|
+
} else {
|
|
236
|
+
return {
|
|
237
|
+
QUERY: `&qn=${qn[3]}&fnval=16&${sign}`,
|
|
238
|
+
STATUS: "isLogin",
|
|
239
|
+
isvip
|
|
240
|
+
};
|
|
241
|
+
}
|
|
231
242
|
};
|
|
232
243
|
|
|
233
244
|
// src/platform/bilibili/sign/bv2av.ts
|
|
@@ -555,7 +566,7 @@ var fetchBilibili = async (data2, cookie, requestConfig) => {
|
|
|
555
566
|
}
|
|
556
567
|
case "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E": {
|
|
557
568
|
const BASEURL = bilibiliApiUrls.\u89C6\u9891\u6D41\u4FE1\u606F({ avid: data2.avid, cid: data2.cid });
|
|
558
|
-
const SIGN = await qtparam(BASEURL, (_a = baseRequestConfig.headers) == null ? void 0 : _a.
|
|
569
|
+
const SIGN = await qtparam(BASEURL, (_a = baseRequestConfig.headers) == null ? void 0 : _a.Cookie);
|
|
559
570
|
const DATA = await GlobalGetData(data2.methodType, {
|
|
560
571
|
...baseRequestConfig,
|
|
561
572
|
url: bilibiliApiUrls.\u89C6\u9891\u6D41\u4FE1\u606F({ avid: data2.avid, cid: data2.cid }) + SIGN.QUERY
|
|
@@ -210,8 +210,19 @@ var qtparam = async (BASEURL, cookie) => {
|
|
|
210
210
|
let isvip;
|
|
211
211
|
logininfo.data.vipStatus === 1 ? isvip = true : isvip = false;
|
|
212
212
|
if (isvip) {
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
const fnval = 4048;
|
|
214
|
+
return {
|
|
215
|
+
QUERY: `&fnval=${fnval}&fourk=1&${sign}`,
|
|
216
|
+
STATUS: "isLogin",
|
|
217
|
+
isvip
|
|
218
|
+
};
|
|
219
|
+
} else {
|
|
220
|
+
return {
|
|
221
|
+
QUERY: `&qn=${qn[3]}&fnval=16&${sign}`,
|
|
222
|
+
STATUS: "isLogin",
|
|
223
|
+
isvip
|
|
224
|
+
};
|
|
225
|
+
}
|
|
215
226
|
};
|
|
216
227
|
|
|
217
228
|
// src/platform/bilibili/sign/bv2av.ts
|
|
@@ -539,7 +550,7 @@ var fetchBilibili = async (data2, cookie, requestConfig) => {
|
|
|
539
550
|
}
|
|
540
551
|
case "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E": {
|
|
541
552
|
const BASEURL = bilibiliApiUrls.\u89C6\u9891\u6D41\u4FE1\u606F({ avid: data2.avid, cid: data2.cid });
|
|
542
|
-
const SIGN = await qtparam(BASEURL, (_a = baseRequestConfig.headers) == null ? void 0 : _a.
|
|
553
|
+
const SIGN = await qtparam(BASEURL, (_a = baseRequestConfig.headers) == null ? void 0 : _a.Cookie);
|
|
543
554
|
const DATA = await GlobalGetData(data2.methodType, {
|
|
544
555
|
...baseRequestConfig,
|
|
545
556
|
url: bilibiliApiUrls.\u89C6\u9891\u6D41\u4FE1\u606F({ avid: data2.avid, cid: data2.cid }) + SIGN.QUERY
|
package/dist/default/index.d.ts
CHANGED
|
@@ -17431,6 +17431,12 @@ declare const bilibiliErrorCodeMap: {
|
|
|
17431
17431
|
'-8888': string;
|
|
17432
17432
|
};
|
|
17433
17433
|
|
|
17434
|
+
/**
|
|
17435
|
+
* 生成B站视频流请求参数
|
|
17436
|
+
* @param BASEURL - 基础请求URL
|
|
17437
|
+
* @param cookie - 用户Cookie
|
|
17438
|
+
* @returns 包含查询参数、登录状态和VIP状态的对象
|
|
17439
|
+
*/
|
|
17434
17440
|
declare const qtparam: (BASEURL: string, cookie: string) => Promise<{
|
|
17435
17441
|
QUERY: string;
|
|
17436
17442
|
STATUS: string;
|