@ikenxuan/amagi 4.4.5 → 4.4.6

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.
@@ -566,8 +566,8 @@ var registerBilibiliRoutes = (cookie) => {
566
566
  router.get("/fetch_video_playurl", async (req, res) => {
567
567
  const data2 = await BilibiliData({
568
568
  methodType: "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E",
569
- avid: req.query.avid,
570
- cid: req.query.cid
569
+ avid: parseInt(req.query.avid),
570
+ cid: parseInt(req.query.cid)
571
571
  }, req.headers.cookie || cookie);
572
572
  res.json(data2);
573
573
  });
@@ -596,7 +596,7 @@ var registerBilibiliRoutes = (cookie) => {
596
596
  router.get("/fetch_bangumi_video_playurl", async (req, res) => {
597
597
  const data2 = await BilibiliData({
598
598
  methodType: "\u756A\u5267\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E",
599
- cid: req.query.cid,
599
+ cid: parseInt(req.query.cid),
600
600
  ep_id: req.query.ep_id
601
601
  }, req.headers.cookie || cookie);
602
602
  res.json(data2);
@@ -604,7 +604,7 @@ var registerBilibiliRoutes = (cookie) => {
604
604
  router.get("/fetch_user_dynamic", async (req, res) => {
605
605
  const data2 = await BilibiliData({
606
606
  methodType: "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E",
607
- host_mid: req.query.host_mid
607
+ host_mid: parseInt(req.query.host_mid)
608
608
  }, req.headers.cookie || cookie);
609
609
  res.json(data2);
610
610
  });
@@ -625,7 +625,7 @@ var registerBilibiliRoutes = (cookie) => {
625
625
  router.get("/fetch_user_profile", async (req, res) => {
626
626
  const data2 = await BilibiliData({
627
627
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E",
628
- host_mid: req.query.host_mid
628
+ host_mid: parseInt(req.query.host_mid)
629
629
  }, req.headers.cookie || cookie);
630
630
  res.json(data2);
631
631
  });
@@ -653,14 +653,14 @@ var registerBilibiliRoutes = (cookie) => {
653
653
  router.get("/av_to_bv", async (req, res) => {
654
654
  const data2 = await BilibiliData({
655
655
  methodType: "AV\u8F6CBV",
656
- avid: req.query.avid
656
+ avid: parseInt(req.query.avid)
657
657
  }, req.headers.cookie || cookie);
658
658
  res.json(data2);
659
659
  });
660
660
  router.get("/fetch_user_full_view", async (req, res) => {
661
661
  const data2 = await BilibiliData({
662
662
  methodType: "\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF",
663
- host_mid: req.query.host_mid
663
+ host_mid: parseInt(req.query.host_mid)
664
664
  }, req.headers.cookie || cookie);
665
665
  res.json(data2);
666
666
  });
@@ -1395,7 +1395,9 @@ var registerDouyinRoutes = (cookie) => {
1395
1395
  router.get("/fetch_work_comments", async (req, res) => {
1396
1396
  const data2 = await DouyinData({
1397
1397
  methodType: "\u8BC4\u8BBA\u6570\u636E",
1398
- aweme_id: req.query.aweme_id
1398
+ aweme_id: req.query.aweme_id,
1399
+ number: parseInt(req.query.number ?? "50"),
1400
+ cursor: parseInt(req.query.cursor ?? "0")
1399
1401
  }, req.headers.cookie || cookie);
1400
1402
  res.json(data2);
1401
1403
  });
@@ -1431,7 +1433,9 @@ var registerDouyinRoutes = (cookie) => {
1431
1433
  router.get("/fetch_search_info", async (req, res) => {
1432
1434
  const data2 = await DouyinData({
1433
1435
  methodType: "\u641C\u7D22\u6570\u636E",
1434
- query: req.query.query
1436
+ query: req.query.query,
1437
+ number: parseInt(req.query.number ?? "10"),
1438
+ search_id: req.query.search_id
1435
1439
  }, req.headers.cookie || cookie);
1436
1440
  res.json(data2);
1437
1441
  });
@@ -554,8 +554,8 @@ var registerBilibiliRoutes = (cookie) => {
554
554
  router.get("/fetch_video_playurl", async (req, res) => {
555
555
  const data2 = await BilibiliData({
556
556
  methodType: "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E",
557
- avid: req.query.avid,
558
- cid: req.query.cid
557
+ avid: parseInt(req.query.avid),
558
+ cid: parseInt(req.query.cid)
559
559
  }, req.headers.cookie || cookie);
560
560
  res.json(data2);
561
561
  });
@@ -584,7 +584,7 @@ var registerBilibiliRoutes = (cookie) => {
584
584
  router.get("/fetch_bangumi_video_playurl", async (req, res) => {
585
585
  const data2 = await BilibiliData({
586
586
  methodType: "\u756A\u5267\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E",
587
- cid: req.query.cid,
587
+ cid: parseInt(req.query.cid),
588
588
  ep_id: req.query.ep_id
589
589
  }, req.headers.cookie || cookie);
590
590
  res.json(data2);
@@ -592,7 +592,7 @@ var registerBilibiliRoutes = (cookie) => {
592
592
  router.get("/fetch_user_dynamic", async (req, res) => {
593
593
  const data2 = await BilibiliData({
594
594
  methodType: "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E",
595
- host_mid: req.query.host_mid
595
+ host_mid: parseInt(req.query.host_mid)
596
596
  }, req.headers.cookie || cookie);
597
597
  res.json(data2);
598
598
  });
@@ -613,7 +613,7 @@ var registerBilibiliRoutes = (cookie) => {
613
613
  router.get("/fetch_user_profile", async (req, res) => {
614
614
  const data2 = await BilibiliData({
615
615
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E",
616
- host_mid: req.query.host_mid
616
+ host_mid: parseInt(req.query.host_mid)
617
617
  }, req.headers.cookie || cookie);
618
618
  res.json(data2);
619
619
  });
@@ -641,14 +641,14 @@ var registerBilibiliRoutes = (cookie) => {
641
641
  router.get("/av_to_bv", async (req, res) => {
642
642
  const data2 = await BilibiliData({
643
643
  methodType: "AV\u8F6CBV",
644
- avid: req.query.avid
644
+ avid: parseInt(req.query.avid)
645
645
  }, req.headers.cookie || cookie);
646
646
  res.json(data2);
647
647
  });
648
648
  router.get("/fetch_user_full_view", async (req, res) => {
649
649
  const data2 = await BilibiliData({
650
650
  methodType: "\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF",
651
- host_mid: req.query.host_mid
651
+ host_mid: parseInt(req.query.host_mid)
652
652
  }, req.headers.cookie || cookie);
653
653
  res.json(data2);
654
654
  });
@@ -1383,7 +1383,9 @@ var registerDouyinRoutes = (cookie) => {
1383
1383
  router.get("/fetch_work_comments", async (req, res) => {
1384
1384
  const data2 = await DouyinData({
1385
1385
  methodType: "\u8BC4\u8BBA\u6570\u636E",
1386
- aweme_id: req.query.aweme_id
1386
+ aweme_id: req.query.aweme_id,
1387
+ number: parseInt(req.query.number ?? "50"),
1388
+ cursor: parseInt(req.query.cursor ?? "0")
1387
1389
  }, req.headers.cookie || cookie);
1388
1390
  res.json(data2);
1389
1391
  });
@@ -1419,7 +1421,9 @@ var registerDouyinRoutes = (cookie) => {
1419
1421
  router.get("/fetch_search_info", async (req, res) => {
1420
1422
  const data2 = await DouyinData({
1421
1423
  methodType: "\u641C\u7D22\u6570\u636E",
1422
- query: req.query.query
1424
+ query: req.query.query,
1425
+ number: parseInt(req.query.number ?? "10"),
1426
+ search_id: req.query.search_id
1423
1427
  }, req.headers.cookie || cookie);
1424
1428
  res.json(data2);
1425
1429
  });
@@ -13762,9 +13762,10 @@ declare function qtparam(BASEURL: string, cookie: string): Promise<{
13762
13762
 
13763
13763
  declare function wbi_sign(BASEURL: string | URL, cookie: string): Promise<string>;
13764
13764
 
13765
- /** @ts-ignore */
13766
13765
  interface BilibiliRequest<T extends keyof BilibiliDataOptionsMap> extends Request {
13767
- query: Omit<BilibiliDataOptionsMap[T]['opt'], 'methodType'>;
13766
+ query: {
13767
+ [K in keyof OmitMethodType<BilibiliDataOptionsMap[T]['opt']>]: string;
13768
+ };
13768
13769
  }
13769
13770
  /**
13770
13771
  * 注册B站相关的API接口路由
@@ -13807,9 +13808,10 @@ declare class douyinSign {
13807
13808
  static VerifyFpManager(): string;
13808
13809
  }
13809
13810
 
13810
- /** @ts-ignore */
13811
13811
  interface DouyinRequest<T extends keyof DouyinDataOptionsMap> extends Request {
13812
- query: Omit<DouyinDataOptionsMap[T]['opt'], 'methodType'>;
13812
+ query: {
13813
+ [K in keyof OmitMethodType<DouyinDataOptionsMap[T]['opt']>]: string;
13814
+ };
13813
13815
  }
13814
13816
  /**
13815
13817
  * 注册抖音相关的API接口路由
@@ -13864,9 +13866,10 @@ declare const KuaishouAPI: API;
13864
13866
 
13865
13867
  declare const KuaishouData: <T extends keyof KuaishouDataOptionsMap>(data: KuaishouDataOptionsMap[T]["opt"], cookie?: string) => Promise<any>;
13866
13868
 
13867
- /** @ts-ignore */
13868
13869
  interface KusiahouRequest<T extends keyof KuaishouDataOptionsMap> extends Request {
13869
- query: Omit<KuaishouDataOptionsMap[T]['opt'], 'methodType'>;
13870
+ query: {
13871
+ [K in keyof OmitMethodType<KuaishouDataOptionsMap[T]['opt']>]: string;
13872
+ };
13870
13873
  }
13871
13874
  /**
13872
13875
  * 注册快手相关的API接口路由
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikenxuan/amagi",
3
- "version": "4.4.5",
3
+ "version": "4.4.6",
4
4
  "description": "抖音、B站的 web 端相关数据接口基于 Node.js 的实现",
5
5
  "keywords": [
6
6
  "douyin",