@ikenxuan/amagi 3.1.2 → 3.2.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.
- package/README.md +45 -34
- package/lib/business/bilibili/getdata.js +51 -26
- package/lib/business/bilibili/index.d.ts +1 -0
- package/lib/business/bilibili/index.js +2 -1
- package/lib/business/bilibili/result.js +14 -3
- package/lib/business/bilibili/sign/bv2av.d.ts +2 -0
- package/lib/business/bilibili/sign/bv2av.js +27 -0
- package/lib/business/douyin/getdata.js +12 -8
- package/lib/business/douyin/result.js +12 -3
- package/lib/business/index.d.ts +0 -1
- package/lib/business/index.js +1 -2
- package/lib/model/DataFetchers.d.ts +1 -14
- package/lib/model/DataFetchers.js +2 -18
- package/lib/model/logger.d.ts +14 -0
- package/lib/model/logger.js +13 -2
- package/lib/model/networks.js +3 -2
- package/lib/server/client.d.ts +12 -21
- package/lib/server/client.js +66 -42
- package/lib/test.js +7 -5
- package/lib/types/DataType.d.ts +3 -7
- package/lib/types/DouyinAPIParams.d.ts +4 -2
- package/lib/types/OptionsType.d.ts +0 -14
- package/lib/types/index.d.ts +3 -4
- package/lib/types/index.js +1 -1
- package/package.json +8 -6
- package/lib/business/xiaohongshu/AIP.d.ts +0 -14
- package/lib/business/xiaohongshu/AIP.js +0 -17
- package/lib/business/xiaohongshu/getdata.d.ts +0 -13
- package/lib/business/xiaohongshu/getdata.js +0 -58
- package/lib/business/xiaohongshu/index.d.ts +0 -5
- package/lib/business/xiaohongshu/index.js +0 -6
- package/lib/business/xiaohongshu/result.d.ts +0 -9
- package/lib/business/xiaohongshu/result.js +0 -19
- package/lib/business/xiaohongshu/sign/generateX_S.d.ts +0 -2
- package/lib/business/xiaohongshu/sign/generateX_S.js +0 -207
- package/lib/business/xiaohongshu/sign/generateX_S_Common.d.ts +0 -6
- package/lib/business/xiaohongshu/sign/generateX_S_Common.js +0 -141
- package/lib/business/xiaohongshu/sign/index.d.ts +0 -16
- package/lib/business/xiaohongshu/sign/index.js +0 -29
- package/lib/types/XiaohongshuAPIParams.d.ts +0 -13
- package/lib/types/XiaohongshuAPIParams.js +0 -2
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare class S {
|
|
2
|
-
x_b3_traceid(): string;
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* @param url 接口地址
|
|
6
|
-
* @param cookie 小红书用户 ck
|
|
7
|
-
* @returns
|
|
8
|
-
*/
|
|
9
|
-
x_s(url: string, cookie: string, body?: any): string;
|
|
10
|
-
x_s_common(data: {
|
|
11
|
-
x_s: string;
|
|
12
|
-
cookie: string;
|
|
13
|
-
}): string;
|
|
14
|
-
}
|
|
15
|
-
export declare const XiaohongshuSign: S;
|
|
16
|
-
export {};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { generateX_S } from './generateX_S.js';
|
|
2
|
-
// @ts-ignore
|
|
3
|
-
import { xsCommon } from './generateX_S_Common.js';
|
|
4
|
-
class S {
|
|
5
|
-
x_b3_traceid() {
|
|
6
|
-
for (var t = "", e = 0; e < 16; e++)
|
|
7
|
-
t += "abcdef0123456789".charAt(Math.floor(16 * Math.random()));
|
|
8
|
-
return t;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* @param url 接口地址
|
|
13
|
-
* @param cookie 小红书用户 ck
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
x_s(url, cookie, body) {
|
|
17
|
-
return generateX_S(url, cookie, body);
|
|
18
|
-
}
|
|
19
|
-
x_s_common(data) {
|
|
20
|
-
return xsCommon({
|
|
21
|
-
x_t: Date.now(),
|
|
22
|
-
x_s: data.x_s,
|
|
23
|
-
a1: data.cookie.includes('a1=') ? data.cookie.split('a1=')[1].split(';')[0] : 'undefined',
|
|
24
|
-
fingerprint: 'I38rHdgsjopgIvesdVwgIC+oIELmBZ5e3VwXLgFTIxS3bqwErFeexd0ekncAzMFYnqthIhJed9MDKutRI3KsYorWHPtGrbV0P9WfIi/eWc6eYqtyQApPI37ekmR1QL+5Ii6sdnoeSfqYHqwl2qt5B0DoIx+PGDi/sVtkIxdsxuwr4qtiIkrwIi/skcc3I3VvIC7sYuwXq9qtpFveDSJsSPwXIEvsiVtJOPw8BuwfPpdeTDWOIx4VIiu1ZPwbPutXIvlaLb/s3qtxIxes1VwHIkumIkIyejgsY/WTge7eSqte/D7sDcpipedeYrDtIC6eDVw2IENsSqtlnlSuNjVtIvoekqwMgbOe1eY2IESPIhhgQdIUI38PqW88IizuBVwMIvGF4B6sdcNskVwVIC7eWo7sYeSqIk5eTDmY2uwjIhJs6f0s3SgeiVt/c9deYqwCICMyL/0efPwELnOsSVwBI3T2I3kkouw+gVwesBZ/yLOsYeOeVPwyIh7sjg6exmSuIENejlOe3dhkIiJsTVt0IkLdPuwJ2qw0ICvs6qwAIiNs3uw5Ikvsdqt5wuwLoVw7IvrEIxWcGnFD4IvexPtIIhDrIi6eDVwgbmm2Ls5sjjY6IiLoJqtPmVwvIv7exVtf+ree1lJsVrMZIE0s37JskutnpPwHIvKe0qwUIi5eTAubICdeS9oeDVtlIxds6uwTG7QBIEr4IvesxMgeka/ejDesYPtQIiM7ICcDcuwzICIJI33sVzbIy7OsWqw+IhpcbuwFJWesYpKeSuwprVwZIxkAIiqynPwtqPtNIv5sSM5siPt+sVwBICEYLPt1'
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
export const XiaohongshuSign = new S();
|
|
29
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYnVzaW5lc3MveGlhb2hvbmdzaHUvc2lnbi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZUFBZSxDQUFBO0FBQzNDLGFBQWE7Q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BQU0sZUFBZSxHQUFHLElBQUksQ0FBQyxFQUFFLENBQUEifQ==
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
type NoteInfoParams = {
|
|
2
|
-
/** 笔记ID */
|
|
3
|
-
source_note_id: string;
|
|
4
|
-
/** web端的路径参数xsec_token */
|
|
5
|
-
xsec_token?: string;
|
|
6
|
-
};
|
|
7
|
-
export interface XiaohongshuDataOptionsMapKeys {
|
|
8
|
-
NoteInfoParams: NoteInfoParams;
|
|
9
|
-
}
|
|
10
|
-
export type XiaohongshuDataOptionsMap = {
|
|
11
|
-
单个笔记: NoteInfoParams;
|
|
12
|
-
};
|
|
13
|
-
export {}
|