@ikenxuan/amagi 5.3.0 → 5.4.0
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/dist/default/cjs/index.cjs +174 -6
- package/dist/default/esm/index.mjs +174 -7
- package/dist/default/index.d.ts +176 -20
- package/package.json +2 -2
|
@@ -44,6 +44,11 @@ var getPackageLogsPath = () => {
|
|
|
44
44
|
return path__default.default.join(packageRoot, "logs");
|
|
45
45
|
};
|
|
46
46
|
var logsPath = getPackageLogsPath();
|
|
47
|
+
var getLogLevel = () => {
|
|
48
|
+
const logLevel = process.env.LOG_LEVEL || "info";
|
|
49
|
+
return logLevel;
|
|
50
|
+
};
|
|
51
|
+
var currentLogLevel = getLogLevel();
|
|
47
52
|
log4js__default.default.configure({
|
|
48
53
|
appenders: {
|
|
49
54
|
console: {
|
|
@@ -84,7 +89,7 @@ log4js__default.default.configure({
|
|
|
84
89
|
}
|
|
85
90
|
},
|
|
86
91
|
categories: {
|
|
87
|
-
default: { appenders: ["console", "command"], level:
|
|
92
|
+
default: { appenders: ["console", "command"], level: currentLogLevel },
|
|
88
93
|
http: { appenders: ["httpConsole", "httpRequest"], level: "debug" }
|
|
89
94
|
},
|
|
90
95
|
pm2: true
|
|
@@ -1741,6 +1746,43 @@ var DouyinAPI = class {
|
|
|
1741
1746
|
};
|
|
1742
1747
|
return `${baseUrl}?${buildQueryString(params)}`;
|
|
1743
1748
|
}
|
|
1749
|
+
/**
|
|
1750
|
+
* 获取弹幕数据的接口地址
|
|
1751
|
+
* @param data - 请求参数,包含group_id、item_id等
|
|
1752
|
+
* @returns 完整的接口URL
|
|
1753
|
+
*/
|
|
1754
|
+
\u5F39\u5E55(data2) {
|
|
1755
|
+
const baseUrl = "https://www-hj.douyin.com/aweme/v1/web/danmaku/get_v2/";
|
|
1756
|
+
const params = {
|
|
1757
|
+
...this.getBaseParams(),
|
|
1758
|
+
app_name: "aweme",
|
|
1759
|
+
format: "json",
|
|
1760
|
+
group_id: data2.aweme_id,
|
|
1761
|
+
item_id: data2.aweme_id,
|
|
1762
|
+
start_time: data2.start_time ?? "0",
|
|
1763
|
+
end_time: data2.end_time ?? "32000",
|
|
1764
|
+
duration: data2.duration,
|
|
1765
|
+
update_version_code: "170400",
|
|
1766
|
+
pc_libra_divert: "Windows",
|
|
1767
|
+
support_h265: "1",
|
|
1768
|
+
support_dash: "1",
|
|
1769
|
+
version_code: "170400",
|
|
1770
|
+
version_name: "17.4.0",
|
|
1771
|
+
screen_width: "2328",
|
|
1772
|
+
screen_height: "1310",
|
|
1773
|
+
browser_name: "Edge",
|
|
1774
|
+
browser_version: "140.0.0.0",
|
|
1775
|
+
engine_name: "Blink",
|
|
1776
|
+
engine_version: "140.0.0.0",
|
|
1777
|
+
downlink: "1.55",
|
|
1778
|
+
round_trip_time: "200",
|
|
1779
|
+
webid: "7487210762873685515",
|
|
1780
|
+
msToken: douyinSign.Mstoken(116),
|
|
1781
|
+
verifyFp: fp,
|
|
1782
|
+
fp
|
|
1783
|
+
};
|
|
1784
|
+
return `${baseUrl}?${buildQueryString(params)}`;
|
|
1785
|
+
}
|
|
1744
1786
|
};
|
|
1745
1787
|
var createDouyinApiUrls = (userAgent) => {
|
|
1746
1788
|
return new DouyinAPI(userAgent);
|
|
@@ -1988,6 +2030,84 @@ var DouyinData = async (data2, cookie, requestConfig) => {
|
|
|
1988
2030
|
});
|
|
1989
2031
|
return LoginQrcodeStatusData;
|
|
1990
2032
|
}
|
|
2033
|
+
case "\u5F39\u5E55\u6570\u636E": {
|
|
2034
|
+
const MAX_SEGMENT_DURATION = 32e3;
|
|
2035
|
+
const startTime = data2.start_time ?? 0;
|
|
2036
|
+
const endTime = data2.end_time ?? data2.duration;
|
|
2037
|
+
const totalDuration = endTime - startTime;
|
|
2038
|
+
if (totalDuration <= MAX_SEGMENT_DURATION) {
|
|
2039
|
+
const url = douyinApiUrls3.\u5F39\u5E55({
|
|
2040
|
+
aweme_id: data2.aweme_id,
|
|
2041
|
+
start_time: startTime,
|
|
2042
|
+
end_time: endTime,
|
|
2043
|
+
duration: data2.duration
|
|
2044
|
+
});
|
|
2045
|
+
const DanmakuData = await GlobalGetData2(data2.methodType, {
|
|
2046
|
+
...baseRequestConfig,
|
|
2047
|
+
url: `${url}&a_bogus=${douyinSign.AB(url, userAgent)}`
|
|
2048
|
+
});
|
|
2049
|
+
return DanmakuData;
|
|
2050
|
+
}
|
|
2051
|
+
const segments = [];
|
|
2052
|
+
let currentStart = startTime;
|
|
2053
|
+
while (currentStart < endTime) {
|
|
2054
|
+
const currentEnd = Math.min(currentStart + MAX_SEGMENT_DURATION, endTime);
|
|
2055
|
+
segments.push({ start: currentStart, end: currentEnd });
|
|
2056
|
+
currentStart = currentEnd;
|
|
2057
|
+
}
|
|
2058
|
+
logger.debug(`\u5F39\u5E55\u6570\u636E\u9700\u8981\u5206${segments.length}\u6BB5\u83B7\u53D6\uFF0C\u603B\u65F6\u957F\uFF1A${totalDuration}ms`);
|
|
2059
|
+
const segmentPromises = segments.map(async (segment, index) => {
|
|
2060
|
+
const url = douyinApiUrls3.\u5F39\u5E55({
|
|
2061
|
+
aweme_id: data2.aweme_id,
|
|
2062
|
+
start_time: segment.start,
|
|
2063
|
+
end_time: segment.end,
|
|
2064
|
+
duration: data2.duration
|
|
2065
|
+
});
|
|
2066
|
+
try {
|
|
2067
|
+
const segmentData = await GlobalGetData2(`${data2.methodType}-\u6BB5${index + 1}`, {
|
|
2068
|
+
...baseRequestConfig,
|
|
2069
|
+
url: `${url}&a_bogus=${douyinSign.AB(url, userAgent)}`
|
|
2070
|
+
});
|
|
2071
|
+
logger.debug(`\u5F39\u5E55\u7B2C${index + 1}\u6BB5\u83B7\u53D6\u6210\u529F (${segment.start}ms-${segment.end}ms)`);
|
|
2072
|
+
return segmentData;
|
|
2073
|
+
} catch (error) {
|
|
2074
|
+
logger.debug(`\u5F39\u5E55\u7B2C${index + 1}\u6BB5\u83B7\u53D6\u5931\u8D25 (${segment.start}ms-${segment.end}ms):`, error);
|
|
2075
|
+
return null;
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
const segmentResults = await Promise.all(segmentPromises);
|
|
2079
|
+
const mergedDanmakuList = [];
|
|
2080
|
+
let totalCount = 0;
|
|
2081
|
+
let finalStartTime = startTime;
|
|
2082
|
+
let finalEndTime = endTime;
|
|
2083
|
+
let finalExtra = null;
|
|
2084
|
+
let finalLogPb = null;
|
|
2085
|
+
let finalStatusCode = 0;
|
|
2086
|
+
segmentResults.forEach((segmentData, index) => {
|
|
2087
|
+
if (segmentData && segmentData.danmaku_list) {
|
|
2088
|
+
mergedDanmakuList.push(...segmentData.danmaku_list);
|
|
2089
|
+
totalCount += segmentData.total || 0;
|
|
2090
|
+
if (index === 0) {
|
|
2091
|
+
finalExtra = segmentData.extra;
|
|
2092
|
+
finalLogPb = segmentData.log_pb;
|
|
2093
|
+
finalStatusCode = segmentData.status_code;
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
});
|
|
2097
|
+
mergedDanmakuList.sort((a, b) => (a.offset_time || 0) - (b.offset_time || 0));
|
|
2098
|
+
const finalDanmakuData = {
|
|
2099
|
+
danmaku_list: mergedDanmakuList,
|
|
2100
|
+
start_time: finalStartTime,
|
|
2101
|
+
end_time: finalEndTime,
|
|
2102
|
+
total: mergedDanmakuList.length,
|
|
2103
|
+
// 使用实际合并后的数量
|
|
2104
|
+
status_code: finalStatusCode,
|
|
2105
|
+
extra: finalExtra,
|
|
2106
|
+
log_pb: finalLogPb
|
|
2107
|
+
};
|
|
2108
|
+
logger.debug(`\u5F39\u5E55\u6570\u636E\u5408\u5E76\u5B8C\u6210\uFF0C\u5171\u83B7\u53D6${mergedDanmakuList.length}\u6761\u5F39\u5E55`);
|
|
2109
|
+
return finalDanmakuData;
|
|
2110
|
+
}
|
|
1991
2111
|
default: {
|
|
1992
2112
|
logger.warn(`\u672A\u77E5\u7684\u6296\u97F3\u6570\u636E\u63A5\u53E3\uFF1A\u300C${logger.red(data2.methodType)}\u300D`);
|
|
1993
2113
|
return null;
|
|
@@ -2274,6 +2394,35 @@ var DouyinEmojiListParamsSchema = zod.z.object({
|
|
|
2274
2394
|
var DouyinEmojiProParamsSchema = zod.z.object({
|
|
2275
2395
|
methodType: zod.z.literal("\u52A8\u6001\u8868\u60C5\u6570\u636E")
|
|
2276
2396
|
});
|
|
2397
|
+
var DouyinDanmakuParamsSchema = zod.z.object({
|
|
2398
|
+
methodType: zod.z.literal("\u5F39\u5E55\u6570\u636E"),
|
|
2399
|
+
aweme_id: zod.z.string({ required_error: "\u89C6\u9891ID\u4E0D\u80FD\u4E3A\u7A7A" }).min(1, "\u89C6\u9891ID\u4E0D\u80FD\u4E3A\u7A7A"),
|
|
2400
|
+
start_time: zod.z.coerce.number().int().min(0).optional(),
|
|
2401
|
+
end_time: zod.z.coerce.number().int().min(0).optional(),
|
|
2402
|
+
duration: zod.z.coerce.number().int().min(0)
|
|
2403
|
+
}).refine(
|
|
2404
|
+
(data2) => {
|
|
2405
|
+
if (data2.end_time !== void 0) {
|
|
2406
|
+
return data2.end_time <= data2.duration;
|
|
2407
|
+
}
|
|
2408
|
+
return true;
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
message: "\u83B7\u53D6\u5F39\u5E55\u533A\u95F4\u7684\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u8D85\u8FC7\u89C6\u9891\u603B\u65F6\u957F",
|
|
2412
|
+
path: ["end_time"]
|
|
2413
|
+
}
|
|
2414
|
+
).refine(
|
|
2415
|
+
(data2) => {
|
|
2416
|
+
if (data2.start_time !== void 0 && data2.end_time !== void 0) {
|
|
2417
|
+
return data2.start_time < data2.end_time;
|
|
2418
|
+
}
|
|
2419
|
+
return true;
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
message: "\u83B7\u53D6\u5F39\u5E55\u533A\u95F4\u7684\u5F00\u59CB\u65F6\u95F4\u5FC5\u987B\u5C0F\u4E8E\u7ED3\u675F\u65F6\u95F4",
|
|
2423
|
+
path: ["start_time"]
|
|
2424
|
+
}
|
|
2425
|
+
);
|
|
2277
2426
|
var DouyinValidationSchemas2 = {
|
|
2278
2427
|
"\u6587\u5B57\u4F5C\u54C1\u6570\u636E": DouyinWorkParamsSchema,
|
|
2279
2428
|
"\u805A\u5408\u89E3\u6790": DouyinWorkParamsSchema,
|
|
@@ -2290,7 +2439,8 @@ var DouyinValidationSchemas2 = {
|
|
|
2290
2439
|
"\u7533\u8BF7\u4E8C\u7EF4\u7801\u6570\u636E": DouyinQrcodeParamsSchema,
|
|
2291
2440
|
"Emoji\u6570\u636E": DouyinEmojiListParamsSchema,
|
|
2292
2441
|
"\u52A8\u6001\u8868\u60C5\u6570\u636E": DouyinEmojiProParamsSchema,
|
|
2293
|
-
"\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E": DouyinCommentReplyParamsSchema
|
|
2442
|
+
"\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E": DouyinCommentReplyParamsSchema,
|
|
2443
|
+
"\u5F39\u5E55\u6570\u636E": DouyinDanmakuParamsSchema
|
|
2294
2444
|
};
|
|
2295
2445
|
var BilibiliVideoParamsSchema = zod.z.object({
|
|
2296
2446
|
methodType: zod.z.literal("\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E"),
|
|
@@ -2459,8 +2609,8 @@ async function getDouyinData(methodType, optionsOrCookie, cookieOrOptions, reque
|
|
|
2459
2609
|
...validatedParams
|
|
2460
2610
|
};
|
|
2461
2611
|
const rawData = await DouyinData(apiParams, cookie, config);
|
|
2462
|
-
if (rawData.data === "") {
|
|
2463
|
-
return createErrorResponse(rawData.amagiError, "\u6296\u97F3\u6570\u636E\u83B7\u53D6\u5931\u8D25");
|
|
2612
|
+
if (rawData.data === "" || rawData.status_code !== 0) {
|
|
2613
|
+
return createErrorResponse(rawData.amagiError, rawData.status_msg || "\u6296\u97F3\u6570\u636E\u83B7\u53D6\u5931\u8D25");
|
|
2464
2614
|
}
|
|
2465
2615
|
return createSuccessResponse(rawData, "\u83B7\u53D6\u6210\u529F", 200);
|
|
2466
2616
|
} catch (error) {
|
|
@@ -3105,7 +3255,13 @@ var douyin = {
|
|
|
3105
3255
|
* @param cookie 有效的用户 Cookie
|
|
3106
3256
|
* @returns 统一格式的API响应,包含直播间详细信息
|
|
3107
3257
|
*/
|
|
3108
|
-
getLiveRoomInfo: createDouyinApiMethod("\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E")
|
|
3258
|
+
getLiveRoomInfo: createDouyinApiMethod("\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E"),
|
|
3259
|
+
/**
|
|
3260
|
+
* 获取弹幕数据
|
|
3261
|
+
* @param options 请求参数,包含 aweme_id, 可选的 start_time, end_time, duration 和 typeMode
|
|
3262
|
+
* @returns 统一格式的API响应,包含弹幕数据
|
|
3263
|
+
*/
|
|
3264
|
+
getDanmaku: createDouyinApiMethod("\u5F39\u5E55\u6570\u636E")
|
|
3109
3265
|
};
|
|
3110
3266
|
var createBoundDouyinApi = (cookie, requestConfig) => {
|
|
3111
3267
|
return {
|
|
@@ -3198,7 +3354,13 @@ var createBoundDouyinApi = (cookie, requestConfig) => {
|
|
|
3198
3354
|
* @param options 请求参数,包含 sec_uid 和可选的 typeMode
|
|
3199
3355
|
* @returns 统一格式的API响应,包含直播间详细信息
|
|
3200
3356
|
*/
|
|
3201
|
-
getLiveRoomInfo: createBoundDouyinApiMethod("\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E", cookie, requestConfig)
|
|
3357
|
+
getLiveRoomInfo: createBoundDouyinApiMethod("\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E", cookie, requestConfig),
|
|
3358
|
+
/**
|
|
3359
|
+
* 获取弹幕数据
|
|
3360
|
+
* @param options 请求参数,包含 aweme_id, 可选的 start_time, end_time, duration 和 typeMode
|
|
3361
|
+
* @returns 统一格式的API响应,包含弹幕数据
|
|
3362
|
+
*/
|
|
3363
|
+
getDanmaku: createBoundDouyinApiMethod("\u5F39\u5E55\u6570\u636E", cookie, requestConfig)
|
|
3202
3364
|
};
|
|
3203
3365
|
};
|
|
3204
3366
|
var createDouyinRouteHandler = (dataFetcher, methodType, cookie, requestConfig = getDouyinDefaultConfig(cookie)) => {
|
|
@@ -3290,6 +3452,11 @@ var createDouyinRoutes = (cookie, requestConfig = getDouyinDefaultConfig(cookie)
|
|
|
3290
3452
|
createDouyinValidationMiddleware("\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E"),
|
|
3291
3453
|
createDouyinRouteHandler(getDouyinData, "\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E", cookie, requestConfig)
|
|
3292
3454
|
);
|
|
3455
|
+
router.get(
|
|
3456
|
+
"/fetch_work_danmaku",
|
|
3457
|
+
createDouyinValidationMiddleware("\u5F39\u5E55\u6570\u636E"),
|
|
3458
|
+
createDouyinRouteHandler(getDouyinData, "\u5F39\u5E55\u6570\u636E", cookie, requestConfig)
|
|
3459
|
+
);
|
|
3293
3460
|
return router;
|
|
3294
3461
|
};
|
|
3295
3462
|
|
|
@@ -3543,6 +3710,7 @@ exports.BilibiliVideoParamsSchema = BilibiliVideoParamsSchema;
|
|
|
3543
3710
|
exports.CreateApp = CreateApp;
|
|
3544
3711
|
exports.DouyinCommentParamsSchema = DouyinCommentParamsSchema;
|
|
3545
3712
|
exports.DouyinCommentReplyParamsSchema = DouyinCommentReplyParamsSchema;
|
|
3713
|
+
exports.DouyinDanmakuParamsSchema = DouyinDanmakuParamsSchema;
|
|
3546
3714
|
exports.DouyinEmojiListParamsSchema = DouyinEmojiListParamsSchema;
|
|
3547
3715
|
exports.DouyinEmojiProParamsSchema = DouyinEmojiProParamsSchema;
|
|
3548
3716
|
exports.DouyinMusicParamsSchema = DouyinMusicParamsSchema;
|
|
@@ -28,6 +28,11 @@ var getPackageLogsPath = () => {
|
|
|
28
28
|
return path.join(packageRoot, "logs");
|
|
29
29
|
};
|
|
30
30
|
var logsPath = getPackageLogsPath();
|
|
31
|
+
var getLogLevel = () => {
|
|
32
|
+
const logLevel = process.env.LOG_LEVEL || "info";
|
|
33
|
+
return logLevel;
|
|
34
|
+
};
|
|
35
|
+
var currentLogLevel = getLogLevel();
|
|
31
36
|
log4js.configure({
|
|
32
37
|
appenders: {
|
|
33
38
|
console: {
|
|
@@ -68,7 +73,7 @@ log4js.configure({
|
|
|
68
73
|
}
|
|
69
74
|
},
|
|
70
75
|
categories: {
|
|
71
|
-
default: { appenders: ["console", "command"], level:
|
|
76
|
+
default: { appenders: ["console", "command"], level: currentLogLevel },
|
|
72
77
|
http: { appenders: ["httpConsole", "httpRequest"], level: "debug" }
|
|
73
78
|
},
|
|
74
79
|
pm2: true
|
|
@@ -1725,6 +1730,43 @@ var DouyinAPI = class {
|
|
|
1725
1730
|
};
|
|
1726
1731
|
return `${baseUrl}?${buildQueryString(params)}`;
|
|
1727
1732
|
}
|
|
1733
|
+
/**
|
|
1734
|
+
* 获取弹幕数据的接口地址
|
|
1735
|
+
* @param data - 请求参数,包含group_id、item_id等
|
|
1736
|
+
* @returns 完整的接口URL
|
|
1737
|
+
*/
|
|
1738
|
+
\u5F39\u5E55(data2) {
|
|
1739
|
+
const baseUrl = "https://www-hj.douyin.com/aweme/v1/web/danmaku/get_v2/";
|
|
1740
|
+
const params = {
|
|
1741
|
+
...this.getBaseParams(),
|
|
1742
|
+
app_name: "aweme",
|
|
1743
|
+
format: "json",
|
|
1744
|
+
group_id: data2.aweme_id,
|
|
1745
|
+
item_id: data2.aweme_id,
|
|
1746
|
+
start_time: data2.start_time ?? "0",
|
|
1747
|
+
end_time: data2.end_time ?? "32000",
|
|
1748
|
+
duration: data2.duration,
|
|
1749
|
+
update_version_code: "170400",
|
|
1750
|
+
pc_libra_divert: "Windows",
|
|
1751
|
+
support_h265: "1",
|
|
1752
|
+
support_dash: "1",
|
|
1753
|
+
version_code: "170400",
|
|
1754
|
+
version_name: "17.4.0",
|
|
1755
|
+
screen_width: "2328",
|
|
1756
|
+
screen_height: "1310",
|
|
1757
|
+
browser_name: "Edge",
|
|
1758
|
+
browser_version: "140.0.0.0",
|
|
1759
|
+
engine_name: "Blink",
|
|
1760
|
+
engine_version: "140.0.0.0",
|
|
1761
|
+
downlink: "1.55",
|
|
1762
|
+
round_trip_time: "200",
|
|
1763
|
+
webid: "7487210762873685515",
|
|
1764
|
+
msToken: douyinSign.Mstoken(116),
|
|
1765
|
+
verifyFp: fp,
|
|
1766
|
+
fp
|
|
1767
|
+
};
|
|
1768
|
+
return `${baseUrl}?${buildQueryString(params)}`;
|
|
1769
|
+
}
|
|
1728
1770
|
};
|
|
1729
1771
|
var createDouyinApiUrls = (userAgent) => {
|
|
1730
1772
|
return new DouyinAPI(userAgent);
|
|
@@ -1972,6 +2014,84 @@ var DouyinData = async (data2, cookie, requestConfig) => {
|
|
|
1972
2014
|
});
|
|
1973
2015
|
return LoginQrcodeStatusData;
|
|
1974
2016
|
}
|
|
2017
|
+
case "\u5F39\u5E55\u6570\u636E": {
|
|
2018
|
+
const MAX_SEGMENT_DURATION = 32e3;
|
|
2019
|
+
const startTime = data2.start_time ?? 0;
|
|
2020
|
+
const endTime = data2.end_time ?? data2.duration;
|
|
2021
|
+
const totalDuration = endTime - startTime;
|
|
2022
|
+
if (totalDuration <= MAX_SEGMENT_DURATION) {
|
|
2023
|
+
const url = douyinApiUrls3.\u5F39\u5E55({
|
|
2024
|
+
aweme_id: data2.aweme_id,
|
|
2025
|
+
start_time: startTime,
|
|
2026
|
+
end_time: endTime,
|
|
2027
|
+
duration: data2.duration
|
|
2028
|
+
});
|
|
2029
|
+
const DanmakuData = await GlobalGetData2(data2.methodType, {
|
|
2030
|
+
...baseRequestConfig,
|
|
2031
|
+
url: `${url}&a_bogus=${douyinSign.AB(url, userAgent)}`
|
|
2032
|
+
});
|
|
2033
|
+
return DanmakuData;
|
|
2034
|
+
}
|
|
2035
|
+
const segments = [];
|
|
2036
|
+
let currentStart = startTime;
|
|
2037
|
+
while (currentStart < endTime) {
|
|
2038
|
+
const currentEnd = Math.min(currentStart + MAX_SEGMENT_DURATION, endTime);
|
|
2039
|
+
segments.push({ start: currentStart, end: currentEnd });
|
|
2040
|
+
currentStart = currentEnd;
|
|
2041
|
+
}
|
|
2042
|
+
logger.debug(`\u5F39\u5E55\u6570\u636E\u9700\u8981\u5206${segments.length}\u6BB5\u83B7\u53D6\uFF0C\u603B\u65F6\u957F\uFF1A${totalDuration}ms`);
|
|
2043
|
+
const segmentPromises = segments.map(async (segment, index) => {
|
|
2044
|
+
const url = douyinApiUrls3.\u5F39\u5E55({
|
|
2045
|
+
aweme_id: data2.aweme_id,
|
|
2046
|
+
start_time: segment.start,
|
|
2047
|
+
end_time: segment.end,
|
|
2048
|
+
duration: data2.duration
|
|
2049
|
+
});
|
|
2050
|
+
try {
|
|
2051
|
+
const segmentData = await GlobalGetData2(`${data2.methodType}-\u6BB5${index + 1}`, {
|
|
2052
|
+
...baseRequestConfig,
|
|
2053
|
+
url: `${url}&a_bogus=${douyinSign.AB(url, userAgent)}`
|
|
2054
|
+
});
|
|
2055
|
+
logger.debug(`\u5F39\u5E55\u7B2C${index + 1}\u6BB5\u83B7\u53D6\u6210\u529F (${segment.start}ms-${segment.end}ms)`);
|
|
2056
|
+
return segmentData;
|
|
2057
|
+
} catch (error) {
|
|
2058
|
+
logger.debug(`\u5F39\u5E55\u7B2C${index + 1}\u6BB5\u83B7\u53D6\u5931\u8D25 (${segment.start}ms-${segment.end}ms):`, error);
|
|
2059
|
+
return null;
|
|
2060
|
+
}
|
|
2061
|
+
});
|
|
2062
|
+
const segmentResults = await Promise.all(segmentPromises);
|
|
2063
|
+
const mergedDanmakuList = [];
|
|
2064
|
+
let totalCount = 0;
|
|
2065
|
+
let finalStartTime = startTime;
|
|
2066
|
+
let finalEndTime = endTime;
|
|
2067
|
+
let finalExtra = null;
|
|
2068
|
+
let finalLogPb = null;
|
|
2069
|
+
let finalStatusCode = 0;
|
|
2070
|
+
segmentResults.forEach((segmentData, index) => {
|
|
2071
|
+
if (segmentData && segmentData.danmaku_list) {
|
|
2072
|
+
mergedDanmakuList.push(...segmentData.danmaku_list);
|
|
2073
|
+
totalCount += segmentData.total || 0;
|
|
2074
|
+
if (index === 0) {
|
|
2075
|
+
finalExtra = segmentData.extra;
|
|
2076
|
+
finalLogPb = segmentData.log_pb;
|
|
2077
|
+
finalStatusCode = segmentData.status_code;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
});
|
|
2081
|
+
mergedDanmakuList.sort((a, b) => (a.offset_time || 0) - (b.offset_time || 0));
|
|
2082
|
+
const finalDanmakuData = {
|
|
2083
|
+
danmaku_list: mergedDanmakuList,
|
|
2084
|
+
start_time: finalStartTime,
|
|
2085
|
+
end_time: finalEndTime,
|
|
2086
|
+
total: mergedDanmakuList.length,
|
|
2087
|
+
// 使用实际合并后的数量
|
|
2088
|
+
status_code: finalStatusCode,
|
|
2089
|
+
extra: finalExtra,
|
|
2090
|
+
log_pb: finalLogPb
|
|
2091
|
+
};
|
|
2092
|
+
logger.debug(`\u5F39\u5E55\u6570\u636E\u5408\u5E76\u5B8C\u6210\uFF0C\u5171\u83B7\u53D6${mergedDanmakuList.length}\u6761\u5F39\u5E55`);
|
|
2093
|
+
return finalDanmakuData;
|
|
2094
|
+
}
|
|
1975
2095
|
default: {
|
|
1976
2096
|
logger.warn(`\u672A\u77E5\u7684\u6296\u97F3\u6570\u636E\u63A5\u53E3\uFF1A\u300C${logger.red(data2.methodType)}\u300D`);
|
|
1977
2097
|
return null;
|
|
@@ -2258,6 +2378,35 @@ var DouyinEmojiListParamsSchema = z.object({
|
|
|
2258
2378
|
var DouyinEmojiProParamsSchema = z.object({
|
|
2259
2379
|
methodType: z.literal("\u52A8\u6001\u8868\u60C5\u6570\u636E")
|
|
2260
2380
|
});
|
|
2381
|
+
var DouyinDanmakuParamsSchema = z.object({
|
|
2382
|
+
methodType: z.literal("\u5F39\u5E55\u6570\u636E"),
|
|
2383
|
+
aweme_id: z.string({ required_error: "\u89C6\u9891ID\u4E0D\u80FD\u4E3A\u7A7A" }).min(1, "\u89C6\u9891ID\u4E0D\u80FD\u4E3A\u7A7A"),
|
|
2384
|
+
start_time: z.coerce.number().int().min(0).optional(),
|
|
2385
|
+
end_time: z.coerce.number().int().min(0).optional(),
|
|
2386
|
+
duration: z.coerce.number().int().min(0)
|
|
2387
|
+
}).refine(
|
|
2388
|
+
(data2) => {
|
|
2389
|
+
if (data2.end_time !== void 0) {
|
|
2390
|
+
return data2.end_time <= data2.duration;
|
|
2391
|
+
}
|
|
2392
|
+
return true;
|
|
2393
|
+
},
|
|
2394
|
+
{
|
|
2395
|
+
message: "\u83B7\u53D6\u5F39\u5E55\u533A\u95F4\u7684\u7ED3\u675F\u65F6\u95F4\u4E0D\u80FD\u8D85\u8FC7\u89C6\u9891\u603B\u65F6\u957F",
|
|
2396
|
+
path: ["end_time"]
|
|
2397
|
+
}
|
|
2398
|
+
).refine(
|
|
2399
|
+
(data2) => {
|
|
2400
|
+
if (data2.start_time !== void 0 && data2.end_time !== void 0) {
|
|
2401
|
+
return data2.start_time < data2.end_time;
|
|
2402
|
+
}
|
|
2403
|
+
return true;
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
message: "\u83B7\u53D6\u5F39\u5E55\u533A\u95F4\u7684\u5F00\u59CB\u65F6\u95F4\u5FC5\u987B\u5C0F\u4E8E\u7ED3\u675F\u65F6\u95F4",
|
|
2407
|
+
path: ["start_time"]
|
|
2408
|
+
}
|
|
2409
|
+
);
|
|
2261
2410
|
var DouyinValidationSchemas2 = {
|
|
2262
2411
|
"\u6587\u5B57\u4F5C\u54C1\u6570\u636E": DouyinWorkParamsSchema,
|
|
2263
2412
|
"\u805A\u5408\u89E3\u6790": DouyinWorkParamsSchema,
|
|
@@ -2274,7 +2423,8 @@ var DouyinValidationSchemas2 = {
|
|
|
2274
2423
|
"\u7533\u8BF7\u4E8C\u7EF4\u7801\u6570\u636E": DouyinQrcodeParamsSchema,
|
|
2275
2424
|
"Emoji\u6570\u636E": DouyinEmojiListParamsSchema,
|
|
2276
2425
|
"\u52A8\u6001\u8868\u60C5\u6570\u636E": DouyinEmojiProParamsSchema,
|
|
2277
|
-
"\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E": DouyinCommentReplyParamsSchema
|
|
2426
|
+
"\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E": DouyinCommentReplyParamsSchema,
|
|
2427
|
+
"\u5F39\u5E55\u6570\u636E": DouyinDanmakuParamsSchema
|
|
2278
2428
|
};
|
|
2279
2429
|
var BilibiliVideoParamsSchema = z.object({
|
|
2280
2430
|
methodType: z.literal("\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E"),
|
|
@@ -2443,8 +2593,8 @@ async function getDouyinData(methodType, optionsOrCookie, cookieOrOptions, reque
|
|
|
2443
2593
|
...validatedParams
|
|
2444
2594
|
};
|
|
2445
2595
|
const rawData = await DouyinData(apiParams, cookie, config);
|
|
2446
|
-
if (rawData.data === "") {
|
|
2447
|
-
return createErrorResponse(rawData.amagiError, "\u6296\u97F3\u6570\u636E\u83B7\u53D6\u5931\u8D25");
|
|
2596
|
+
if (rawData.data === "" || rawData.status_code !== 0) {
|
|
2597
|
+
return createErrorResponse(rawData.amagiError, rawData.status_msg || "\u6296\u97F3\u6570\u636E\u83B7\u53D6\u5931\u8D25");
|
|
2448
2598
|
}
|
|
2449
2599
|
return createSuccessResponse(rawData, "\u83B7\u53D6\u6210\u529F", 200);
|
|
2450
2600
|
} catch (error) {
|
|
@@ -3089,7 +3239,13 @@ var douyin = {
|
|
|
3089
3239
|
* @param cookie 有效的用户 Cookie
|
|
3090
3240
|
* @returns 统一格式的API响应,包含直播间详细信息
|
|
3091
3241
|
*/
|
|
3092
|
-
getLiveRoomInfo: createDouyinApiMethod("\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E")
|
|
3242
|
+
getLiveRoomInfo: createDouyinApiMethod("\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E"),
|
|
3243
|
+
/**
|
|
3244
|
+
* 获取弹幕数据
|
|
3245
|
+
* @param options 请求参数,包含 aweme_id, 可选的 start_time, end_time, duration 和 typeMode
|
|
3246
|
+
* @returns 统一格式的API响应,包含弹幕数据
|
|
3247
|
+
*/
|
|
3248
|
+
getDanmaku: createDouyinApiMethod("\u5F39\u5E55\u6570\u636E")
|
|
3093
3249
|
};
|
|
3094
3250
|
var createBoundDouyinApi = (cookie, requestConfig) => {
|
|
3095
3251
|
return {
|
|
@@ -3182,7 +3338,13 @@ var createBoundDouyinApi = (cookie, requestConfig) => {
|
|
|
3182
3338
|
* @param options 请求参数,包含 sec_uid 和可选的 typeMode
|
|
3183
3339
|
* @returns 统一格式的API响应,包含直播间详细信息
|
|
3184
3340
|
*/
|
|
3185
|
-
getLiveRoomInfo: createBoundDouyinApiMethod("\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E", cookie, requestConfig)
|
|
3341
|
+
getLiveRoomInfo: createBoundDouyinApiMethod("\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E", cookie, requestConfig),
|
|
3342
|
+
/**
|
|
3343
|
+
* 获取弹幕数据
|
|
3344
|
+
* @param options 请求参数,包含 aweme_id, 可选的 start_time, end_time, duration 和 typeMode
|
|
3345
|
+
* @returns 统一格式的API响应,包含弹幕数据
|
|
3346
|
+
*/
|
|
3347
|
+
getDanmaku: createBoundDouyinApiMethod("\u5F39\u5E55\u6570\u636E", cookie, requestConfig)
|
|
3186
3348
|
};
|
|
3187
3349
|
};
|
|
3188
3350
|
var createDouyinRouteHandler = (dataFetcher, methodType, cookie, requestConfig = getDouyinDefaultConfig(cookie)) => {
|
|
@@ -3274,6 +3436,11 @@ var createDouyinRoutes = (cookie, requestConfig = getDouyinDefaultConfig(cookie)
|
|
|
3274
3436
|
createDouyinValidationMiddleware("\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E"),
|
|
3275
3437
|
createDouyinRouteHandler(getDouyinData, "\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E", cookie, requestConfig)
|
|
3276
3438
|
);
|
|
3439
|
+
router.get(
|
|
3440
|
+
"/fetch_work_danmaku",
|
|
3441
|
+
createDouyinValidationMiddleware("\u5F39\u5E55\u6570\u636E"),
|
|
3442
|
+
createDouyinRouteHandler(getDouyinData, "\u5F39\u5E55\u6570\u636E", cookie, requestConfig)
|
|
3443
|
+
);
|
|
3277
3444
|
return router;
|
|
3278
3445
|
};
|
|
3279
3446
|
|
|
@@ -3507,4 +3674,4 @@ var amagi = Client;
|
|
|
3507
3674
|
* GPL-3.0 Licensed
|
|
3508
3675
|
*/
|
|
3509
3676
|
|
|
3510
|
-
export { AdditionalType, ApiError, BilibiliAv2BvParamsSchema, BilibiliBangumiInfoParamsSchema, BilibiliBangumiStreamParamsSchema, BilibiliBv2AvParamsSchema, BilibiliCommentParamsSchema, BilibiliDynamicParamsSchema, BilibiliEmojiParamsSchema, BilibiliLiveParamsSchema, BilibiliLoginParamsSchema, BilibiliQrcodeParamsSchema, BilibiliQrcodeStatusParamsSchema, BilibiliUserParamsSchema, BilibiliValidationSchemas2 as BilibiliValidationSchemas, BilibiliVideoDownloadParamsSchema, BilibiliVideoParamsSchema, CreateApp, DouyinCommentParamsSchema, DouyinCommentReplyParamsSchema, DouyinEmojiListParamsSchema, DouyinEmojiProParamsSchema, DouyinMusicParamsSchema, DouyinQrcodeParamsSchema, DouyinSearchParamsSchema, DouyinUserParamsSchema, DouyinValidationSchemas2 as DouyinValidationSchemas, DouyinWorkParamsSchema, DynamicType, KuaishouCommentParamsSchema, KuaishouEmojiParamsSchema, KuaishouValidationSchemas2 as KuaishouValidationSchemas, KuaishouVideoParamsSchema, MajorType, ValidationError, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createDouyinRoutes, createErrorResponse, createKuaishouRoutes, createSuccessResponse, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, createBilibiliRoutes as registerBilibiliRoutes, createDouyinRoutes as registerDouyinRoutes, createKuaishouRoutes as registerKuaishouRoutes, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, wbi_sign };
|
|
3677
|
+
export { AdditionalType, ApiError, BilibiliAv2BvParamsSchema, BilibiliBangumiInfoParamsSchema, BilibiliBangumiStreamParamsSchema, BilibiliBv2AvParamsSchema, BilibiliCommentParamsSchema, BilibiliDynamicParamsSchema, BilibiliEmojiParamsSchema, BilibiliLiveParamsSchema, BilibiliLoginParamsSchema, BilibiliQrcodeParamsSchema, BilibiliQrcodeStatusParamsSchema, BilibiliUserParamsSchema, BilibiliValidationSchemas2 as BilibiliValidationSchemas, BilibiliVideoDownloadParamsSchema, BilibiliVideoParamsSchema, CreateApp, DouyinCommentParamsSchema, DouyinCommentReplyParamsSchema, DouyinDanmakuParamsSchema, DouyinEmojiListParamsSchema, DouyinEmojiProParamsSchema, DouyinMusicParamsSchema, DouyinQrcodeParamsSchema, DouyinSearchParamsSchema, DouyinUserParamsSchema, DouyinValidationSchemas2 as DouyinValidationSchemas, DouyinWorkParamsSchema, DynamicType, KuaishouCommentParamsSchema, KuaishouEmojiParamsSchema, KuaishouValidationSchemas2 as KuaishouValidationSchemas, KuaishouVideoParamsSchema, MajorType, ValidationError, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createDouyinRoutes, createErrorResponse, createKuaishouRoutes, createSuccessResponse, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, createBilibiliRoutes as registerBilibiliRoutes, createDouyinRoutes as registerDouyinRoutes, createKuaishouRoutes as registerKuaishouRoutes, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, wbi_sign };
|
package/dist/default/index.d.ts
CHANGED
|
@@ -299,6 +299,26 @@ interface DouyinMethodOptionsMap {
|
|
|
299
299
|
EmojiProParams: {
|
|
300
300
|
methodType: '动态表情数据';
|
|
301
301
|
};
|
|
302
|
+
DanmakuParams: {
|
|
303
|
+
methodType: '弹幕数据';
|
|
304
|
+
/** 视频ID */
|
|
305
|
+
aweme_id: string;
|
|
306
|
+
/**
|
|
307
|
+
* 弹幕查询的开始时间(毫秒)
|
|
308
|
+
* 例如:设置为5000表示从视频第5秒开始获取弹幕
|
|
309
|
+
* 不设置则从视频开头(0秒)开始获取
|
|
310
|
+
* @default 0
|
|
311
|
+
*/
|
|
312
|
+
start_time?: number;
|
|
313
|
+
/**
|
|
314
|
+
* 弹幕查询的结束时间(毫秒)
|
|
315
|
+
* 例如:设置为10000表示获取到视频第10秒的弹幕
|
|
316
|
+
* 不设置则获取到视频结束
|
|
317
|
+
*/
|
|
318
|
+
end_time?: number;
|
|
319
|
+
/** 视频总时长 */
|
|
320
|
+
duration: number;
|
|
321
|
+
};
|
|
302
322
|
VideoWorkParams: {
|
|
303
323
|
methodType: '视频作品数据';
|
|
304
324
|
/** 视频ID */
|
|
@@ -356,6 +376,10 @@ type DouyinEmojiListParams = DouyinMethodOptionsMap['EmojiListParams'];
|
|
|
356
376
|
* 抖音动态表情数据请求参数
|
|
357
377
|
*/
|
|
358
378
|
type DouyinEmojiProParams = DouyinMethodOptionsMap['EmojiProParams'];
|
|
379
|
+
/**
|
|
380
|
+
* 抖音弹幕数据请求参数
|
|
381
|
+
*/
|
|
382
|
+
type DouyinDanmakuParams = DouyinMethodOptionsMap['DanmakuParams'];
|
|
359
383
|
declare const DouyinWorkParamsSchema: z.ZodType<DouyinWorkParams>;
|
|
360
384
|
declare const DouyinCommentParamsSchema: z.ZodType<DouyinCommentParams>;
|
|
361
385
|
declare const DouyinSearchParamsSchema: z.ZodType<DouyinSearchParams>;
|
|
@@ -365,6 +389,7 @@ declare const DouyinMusicParamsSchema: z.ZodType<DouyinMusicParams>;
|
|
|
365
389
|
declare const DouyinQrcodeParamsSchema: z.ZodType<DouyinQrcodeParams>;
|
|
366
390
|
declare const DouyinEmojiListParamsSchema: z.ZodType<DouyinEmojiListParams>;
|
|
367
391
|
declare const DouyinEmojiProParamsSchema: z.ZodType<DouyinEmojiProParams>;
|
|
392
|
+
declare const DouyinDanmakuParamsSchema: z.ZodType<DouyinDanmakuParams>;
|
|
368
393
|
declare const DouyinValidationSchemas: {
|
|
369
394
|
readonly 文字作品数据: z.ZodType<{
|
|
370
395
|
methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
|
|
@@ -492,6 +517,19 @@ declare const DouyinValidationSchemas: {
|
|
|
492
517
|
number?: number;
|
|
493
518
|
cursor?: number;
|
|
494
519
|
}>;
|
|
520
|
+
readonly 弹幕数据: z.ZodType<{
|
|
521
|
+
methodType: "\u5F39\u5E55\u6570\u636E";
|
|
522
|
+
aweme_id: string;
|
|
523
|
+
start_time?: number;
|
|
524
|
+
end_time?: number;
|
|
525
|
+
duration: number;
|
|
526
|
+
}, z.ZodTypeDef, {
|
|
527
|
+
methodType: "\u5F39\u5E55\u6570\u636E";
|
|
528
|
+
aweme_id: string;
|
|
529
|
+
start_time?: number;
|
|
530
|
+
end_time?: number;
|
|
531
|
+
duration: number;
|
|
532
|
+
}>;
|
|
495
533
|
};
|
|
496
534
|
type DouyinMethodType = keyof typeof DouyinValidationSchemas;
|
|
497
535
|
|
|
@@ -859,7 +897,7 @@ type DyEmojiProList = {
|
|
|
859
897
|
extra: EmojiProListExtra;
|
|
860
898
|
flame_achieve_dashboard: FlameAchieveDashboard;
|
|
861
899
|
interactive_resource_config: InteractiveResourceConfig;
|
|
862
|
-
log_pb: LogPb$
|
|
900
|
+
log_pb: LogPb$a;
|
|
863
901
|
report_toggles: ReportToggles;
|
|
864
902
|
status_code: number;
|
|
865
903
|
status_msg: string;
|
|
@@ -1381,7 +1419,7 @@ type StickyConfig = {
|
|
|
1381
1419
|
sender_show?: string;
|
|
1382
1420
|
[property: string]: any;
|
|
1383
1421
|
};
|
|
1384
|
-
type LogPb$
|
|
1422
|
+
type LogPb$a = {
|
|
1385
1423
|
impr_id: string;
|
|
1386
1424
|
[property: string]: any;
|
|
1387
1425
|
};
|
|
@@ -1397,7 +1435,7 @@ type ReportToggles = {
|
|
|
1397
1435
|
/** 图集作品 */
|
|
1398
1436
|
type DyImageAlbumWork = {
|
|
1399
1437
|
aweme_detail: AwemeDetail$3;
|
|
1400
|
-
log_pb: LogPb$
|
|
1438
|
+
log_pb: LogPb$9;
|
|
1401
1439
|
status_code: number;
|
|
1402
1440
|
[property: string]: any;
|
|
1403
1441
|
};
|
|
@@ -2077,7 +2115,7 @@ type XiguaBaseInfo$4 = {
|
|
|
2077
2115
|
status: number;
|
|
2078
2116
|
[property: string]: any;
|
|
2079
2117
|
};
|
|
2080
|
-
type LogPb$
|
|
2118
|
+
type LogPb$9 = {
|
|
2081
2119
|
impr_id: string;
|
|
2082
2120
|
[property: string]: any;
|
|
2083
2121
|
};
|
|
@@ -2088,7 +2126,7 @@ type DyMusicWork = {
|
|
|
2088
2126
|
[key: string]: any;
|
|
2089
2127
|
};
|
|
2090
2128
|
high_upload_ratio: number;
|
|
2091
|
-
log_pb: LogPb$
|
|
2129
|
+
log_pb: LogPb$8;
|
|
2092
2130
|
msg: string;
|
|
2093
2131
|
music_info: MusicInfo;
|
|
2094
2132
|
rec_list: string[];
|
|
@@ -2105,7 +2143,7 @@ type Extra$4 = {
|
|
|
2105
2143
|
now: number;
|
|
2106
2144
|
[property: string]: any;
|
|
2107
2145
|
};
|
|
2108
|
-
type LogPb$
|
|
2146
|
+
type LogPb$8 = {
|
|
2109
2147
|
impr_id: string;
|
|
2110
2148
|
[property: string]: any;
|
|
2111
2149
|
};
|
|
@@ -2322,7 +2360,7 @@ type DySearchInfo = {
|
|
|
2322
2360
|
global_doodle_config: GlobalDoodleConfig;
|
|
2323
2361
|
guide_search_words: GuideSearchWord[];
|
|
2324
2362
|
has_more: number;
|
|
2325
|
-
log_pb: LogPb$
|
|
2363
|
+
log_pb: LogPb$7;
|
|
2326
2364
|
multi_columns_info: MultiColumnsInfo;
|
|
2327
2365
|
ops: null;
|
|
2328
2366
|
path: string;
|
|
@@ -3125,7 +3163,7 @@ type GuideSearchWord = {
|
|
|
3125
3163
|
word: string;
|
|
3126
3164
|
[property: string]: any;
|
|
3127
3165
|
};
|
|
3128
|
-
type LogPb$
|
|
3166
|
+
type LogPb$7 = {
|
|
3129
3167
|
impr_id: string;
|
|
3130
3168
|
[property: string]: any;
|
|
3131
3169
|
};
|
|
@@ -3142,7 +3180,7 @@ type TimeCost$1 = {
|
|
|
3142
3180
|
/** 合辑作品 */
|
|
3143
3181
|
type DySlidesWork = {
|
|
3144
3182
|
aweme_detail: AwemeDetail$2;
|
|
3145
|
-
log_pb: LogPb$
|
|
3183
|
+
log_pb: LogPb$6;
|
|
3146
3184
|
status_code: number;
|
|
3147
3185
|
[property: string]: any;
|
|
3148
3186
|
};
|
|
@@ -3907,7 +3945,7 @@ type XiguaBaseInfo$3 = {
|
|
|
3907
3945
|
status: number;
|
|
3908
3946
|
[property: string]: any;
|
|
3909
3947
|
};
|
|
3910
|
-
type LogPb$
|
|
3948
|
+
type LogPb$6 = {
|
|
3911
3949
|
impr_id: string;
|
|
3912
3950
|
[property: string]: any;
|
|
3913
3951
|
};
|
|
@@ -3982,7 +4020,7 @@ type TimeCost = {
|
|
|
3982
4020
|
|
|
3983
4021
|
type DyUserInfo = {
|
|
3984
4022
|
extra: Extra$1;
|
|
3985
|
-
log_pb: LogPb$
|
|
4023
|
+
log_pb: LogPb$5;
|
|
3986
4024
|
status_code: number;
|
|
3987
4025
|
status_msg: null;
|
|
3988
4026
|
user: User$1;
|
|
@@ -3994,7 +4032,7 @@ type Extra$1 = {
|
|
|
3994
4032
|
now: number;
|
|
3995
4033
|
[property: string]: any;
|
|
3996
4034
|
};
|
|
3997
|
-
type LogPb$
|
|
4035
|
+
type LogPb$5 = {
|
|
3998
4036
|
impr_id: string;
|
|
3999
4037
|
[property: string]: any;
|
|
4000
4038
|
};
|
|
@@ -4315,7 +4353,7 @@ type Data$f = {
|
|
|
4315
4353
|
data: Datum[];
|
|
4316
4354
|
enter_mode: number;
|
|
4317
4355
|
enter_room_id: string;
|
|
4318
|
-
extra: DataExtra;
|
|
4356
|
+
extra: DataExtra$1;
|
|
4319
4357
|
login_lead: LoginLead;
|
|
4320
4358
|
partition_road_map: PartitionRoadMap;
|
|
4321
4359
|
qrcode_url: string;
|
|
@@ -5748,7 +5786,7 @@ type General = {
|
|
|
5748
5786
|
GroupPriority: number[];
|
|
5749
5787
|
[property: string]: any;
|
|
5750
5788
|
};
|
|
5751
|
-
type DataExtra = {
|
|
5789
|
+
type DataExtra$1 = {
|
|
5752
5790
|
digg_color: string;
|
|
5753
5791
|
is_official_channel: boolean;
|
|
5754
5792
|
pay_scores: string;
|
|
@@ -6392,7 +6430,7 @@ type UserLiveVideosExtra = {
|
|
|
6392
6430
|
type DyUserPostVideos = {
|
|
6393
6431
|
aweme_list: AwemeList[];
|
|
6394
6432
|
has_more: number;
|
|
6395
|
-
log_pb: LogPb$
|
|
6433
|
+
log_pb: LogPb$4;
|
|
6396
6434
|
max_cursor: number;
|
|
6397
6435
|
min_cursor: number;
|
|
6398
6436
|
post_serial: number;
|
|
@@ -7299,7 +7337,7 @@ type XiguaBaseInfo$2 = {
|
|
|
7299
7337
|
status: number;
|
|
7300
7338
|
[property: string]: any;
|
|
7301
7339
|
};
|
|
7302
|
-
type LogPb$
|
|
7340
|
+
type LogPb$4 = {
|
|
7303
7341
|
impr_id: string;
|
|
7304
7342
|
[property: string]: any;
|
|
7305
7343
|
};
|
|
@@ -7307,7 +7345,7 @@ type LogPb$3 = {
|
|
|
7307
7345
|
/** 单个视频作品 */
|
|
7308
7346
|
type DyVideoWork = {
|
|
7309
7347
|
aweme_detail: AwemeDetail$1;
|
|
7310
|
-
log_pb: LogPb$
|
|
7348
|
+
log_pb: LogPb$3;
|
|
7311
7349
|
status_code: number;
|
|
7312
7350
|
[property: string]: any;
|
|
7313
7351
|
};
|
|
@@ -8043,7 +8081,7 @@ type XiguaBaseInfo$1 = {
|
|
|
8043
8081
|
status: number;
|
|
8044
8082
|
[property: string]: any;
|
|
8045
8083
|
};
|
|
8046
|
-
type LogPb$
|
|
8084
|
+
type LogPb$3 = {
|
|
8047
8085
|
impr_id: string;
|
|
8048
8086
|
[property: string]: any;
|
|
8049
8087
|
};
|
|
@@ -8063,7 +8101,7 @@ type DyWorkComments = {
|
|
|
8063
8101
|
};
|
|
8064
8102
|
has_more: number;
|
|
8065
8103
|
hotsoon_filtered_count: number;
|
|
8066
|
-
log_pb: LogPb$
|
|
8104
|
+
log_pb: LogPb$2;
|
|
8067
8105
|
reply_style: number;
|
|
8068
8106
|
show_management_entry_point: number;
|
|
8069
8107
|
status_code: number;
|
|
@@ -8365,6 +8403,54 @@ type FastResponseComment = {
|
|
|
8365
8403
|
timed_response_words: string[];
|
|
8366
8404
|
[property: string]: any;
|
|
8367
8405
|
};
|
|
8406
|
+
type LogPb$2 = {
|
|
8407
|
+
impr_id: string;
|
|
8408
|
+
[property: string]: any;
|
|
8409
|
+
};
|
|
8410
|
+
|
|
8411
|
+
type DyDanmakuList = {
|
|
8412
|
+
danmaku_list: DanmakuList[];
|
|
8413
|
+
end_time: number;
|
|
8414
|
+
extra: DataExtra;
|
|
8415
|
+
log_pb: LogPb$1;
|
|
8416
|
+
start_time: number;
|
|
8417
|
+
status_code: number;
|
|
8418
|
+
total: number;
|
|
8419
|
+
[property: string]: any;
|
|
8420
|
+
};
|
|
8421
|
+
type DanmakuList = {
|
|
8422
|
+
danmaku_id: string;
|
|
8423
|
+
danmaku_logos: null;
|
|
8424
|
+
danmaku_type: number;
|
|
8425
|
+
danmaku_type_bits: number;
|
|
8426
|
+
digg_count: number;
|
|
8427
|
+
digg_type: number;
|
|
8428
|
+
dislike_type: number;
|
|
8429
|
+
extra: DanmakuListExtra;
|
|
8430
|
+
from_copy: boolean;
|
|
8431
|
+
has_emoji: boolean;
|
|
8432
|
+
is_ad: boolean;
|
|
8433
|
+
item_id: string;
|
|
8434
|
+
offset_time: number;
|
|
8435
|
+
score: number;
|
|
8436
|
+
show_copy: boolean;
|
|
8437
|
+
show_digg: boolean;
|
|
8438
|
+
status: number;
|
|
8439
|
+
text: string;
|
|
8440
|
+
user_id: string;
|
|
8441
|
+
[property: string]: any;
|
|
8442
|
+
};
|
|
8443
|
+
type DanmakuListExtra = {
|
|
8444
|
+
big_thumb: null;
|
|
8445
|
+
style_list: null;
|
|
8446
|
+
[property: string]: any;
|
|
8447
|
+
};
|
|
8448
|
+
type DataExtra = {
|
|
8449
|
+
fatal_item_ids: string[];
|
|
8450
|
+
logid: string;
|
|
8451
|
+
now: number;
|
|
8452
|
+
[property: string]: any;
|
|
8453
|
+
};
|
|
8368
8454
|
type LogPb$1 = {
|
|
8369
8455
|
impr_id: string;
|
|
8370
8456
|
[property: string]: any;
|
|
@@ -16876,6 +16962,10 @@ interface DouyinDataOptionsMap {
|
|
|
16876
16962
|
opt: DouyinMethodOptionsMap['EmojiProParams'];
|
|
16877
16963
|
data: DyEmojiProList;
|
|
16878
16964
|
};
|
|
16965
|
+
弹幕数据: {
|
|
16966
|
+
opt: DouyinMethodOptionsMap['DanmakuParams'];
|
|
16967
|
+
data: DyDanmakuList;
|
|
16968
|
+
};
|
|
16879
16969
|
音乐数据: {
|
|
16880
16970
|
opt: DouyinMethodOptionsMap['MusicParams'];
|
|
16881
16971
|
data: DyMusicWork;
|
|
@@ -17001,6 +17091,12 @@ declare const validateDouyinParams: <T extends DouyinMethodType>(methodType: T,
|
|
|
17001
17091
|
comment_id: string;
|
|
17002
17092
|
number?: number;
|
|
17003
17093
|
cursor?: number;
|
|
17094
|
+
} | {
|
|
17095
|
+
methodType: "\u5F39\u5E55\u6570\u636E";
|
|
17096
|
+
aweme_id: string;
|
|
17097
|
+
start_time?: number;
|
|
17098
|
+
end_time?: number;
|
|
17099
|
+
duration: number;
|
|
17004
17100
|
};
|
|
17005
17101
|
/**
|
|
17006
17102
|
* 验证哔哩哔哩参数
|
|
@@ -17261,6 +17357,17 @@ declare const createAmagiClient: (options?: Options) => {
|
|
|
17261
17357
|
} & {
|
|
17262
17358
|
typeMode?: M | undefined;
|
|
17263
17359
|
}) => Promise<ApiResponse<ConditionalReturnType<DyUserLiveVideos, M>>>;
|
|
17360
|
+
getDanmaku: <M extends TypeMode>(options: Omit<{
|
|
17361
|
+
methodType: "\u5F39\u5E55\u6570\u636E";
|
|
17362
|
+
aweme_id: string;
|
|
17363
|
+
start_time?: number;
|
|
17364
|
+
end_time?: number;
|
|
17365
|
+
duration: number;
|
|
17366
|
+
}, "methodType"> & {
|
|
17367
|
+
typeMode?: TypeMode;
|
|
17368
|
+
} & {
|
|
17369
|
+
typeMode?: M | undefined;
|
|
17370
|
+
}) => Promise<ApiResponse<ConditionalReturnType<DyDanmakuList, M>>>;
|
|
17264
17371
|
};
|
|
17265
17372
|
sign: typeof douyinSign;
|
|
17266
17373
|
douyinApiUrls: typeof douyinApiUrls;
|
|
@@ -18478,6 +18585,22 @@ declare const douyin: {
|
|
|
18478
18585
|
} & {
|
|
18479
18586
|
typeMode?: M | undefined;
|
|
18480
18587
|
}, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<DyUserLiveVideos, M>>>;
|
|
18588
|
+
/**
|
|
18589
|
+
* 获取弹幕数据
|
|
18590
|
+
* @param options 请求参数,包含 aweme_id, 可选的 start_time, end_time, duration 和 typeMode
|
|
18591
|
+
* @returns 统一格式的API响应,包含弹幕数据
|
|
18592
|
+
*/
|
|
18593
|
+
getDanmaku: <M extends TypeMode>(options: Omit<{
|
|
18594
|
+
methodType: "\u5F39\u5E55\u6570\u636E";
|
|
18595
|
+
aweme_id: string;
|
|
18596
|
+
start_time?: number;
|
|
18597
|
+
end_time?: number;
|
|
18598
|
+
duration: number;
|
|
18599
|
+
}, "methodType"> & {
|
|
18600
|
+
typeMode?: TypeMode;
|
|
18601
|
+
} & {
|
|
18602
|
+
typeMode?: M | undefined;
|
|
18603
|
+
}, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<DyDanmakuList, M>>>;
|
|
18481
18604
|
};
|
|
18482
18605
|
/**
|
|
18483
18606
|
* 创建绑定了cookie的抖音API对象
|
|
@@ -18687,6 +18810,22 @@ declare const createBoundDouyinApi: (cookie: string, requestConfig: RequestConfi
|
|
|
18687
18810
|
} & {
|
|
18688
18811
|
typeMode?: M | undefined;
|
|
18689
18812
|
}) => Promise<ApiResponse<ConditionalReturnType<DyUserLiveVideos, M>>>;
|
|
18813
|
+
/**
|
|
18814
|
+
* 获取弹幕数据
|
|
18815
|
+
* @param options 请求参数,包含 aweme_id, 可选的 start_time, end_time, duration 和 typeMode
|
|
18816
|
+
* @returns 统一格式的API响应,包含弹幕数据
|
|
18817
|
+
*/
|
|
18818
|
+
getDanmaku: <M extends TypeMode>(options: Omit<{
|
|
18819
|
+
methodType: "\u5F39\u5E55\u6570\u636E";
|
|
18820
|
+
aweme_id: string;
|
|
18821
|
+
start_time?: number;
|
|
18822
|
+
end_time?: number;
|
|
18823
|
+
duration: number;
|
|
18824
|
+
}, "methodType"> & {
|
|
18825
|
+
typeMode?: TypeMode;
|
|
18826
|
+
} & {
|
|
18827
|
+
typeMode?: M | undefined;
|
|
18828
|
+
}) => Promise<ApiResponse<ConditionalReturnType<DyDanmakuList, M>>>;
|
|
18690
18829
|
};
|
|
18691
18830
|
/**
|
|
18692
18831
|
* 绑定cookie的抖音API对象类型
|
|
@@ -18784,6 +18923,12 @@ declare class DouyinAPI {
|
|
|
18784
18923
|
* @returns 完整的接口URL
|
|
18785
18924
|
*/
|
|
18786
18925
|
申请二维码(data: DouyinMethodOptionsWithoutMethodType['QrcodeParams']): string;
|
|
18926
|
+
/**
|
|
18927
|
+
* 获取弹幕数据的接口地址
|
|
18928
|
+
* @param data - 请求参数,包含group_id、item_id等
|
|
18929
|
+
* @returns 完整的接口URL
|
|
18930
|
+
*/
|
|
18931
|
+
弹幕(data: DouyinMethodOptionsWithoutMethodType['DanmakuParams']): string;
|
|
18787
18932
|
}
|
|
18788
18933
|
/**
|
|
18789
18934
|
* 默认的DouyinAPI实例(使用默认浏览器版本125.0.0.0)
|
|
@@ -19256,6 +19401,17 @@ declare const amagiClient: (options?: Options) => {
|
|
|
19256
19401
|
} & {
|
|
19257
19402
|
typeMode?: M | undefined;
|
|
19258
19403
|
}) => Promise<ApiResponse<ConditionalReturnType<DyUserLiveVideos, M>>>;
|
|
19404
|
+
getDanmaku: <M extends TypeMode>(options: Omit<{
|
|
19405
|
+
methodType: "\u5F39\u5E55\u6570\u636E";
|
|
19406
|
+
aweme_id: string;
|
|
19407
|
+
start_time?: number;
|
|
19408
|
+
end_time?: number;
|
|
19409
|
+
duration: number;
|
|
19410
|
+
}, "methodType"> & {
|
|
19411
|
+
typeMode?: TypeMode;
|
|
19412
|
+
} & {
|
|
19413
|
+
typeMode?: M | undefined;
|
|
19414
|
+
}) => Promise<ApiResponse<ConditionalReturnType<DyDanmakuList, M>>>;
|
|
19259
19415
|
};
|
|
19260
19416
|
sign: typeof douyinSign;
|
|
19261
19417
|
douyinApiUrls: typeof douyinApiUrls;
|
|
@@ -19491,4 +19647,4 @@ declare const CreateApp: AmagiConstructor;
|
|
|
19491
19647
|
declare const Client: AmagiConstructor;
|
|
19492
19648
|
declare const amagi: AmagiConstructor;
|
|
19493
19649
|
|
|
19494
|
-
export { type APIErrorType, AdditionalType, ApiError, type ApiResponse, type BaseResponse, type BiliAv2Bv, type BiliBangumiVideoInfo, type BiliBangumiVideoPlayurlIsLogin, type BiliBangumiVideoPlayurlNoLogin, type BiliBiliVideoPlayurlNoLogin, type BiliBv2AV, type BiliCheckQrcode, type BiliDynamicCard, type BiliDynamicInfo, type BiliDynamicInfoUnion, type BiliEmojiList, type BiliLiveRoomDef, type BiliLiveRoomDetail, type BiliNewLoginQrcode, type BiliOneWork, type BiliUserDynamic, type BiliUserFullView, type BiliUserProfile, type BiliVideoPlayurlIsLogin, type BiliWorkComments, type BilibiliAv2BvParams, BilibiliAv2BvParamsSchema, type BilibiliBangumiInfoParams, BilibiliBangumiInfoParamsSchema, type BilibiliBangumiStreamParams, BilibiliBangumiStreamParamsSchema, type BilibiliBv2AvParams, BilibiliBv2AvParamsSchema, type BilibiliCommentParams, BilibiliCommentParamsSchema, type BilibiliDataOptions, type BilibiliDataOptionsMap, type BilibiliDynamicParams, BilibiliDynamicParamsSchema, type BilibiliEmojiParams, BilibiliEmojiParamsSchema, type BilibiliLiveParams, BilibiliLiveParamsSchema, type BilibiliLoginParams, BilibiliLoginParamsSchema, type BilibiliMethodOptionsMap, type BilibiliMethodType, type BilibiliQrcodeParams, BilibiliQrcodeParamsSchema, type BilibiliQrcodeStatusParams, BilibiliQrcodeStatusParamsSchema, type BilibiliUserParams, BilibiliUserParamsSchema, BilibiliValidationSchemas, type BilibiliVideoDownloadParams, BilibiliVideoDownloadParamsSchema, type BilibiliVideoParams, BilibiliVideoParamsSchema, type BoundBilibiliApi, type BoundDouyinApi, type BoundKuaishouApi, type CookieConfig, CreateApp, type DouyinCommentParams, DouyinCommentParamsSchema, type DouyinCommentReplyParams, DouyinCommentReplyParamsSchema, type DouyinDataOptions, type DouyinDataOptionsMap, type DouyinEmojiListParams, DouyinEmojiListParamsSchema, type DouyinEmojiProParams, DouyinEmojiProParamsSchema, type DouyinLiveRoomParams, type DouyinMethodOptionsMap, type DouyinMethodType, type DouyinMusicParams, DouyinMusicParamsSchema, type DouyinQrcodeParams, DouyinQrcodeParamsSchema, type DouyinSearchParams, DouyinSearchParamsSchema, type DouyinUserParams, DouyinUserParamsSchema, DouyinValidationSchemas, type DouyinWorkParams, DouyinWorkParamsSchema, type DyEmojiList, type DyEmojiProList, type DyImageAlbumWork, type DyMusicWork, type DySearchInfo, type DySlidesWork, type DySuggestWords, type DyUserInfo, type DyUserLiveVideos, type DyUserPostVideos, type DyVideoWork, type DyWorkComments, DynamicType, type DynamicTypeAV$1 as DynamicTypeAV, type DynamicTypeDraw$1 as DynamicTypeDraw, type DynamicTypeForward, type DynamicTypeForwardUnion, type DynamicTypeLiveRcmd, type DynamicTypeWord, type ErrorResponse, type KsEmojiList, type KsOneWork, type KsWorkComments, type KuaishouCommentParams, KuaishouCommentParamsSchema, type KuaishouDataOptions, type KuaishouDataOptionsMap, type KuaishouEmojiParams, KuaishouEmojiParamsSchema, type KuaishouMethodOptionsMap, type KuaishouMethodType, KuaishouValidationSchemas, type KuaishouVideoParams, KuaishouVideoParamsSchema, MajorType, type NetworksConfigType, type OmitMethodType, type Options, type RequestConfig, type SuccessResponse, type TypeControl, ValidationError, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createDouyinRoutes, createErrorResponse, createKuaishouRoutes, createSuccessResponse, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, createBilibiliRoutes as registerBilibiliRoutes, createDouyinRoutes as registerDouyinRoutes, createKuaishouRoutes as registerKuaishouRoutes, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, wbi_sign };
|
|
19650
|
+
export { type APIErrorType, AdditionalType, ApiError, type ApiResponse, type BaseResponse, type BiliAv2Bv, type BiliBangumiVideoInfo, type BiliBangumiVideoPlayurlIsLogin, type BiliBangumiVideoPlayurlNoLogin, type BiliBiliVideoPlayurlNoLogin, type BiliBv2AV, type BiliCheckQrcode, type BiliDynamicCard, type BiliDynamicInfo, type BiliDynamicInfoUnion, type BiliEmojiList, type BiliLiveRoomDef, type BiliLiveRoomDetail, type BiliNewLoginQrcode, type BiliOneWork, type BiliUserDynamic, type BiliUserFullView, type BiliUserProfile, type BiliVideoPlayurlIsLogin, type BiliWorkComments, type BilibiliAv2BvParams, BilibiliAv2BvParamsSchema, type BilibiliBangumiInfoParams, BilibiliBangumiInfoParamsSchema, type BilibiliBangumiStreamParams, BilibiliBangumiStreamParamsSchema, type BilibiliBv2AvParams, BilibiliBv2AvParamsSchema, type BilibiliCommentParams, BilibiliCommentParamsSchema, type BilibiliDataOptions, type BilibiliDataOptionsMap, type BilibiliDynamicParams, BilibiliDynamicParamsSchema, type BilibiliEmojiParams, BilibiliEmojiParamsSchema, type BilibiliLiveParams, BilibiliLiveParamsSchema, type BilibiliLoginParams, BilibiliLoginParamsSchema, type BilibiliMethodOptionsMap, type BilibiliMethodType, type BilibiliQrcodeParams, BilibiliQrcodeParamsSchema, type BilibiliQrcodeStatusParams, BilibiliQrcodeStatusParamsSchema, type BilibiliUserParams, BilibiliUserParamsSchema, BilibiliValidationSchemas, type BilibiliVideoDownloadParams, BilibiliVideoDownloadParamsSchema, type BilibiliVideoParams, BilibiliVideoParamsSchema, type BoundBilibiliApi, type BoundDouyinApi, type BoundKuaishouApi, type CookieConfig, CreateApp, type DouyinCommentParams, DouyinCommentParamsSchema, type DouyinCommentReplyParams, DouyinCommentReplyParamsSchema, type DouyinDanmakuParams, DouyinDanmakuParamsSchema, type DouyinDataOptions, type DouyinDataOptionsMap, type DouyinEmojiListParams, DouyinEmojiListParamsSchema, type DouyinEmojiProParams, DouyinEmojiProParamsSchema, type DouyinLiveRoomParams, type DouyinMethodOptionsMap, type DouyinMethodType, type DouyinMusicParams, DouyinMusicParamsSchema, type DouyinQrcodeParams, DouyinQrcodeParamsSchema, type DouyinSearchParams, DouyinSearchParamsSchema, type DouyinUserParams, DouyinUserParamsSchema, DouyinValidationSchemas, type DouyinWorkParams, DouyinWorkParamsSchema, type DyDanmakuList, type DyEmojiList, type DyEmojiProList, type DyImageAlbumWork, type DyMusicWork, type DySearchInfo, type DySlidesWork, type DySuggestWords, type DyUserInfo, type DyUserLiveVideos, type DyUserPostVideos, type DyVideoWork, type DyWorkComments, DynamicType, type DynamicTypeAV$1 as DynamicTypeAV, type DynamicTypeDraw$1 as DynamicTypeDraw, type DynamicTypeForward, type DynamicTypeForwardUnion, type DynamicTypeLiveRcmd, type DynamicTypeWord, type ErrorResponse, type KsEmojiList, type KsOneWork, type KsWorkComments, type KuaishouCommentParams, KuaishouCommentParamsSchema, type KuaishouDataOptions, type KuaishouDataOptionsMap, type KuaishouEmojiParams, KuaishouEmojiParamsSchema, type KuaishouMethodOptionsMap, type KuaishouMethodType, KuaishouValidationSchemas, type KuaishouVideoParams, KuaishouVideoParamsSchema, MajorType, type NetworksConfigType, type OmitMethodType, type Options, type RequestConfig, type SuccessResponse, type TypeControl, ValidationError, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createDouyinRoutes, createErrorResponse, createKuaishouRoutes, createSuccessResponse, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, createBilibiliRoutes as registerBilibiliRoutes, createDouyinRoutes as registerDouyinRoutes, createKuaishouRoutes as registerKuaishouRoutes, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, wbi_sign };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikenxuan/amagi",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "抖音、B站的 web 端相关数据接口基于 Node.js 的实现",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"douyin",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"build:main": "cross-env BUILD_TARGET=main tsup --config tsup.config.ts",
|
|
55
55
|
"build:exports": "cross-env BUILD_TARGET=exports tsup --config tsup.config.ts",
|
|
56
56
|
"clean": "npm ci/pr.js clean",
|
|
57
|
-
"dev": "tsx watch src/dev.ts",
|
|
57
|
+
"dev": "cross-env LOG_LEVEL=debug tsx watch src/dev.ts",
|
|
58
58
|
"dev:js": "node src/dev.js",
|
|
59
59
|
"docs:build": "typedoc --lang zh",
|
|
60
60
|
"docs:serve": "typedoc --lang zh --serve",
|