@ikenxuan/amagi 2.1.2 → 2.1.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.
@@ -10,7 +10,7 @@ class BiLiBiLiAPI {
10
10
  }
11
11
  /** type参数详见https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/comment/readme.md#评论区类型代码 */
12
12
  评论区明细(data) {
13
- return `https://api.bilibili.com/x/v2/reply?sort=1&ps=${data.number || 20}&type=${data.type}&oid=${data.oid}`;
13
+ return `https://api.bilibili.com/x/v2/reply?sort=1&ps=${data.number || 20}&type=${data.commentstype}&oid=${data.oid}`;
14
14
  }
15
15
  表情列表() {
16
16
  return 'https://api.bilibili.com/x/emote/user/panel/web?business=reply&web_location=0.0';
@@ -16,18 +16,27 @@ export default class BilibiliData {
16
16
  switch (this.type) {
17
17
  case "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E" /* BilibiliDataType.单个视频作品数据 */: {
18
18
  const INFODATA = await this.GlobalGetData({ url: BiLiBiLiAPI.视频详细信息({ id_type: 'bvid', id: data.id }) });
19
- const BASEURL = BiLiBiLiAPI.视频流信息({ avid: INFODATA.data.aid, cid: INFODATA.data.cid });
19
+ return INFODATA;
20
+ }
21
+ case "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E" /* BilibiliDataType.单个视频下载信息数据 */: {
22
+ const BASEURL = BiLiBiLiAPI.视频流信息({ avid: data.avid, cid: data.cid });
20
23
  const SIGN = await qtparam(BASEURL, this.headers.Cookie);
21
24
  const DATA = await this.GlobalGetData({
22
- url: BiLiBiLiAPI.视频流信息({ avid: INFODATA.data.aid, cid: INFODATA.data.cid }) + SIGN.QUERY,
25
+ url: BiLiBiLiAPI.视频流信息({ avid: data.avid, cid: data.cid }) + SIGN.QUERY,
23
26
  headers: this.headers
24
27
  });
25
- return { INFODATA, DATA };
28
+ return DATA;
26
29
  }
27
30
  case "\u8BC4\u8BBA\u6570\u636E" /* BilibiliDataType.评论数据 */: {
28
- const INFODATA = await this.GlobalGetData({ url: BiLiBiLiAPI.视频详细信息({ id_type: 'bvid', id: data.bvid }) });
29
- const PARAM = await wbi_sign(BiLiBiLiAPI.评论区明细({ type: 1, oid: INFODATA.data.aid }), this.headers.Cookie);
30
- const COMMENTSDATA = await this.GlobalGetData({ url: BiLiBiLiAPI.评论区明细({ type: 1, oid: INFODATA.data.aid }) + PARAM, headers: this.headers });
31
+ let COMMENTSDATA;
32
+ if (!data.bvid) {
33
+ COMMENTSDATA = await this.GlobalGetData({ url: BiLiBiLiAPI.评论区明细({ commentstype: Number(data.commentstype), oid: data.oid, number: data.number }), headers: this.headers });
34
+ }
35
+ else {
36
+ const INFODATA = await this.GlobalGetData({ url: BiLiBiLiAPI.视频详细信息({ id_type: 'bvid', id: data.bvid }) });
37
+ const PARAM = await wbi_sign(BiLiBiLiAPI.评论区明细({ type: 1, oid: INFODATA.data.aid }), this.headers.Cookie);
38
+ COMMENTSDATA = await this.GlobalGetData({ url: BiLiBiLiAPI.评论区明细({ commentstype: 1, oid: INFODATA.data.aid, number: data.number }) + PARAM, headers: this.headers });
39
+ }
31
40
  return COMMENTSDATA;
32
41
  }
33
42
  case "emoji\u6570\u636E" /* BilibiliDataType.emoji数据 */:
@@ -51,7 +60,7 @@ export default class BilibiliData {
51
60
  case "\u756A\u5267\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E" /* BilibiliDataType.番剧下载信息数据 */:
52
61
  return await this.GlobalGetData({ url: BiLiBiLiAPI.番剧视频流信息({ cid: data.cid, ep_id: data.ep_id }) });
53
62
  case "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E" /* BilibiliDataType.用户主页动态列表数据 */:
54
- // delete this.headers.Referer
63
+ delete this.headers.Referer;
55
64
  result = await this.GlobalGetData({
56
65
  url: BiLiBiLiAPI.用户空间动态({ host_mid: data.host_mid }),
57
66
  headers: this.headers
@@ -94,6 +103,27 @@ export default class BilibiliData {
94
103
  });
95
104
  return result;
96
105
  }
106
+ case "\u7533\u8BF7\u4E8C\u7EF4\u7801" /* BilibiliDataType.申请二维码 */: {
107
+ result = await this.GlobalGetData({
108
+ url: BiLiBiLiAPI.申请二维码(),
109
+ headers: this.headers
110
+ });
111
+ return result;
112
+ }
113
+ case "\u4E8C\u7EF4\u7801\u72B6\u6001" /* BilibiliDataType.二维码状态 */: {
114
+ result = await new Networks({
115
+ url: BiLiBiLiAPI.二维码状态({ qrcode_key: data.qrcode_key }),
116
+ headers: this.headers
117
+ }).getHeadersAndData();
118
+ return result;
119
+ }
120
+ case "\u767B\u5F55\u57FA\u672C\u4FE1\u606F" /* BilibiliDataType.登录基本信息 */: {
121
+ result = await this.GlobalGetData({
122
+ url: BiLiBiLiAPI.登录基本信息(),
123
+ headers: this.headers
124
+ });
125
+ return result;
126
+ }
97
127
  default:
98
128
  return null;
99
129
  }
@@ -17,12 +17,22 @@ export default async function BilibiliResult(config = { cookie: '' }, options) {
17
17
  case "\u52A8\u6001\u5361\u7247\u6570\u636E" /* BilibiliDataType.动态卡片数据 */:
18
18
  case "\u76F4\u64AD\u95F4\u4FE1\u606F" /* BilibiliDataType.直播间信息 */:
19
19
  case "\u76F4\u64AD\u95F4\u521D\u59CB\u5316\u4FE1\u606F" /* BilibiliDataType.直播间初始化信息 */:
20
+ case "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E" /* BilibiliDataType.单个视频下载信息数据 */:
21
+ case "\u4E8C\u7EF4\u7801\u72B6\u6001" /* BilibiliDataType.二维码状态 */:
22
+ case "\u7533\u8BF7\u4E8C\u7EF4\u7801" /* BilibiliDataType.申请二维码 */:
23
+ case "\u767B\u5F55\u57FA\u672C\u4FE1\u606F" /* BilibiliDataType.登录基本信息 */:
20
24
  data = await new BilibiliData(config.type, config.cookie).GetData(options);
21
25
  break;
22
26
  case "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E" /* BilibiliDataType.单个视频作品数据 */:
23
27
  case "\u756A\u5267\u57FA\u672C\u4FE1\u606F\u6570\u636E" /* BilibiliDataType.番剧基本信息数据 */: {
24
- const iddata = await GetBilibiliID(options.url);
25
- data = await new BilibiliData(config.type, config.cookie).GetData(iddata);
28
+ const hasid = options.id || null;
29
+ if (hasid) {
30
+ data = await new BilibiliData(config.type, config.cookie).GetData({ id: options.id });
31
+ }
32
+ else {
33
+ const iddata = await GetBilibiliID(options.url);
34
+ data = await new BilibiliData(config.type, config.cookie).GetData(iddata);
35
+ }
26
36
  break;
27
37
  }
28
38
  default:
@@ -5,7 +5,7 @@ class DouyinAPI {
5
5
  return `https://www.douyin.com/aweme/v1/web/aweme/detail/?device_platform=webapp&aid=6383&channel=channel_pc_web&aweme_id=${data.aweme_id}&update_version_code=170400&pc_client_type=1&version_code=190500&version_name=19.5.0&cookie_enabled=true&screen_width=2328&screen_height=1310&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=125.0.0.0&browser_online=true&engine_name=Blink&engine_version=125.0.0.0&os_name=Windows&os_version=10&cpu_core_num=16&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=150&webid=7351848354471872041&msToken=${Sign.Mstoken(116)}&verifyFp=${fp}&fp=${fp}`;
6
6
  }
7
7
  评论(data) {
8
- return `https://www.douyin.com/aweme/v1/web/comment/list/?device_platform=webapp&aid=6383&channel=channel_pc_web&aweme_id=${data.aweme_id}&cursor=0&count=${data.number}&item_type=0&insert_ids=&whale_cut_token=&cut_version=1&rcFT=&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1552&screen_height=970&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=125.0.0.0&browser_online=true&engine_name=Blink&engine_version=125.0.0.0&os_name=Windows&os_version=10&cpu_core_num=16&device_memory=8&platform=PC&downlink=10&effective_type=4g&msToken=${Sign.Mstoken(116)}&verifyFp=${fp}&fp=${fp}`;
8
+ return `https://www.douyin.com/aweme/v1/web/comment/list/?device_platform=webapp&aid=6383&channel=channel_pc_web&aweme_id=${data.aweme_id}&cursor=0&count=${data.number || 50}&item_type=0&insert_ids=&whale_cut_token=&cut_version=1&rcFT=&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1552&screen_height=970&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=125.0.0.0&browser_online=true&engine_name=Blink&engine_version=125.0.0.0&os_name=Windows&os_version=10&cpu_core_num=16&device_memory=8&platform=PC&downlink=10&effective_type=4g&msToken=${Sign.Mstoken(116)}&verifyFp=${fp}&fp=${fp}`;
9
9
  }
10
10
  二级评论(data) {
11
11
  return `https://www.douyin.com/aweme/v1/web/comment/list/reply/?device_platform=webapp&aid=6383&channel=channel_pc_web&item_id=${data.aweme_id}&comment_id=${data.comment_id}&cut_version=1&cursor=0&count=10&item_type=0&pc_client_type=1&version_code=170400&version_name=17.4.0&cookie_enabled=true&screen_width=1552&screen_height=970&browser_language=zh-CN&browser_platform=Win32&browser_name=Chrome&browser_version=126.0.0.0&browser_online=true&engine_name=Blink&engine_version=126.0.0.0&os_name=Windows&os_version=10&cpu_core_num=16&device_memory=8&platform=PC&downlink=10&effective_type=4g&round_trip_time=0&webid=7326516708850599434&msToken=${Sign.Mstoken(116)}&verifyFp=${fp}&fp=${fp}`;
@@ -28,7 +28,7 @@ export default class DouyinData {
28
28
  return VideoData;
29
29
  }
30
30
  case "\u8BC4\u8BBA\u6570\u636E" /* DouyinDataType.评论数据 */: {
31
- this.URL = DouyinAPI.评论({ aweme_id: data.aweme_id });
31
+ this.URL = DouyinAPI.评论({ aweme_id: data.aweme_id, number: data.number });
32
32
  const CommentsData = await this.GlobalGetData({
33
33
  url: `${this.URL}&a_bogus=${Sign.AB(this.URL)}`,
34
34
  headers: this.headers
@@ -115,7 +115,10 @@ export default class DouyinData {
115
115
  this.URL = DouyinAPI.动图({ aweme_id: data.aweme_id });
116
116
  const LiveImages = await this.GlobalGetData({
117
117
  url: `${this.URL}&a_bogus=${Sign.AB(this.URL)}`,
118
- headers: this.headers
118
+ headers: {
119
+ ...this.headers,
120
+ 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1 Edg/126.0.0.0'
121
+ }
119
122
  });
120
123
  return LiveImages;
121
124
  }
@@ -8,27 +8,39 @@ export default async function GetDouyinID(url) {
8
8
  const longLink = await new Networks({ url }).getLongLink();
9
9
  let result = {};
10
10
  switch (true) {
11
- case /video\/(\d+)/.test(longLink):
11
+ case /share\/slides\/(\d+)/.test(longLink): {
12
+ const newres = await new Networks({ url }).getLocation();
13
+ const match = newres.match(/share\/slides\/(\d+)/);
14
+ result = {
15
+ type: "\u5B9E\u51B5\u56FE\u7247\u56FE\u96C6\u6570\u636E" /* DouyinDataType.实况图片图集数据 */,
16
+ aweme_id: match ? match[1] : '',
17
+ };
18
+ break;
19
+ }
20
+ case /video\/(\d+)/.test(longLink): {
12
21
  const videoMatch = longLink.match(/video\/(\d+)/);
13
22
  result = {
14
- type: "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E" /* DouyinDataType['单个视频作品数据'] */,
23
+ type: "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E" /* DouyinDataType.单个视频作品数据 */,
15
24
  aweme_id: videoMatch ? videoMatch[1] : ''
16
25
  };
17
26
  break;
18
- case /note\/(\d+)/.test(longLink):
27
+ }
28
+ case /note\/(\d+)/.test(longLink): {
19
29
  const noteMatch = longLink.match(/note\/(\d+)/);
20
30
  result = {
21
- type: "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" /* DouyinDataType['图集作品数据'] */,
31
+ type: "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" /* DouyinDataType.图集作品数据 */,
22
32
  aweme_id: noteMatch ? noteMatch[1] : ''
23
33
  };
24
34
  break;
25
- case /user\/(\S+?)\?/.test(longLink):
35
+ }
36
+ case /user\/(\S+?)\?/.test(longLink): {
26
37
  const userMatch = longLink.match(/user\/(\S+?)\?/);
27
38
  result = {
28
- type: "\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E" /* DouyinDataType['用户主页视频列表数据'] */,
39
+ type: "\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E" /* DouyinDataType.用户主页视频列表数据 */,
29
40
  sec_uid: userMatch ? userMatch[1] : ''
30
41
  };
31
42
  break;
43
+ }
32
44
  default:
33
45
  break;
34
46
  }
@@ -10,19 +10,18 @@ export default async function DouyinResult(config = { cookie: '' }, options = {}
10
10
  case "\u5B98\u65B9emoji\u6570\u636E" /* DouyinDataType.官方emoji数据 */:
11
11
  case "\u52A8\u6001\u8868\u60C5\u6570\u636E" /* DouyinDataType.动态表情数据 */:
12
12
  case "\u97F3\u4E50\u6570\u636E" /* DouyinDataType.音乐数据 */:
13
- case "\u5B9E\u51B5\u56FE\u7247\u56FE\u96C6\u6570\u636E" /* DouyinDataType.实况图片图集数据 */:
14
13
  result = await new DouyinData(config.type, config.cookie).GetData(options);
15
14
  break;
15
+ case "\u5B9E\u51B5\u56FE\u7247\u56FE\u96C6\u6570\u636E" /* DouyinDataType.实况图片图集数据 */:
16
16
  case "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E" /* DouyinDataType.单个视频作品数据 */:
17
17
  case "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" /* DouyinDataType.图集作品数据 */:
18
18
  case "\u8BC4\u8BBA\u6570\u636E" /* DouyinDataType.评论数据 */: {
19
19
  const hasaweme_id = options.aweme_id || null;
20
20
  if (hasaweme_id) {
21
- result = await new DouyinData(config.type, config.cookie).GetData({ aweme_id: options.aweme_id });
21
+ result = await new DouyinData(config.type, config.cookie).GetData({ aweme_id: options.aweme_id, number: options.number });
22
22
  }
23
23
  else {
24
- const defurl = options.url?.toString().match(/(http|https):\/\/.*\.(douyin|iesdouyin)\.com\/[^ ]+/g);
25
- const iddata = await GetDouyinID(String(defurl));
24
+ const iddata = await GetDouyinID(String(options.url));
26
25
  result = await new DouyinData(config.type, config.cookie).GetData(iddata);
27
26
  }
28
27
  break;
@@ -24,5 +24,9 @@ export default class Networks {
24
24
  getLocation(): Promise<string>;
25
25
  /** 获取数据并处理数据的格式化,默认json */
26
26
  getData(new_fetch?: string): Promise<any | boolean>;
27
+ getHeadersAndData(): Promise<{
28
+ headers: any;
29
+ data: any;
30
+ }>;
27
31
  }
28
32
  export {}
@@ -24,7 +24,8 @@ export default class Networks {
24
24
  // 创建axios实例
25
25
  this.axiosInstance = axios.create({
26
26
  timeout: this.timeout,
27
- headers: this.headers
27
+ headers: this.headers,
28
+ maxRedirects: 5
28
29
  })
29
30
  }
30
31
  get config () {
@@ -58,8 +59,11 @@ export default class Networks {
58
59
  /** 最终地址(跟随重定向) */
59
60
  async getLongLink () {
60
61
  try {
61
- const result = await this.returnResult()
62
- return result.request.res.responseUrl // axios中获取最终的请求URL
62
+ const response = await this.axiosInstance({
63
+ method: 'GET',
64
+ url: this.url
65
+ })
66
+ return response.request.res.responseUrl // axios中获取最终的请求URL
63
67
  }
64
68
  catch (error) {
65
69
  if (error instanceof AxiosError) {
@@ -113,4 +117,21 @@ export default class Networks {
113
117
  return false
114
118
  }
115
119
  }
120
+ async getHeadersAndData () {
121
+ try {
122
+ // 发起网络请求获取响应对象
123
+ const result = await this.axiosInstance(this.config)
124
+ // 初始化响应头和响应数据
125
+ let headers = {}
126
+ const fetchHeaders = result.headers
127
+ for (const [ key, value ] of Object.entries(fetchHeaders)) {
128
+ headers[key] = value
129
+ }
130
+ return { headers, data: result.data }
131
+ }
132
+ catch (error) {
133
+ console.error('获取响应头和数据失败:', error)
134
+ return { headers: null, data: null }
135
+ }
136
+ }
116
137
  }
@@ -107,12 +107,36 @@ export class client {
107
107
  cookie: this.douyin
108
108
  }, { url: request.query.url }))
109
109
  })
110
+ client.get('/api/bilibili/generateqrcode', async (request, reply) => {
111
+ reply.type('application/json').send(await BilibiliResult({
112
+ type: "\u7533\u8BF7\u4E8C\u7EF4\u7801" /* BilibiliDataType.申请二维码 */,
113
+ cookie: ''
114
+ }, {}))
115
+ })
116
+ client.get('/api/bilibili/qrcodepoll', async (request, reply) => {
117
+ reply.type('application/json').send(await BilibiliResult({
118
+ type: "\u4E8C\u7EF4\u7801\u72B6\u6001" /* BilibiliDataType.二维码状态 */,
119
+ cookie: ''
120
+ }, { qrcode_key: request.query.qrcode_key }))
121
+ })
122
+ client.get('/api/bilibili/login', async (request, reply) => {
123
+ reply.type('application/json').send(await BilibiliResult({
124
+ type: "\u767B\u5F55\u57FA\u672C\u4FE1\u606F" /* BilibiliDataType.登录基本信息 */,
125
+ cookie: request.headers.cookie
126
+ }, {}))
127
+ })
110
128
  client.get('/api/bilibili/work', async (request, reply) => {
111
129
  reply.type('application/json').send(await BilibiliResult({
112
130
  type: "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E" /* BilibiliDataType.单个视频作品数据 */,
113
131
  cookie: this.bilibili
114
132
  }, { url: request.query.url }))
115
133
  })
134
+ client.get('/api/bilibili/downloadwork', async (request, reply) => {
135
+ reply.type('application/json').send(await BilibiliResult({
136
+ type: "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E" /* BilibiliDataType.单个视频下载信息数据 */,
137
+ cookie: this.bilibili
138
+ }, { avid: request.query.avid, cid: request.query.cid }))
139
+ })
116
140
  client.get('/api/bilibili/comment', async (request, reply) => {
117
141
  reply.type('application/json').send(await BilibiliResult({
118
142
  type: "\u8BC4\u8BBA\u6570\u636E" /* BilibiliDataType.评论数据 */,
@@ -13,6 +13,8 @@ type VideoStreamParams = {
13
13
  type CommentParams = {
14
14
  /** 评论区类型,type参数详见https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/comment/readme.md#评论区类型代码 */
15
15
  type?: number | string;
16
+ /** 评论区类型,type参数详见https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/comment/readme.md#评论区类型代码 */
17
+ commentstype?: number | string;
16
18
  /** 稿件ID,也就是AVID */
17
19
  oid?: number | string;
18
20
  /** 获取的评论数量,默认最高20 */
@@ -20,6 +20,7 @@ export declare const enum DouyinDataType {
20
20
  */
21
21
  export declare const enum BilibiliDataType {
22
22
  单个视频作品数据 = "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E",
23
+ 单个视频下载信息数据 = "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E",
23
24
  评论数据 = "\u8BC4\u8BBA\u6570\u636E",
24
25
  用户主页数据 = "\u7528\u6237\u4E3B\u9875\u6570\u636E",
25
26
  用户主页动态列表数据 = "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E",
@@ -29,5 +30,8 @@ export declare const enum BilibiliDataType {
29
30
  动态详情数据 = "\u52A8\u6001\u8BE6\u60C5\u6570\u636E",
30
31
  动态卡片数据 = "\u52A8\u6001\u5361\u7247\u6570\u636E",
31
32
  直播间信息 = "\u76F4\u64AD\u95F4\u4FE1\u606F",
32
- 直播间初始化信息 = "\u76F4\u64AD\u95F4\u521D\u59CB\u5316\u4FE1\u606F"
33
+ 直播间初始化信息 = "\u76F4\u64AD\u95F4\u521D\u59CB\u5316\u4FE1\u606F",
34
+ 登录基本信息 = "\u767B\u5F55\u57FA\u672C\u4FE1\u606F",
35
+ 申请二维码 = "\u7533\u8BF7\u4E8C\u7EF4\u7801",
36
+ 二维码状态 = "\u4E8C\u7EF4\u7801\u72B6\u6001"
33
37
  }
@@ -26,6 +26,10 @@ export type DouyinOptionsType = {
26
26
  * 音乐ID
27
27
  */
28
28
  music_id?: string;
29
+ /**
30
+ * 评论数量,单位条
31
+ */
32
+ number?: number;
29
33
  };
30
34
  /**
31
35
  * 接口公共查询参数
@@ -50,7 +54,7 @@ export type BilibiliOptionsType = {
50
54
  /**
51
55
  * 用户ID
52
56
  */
53
- host_mid?: string;
57
+ host_mid?: string | number;
54
58
  /**
55
59
  * 动态ID
56
60
  */
@@ -67,4 +71,24 @@ export type BilibiliOptionsType = {
67
71
  * 直播间ID
68
72
  */
69
73
  room_id?: string;
74
+ /**
75
+ * 评论数量,单位条
76
+ */
77
+ number?: number;
78
+ /**
79
+ * 用户 Cookie
80
+ */
81
+ cookie?: string;
82
+ /**
83
+ * 二维码key
84
+ */
85
+ qrcode_key?: string;
86
+ /**
87
+ * 评论区类型代码
88
+ */
89
+ commentstype?: number;
90
+ /**
91
+ * 评论区查询专属参数
92
+ */
93
+ oid?: number;
70
94
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikenxuan/amagi",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",