@ikenxuan/amagi 2.1.4 → 2.1.5

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 CHANGED
@@ -56,6 +56,9 @@ pnpm build
56
56
  [GPL-3.0](https://github.com/ikenxuan/amagi/blob/main/LICENSE)
57
57
 
58
58
  ## 声明
59
+ 本库没有后门,本库不会上传有关你的任何信息到第三方。
60
+ 所配置的ck只会用于请求官方API接口
61
+
59
62
  该项目代码从 [kkkkkk-10086](https://github.com/ikenxuan/kkkkkk-10086) 提取修改并发布
60
63
 
61
64
  <h2>未经同意,禁止将本项目的开源代码用于任何商业目的。因使用本项目产生的一切问题与后果由使用者自行承担,项目开发者不承担任何责任</h2>
@@ -8,7 +8,7 @@ export default class BilibiliData {
8
8
  this.type = type;
9
9
  this.headers = {};
10
10
  this.headers.Referer = 'https://api.bilibili.com/';
11
- this.headers.Cookie = cookie.replace(/\s+/g, '');
11
+ this.headers.Cookie = cookie ? cookie.replace(/\s+/g, '') : '';
12
12
  this.headers['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36 Edg/127.0.0.0';
13
13
  }
14
14
  async GetData(data = {}) {
@@ -8,7 +8,7 @@ export default class DouyinData {
8
8
  this.type = type;
9
9
  this.headers = {
10
10
  Referer: 'https://www.douyin.com/',
11
- Cookie: cookie.replace(/\s+/g, ''),
11
+ Cookie: cookie ? cookie.replace(/\s+/g, '') : '',
12
12
  Accept: '*/*',
13
13
  'Content-Type': 'application/json',
14
14
  'accept-language': 'zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikenxuan/amagi",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",