@iflyrpa/actions 4.0.4-beta.4 → 4.0.4-beta.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/dist/bundle.js +58 -12
- package/dist/bundle.js.map +1 -1
- package/dist/index.js +58 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +58 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f29f1122-4d79-5247-a4f3-3314fc4310ad")}catch(e){}}();
|
|
3
3
|
var __webpack_modules__ = {
|
|
4
4
|
"./src/utils/XhsXsCommonEnc.js": function(module) {
|
|
5
5
|
var encrypt_lookup = [
|
|
@@ -4402,7 +4402,7 @@ var __webpack_exports__ = {};
|
|
|
4402
4402
|
});
|
|
4403
4403
|
const package_json_namespaceObject = require("@iflyrpa/share/package.json");
|
|
4404
4404
|
var package_json_default = /*#__PURE__*/ __webpack_require__.n(package_json_namespaceObject);
|
|
4405
|
-
var package_namespaceObject = JSON.parse('{"i8":"4.0.4-beta.
|
|
4405
|
+
var package_namespaceObject = JSON.parse('{"i8":"4.0.4-beta.5"}');
|
|
4406
4406
|
const share_namespaceObject = require("@iflyrpa/share");
|
|
4407
4407
|
const external_node_fs_namespaceObject = require("node:fs");
|
|
4408
4408
|
var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
|
|
@@ -15456,8 +15456,6 @@ var __webpack_exports__ = {};
|
|
|
15456
15456
|
userProfileP,
|
|
15457
15457
|
overviewP
|
|
15458
15458
|
]);
|
|
15459
|
-
_task.logger.info(`抖音用户信息响应: ${JSON.stringify(userProfile)}`);
|
|
15460
|
-
_task.logger.info(`抖音近7日数据响应: ${JSON.stringify(overview)}`);
|
|
15461
15459
|
let fansNum = 0;
|
|
15462
15460
|
let favedNum = 0;
|
|
15463
15461
|
let followingNum = 0;
|
|
@@ -15541,7 +15539,6 @@ var __webpack_exports__ = {};
|
|
|
15541
15539
|
retryDelay: 100,
|
|
15542
15540
|
timeout: 5000
|
|
15543
15541
|
});
|
|
15544
|
-
_task.logger.info(`视频号账号数据响应: ${JSON.stringify(authData)}`);
|
|
15545
15542
|
const AUTH_ERROR_CODES = [
|
|
15546
15543
|
300333,
|
|
15547
15544
|
300334,
|
|
@@ -15558,13 +15555,60 @@ var __webpack_exports__ = {};
|
|
|
15558
15555
|
return types_errorResponse(`视频号账号信息获取失败:${authData.errMsg || "未知错误"}`, 414);
|
|
15559
15556
|
}
|
|
15560
15557
|
const finderUser = authData.data?.finderUser;
|
|
15558
|
+
const now = new Date();
|
|
15559
|
+
const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 2);
|
|
15560
|
+
const startTs = Math.floor(yesterday.getTime() / 1000);
|
|
15561
|
+
const endTs = startTs + 86400;
|
|
15562
|
+
_task.logger.info(`视频号昨日数据范围 start: ${startTs} ~ end: ${endTs}`);
|
|
15563
|
+
let fansNumYesterday = 0;
|
|
15564
|
+
let playNumYesterday = 0;
|
|
15565
|
+
let likeNumYesterday = 0;
|
|
15566
|
+
let commentNumYesterday = 0;
|
|
15567
|
+
try {
|
|
15568
|
+
const statsData = await http.api({
|
|
15569
|
+
method: "post",
|
|
15570
|
+
url: "https://channels.weixin.qq.com/cgi-bin/mmfinderassistant-bin/statistic/new_post_total_data",
|
|
15571
|
+
params: {
|
|
15572
|
+
_aid: aid,
|
|
15573
|
+
_rid: `${Date.now().toString(16)}-${Math.random().toString(36).substring(2, 9)}`,
|
|
15574
|
+
_pageUrl: encodeURIComponent("https://channels.weixin.qq.com/platform")
|
|
15575
|
+
},
|
|
15576
|
+
data: {
|
|
15577
|
+
startTs: startTs.toString(),
|
|
15578
|
+
endTs: endTs.toString(),
|
|
15579
|
+
interval: 3,
|
|
15580
|
+
timestamp: Date.now().toString(),
|
|
15581
|
+
_log_finder_uin: "",
|
|
15582
|
+
_log_finder_id: finderId,
|
|
15583
|
+
rawKeyBuff: "",
|
|
15584
|
+
pluginSessionId: null,
|
|
15585
|
+
scene: 7,
|
|
15586
|
+
reqScene: 7
|
|
15587
|
+
}
|
|
15588
|
+
}, {
|
|
15589
|
+
retries: 3,
|
|
15590
|
+
retryDelay: 100,
|
|
15591
|
+
timeout: 5000
|
|
15592
|
+
});
|
|
15593
|
+
if (!statsData.errCode && statsData.data?.totalData) {
|
|
15594
|
+
const data = statsData.data.totalData;
|
|
15595
|
+
fansNumYesterday = Number.parseInt(data.follow?.[1] || "0", 10) || 0;
|
|
15596
|
+
playNumYesterday = Number.parseInt(data.browse?.[1] || "0", 10) || 0;
|
|
15597
|
+
likeNumYesterday = Number.parseInt(data.like?.[1] || "0", 10) || 0;
|
|
15598
|
+
commentNumYesterday = Number.parseInt(data.comment?.[1] || "0", 10) || 0;
|
|
15599
|
+
_task.logger.info(`视频号昨日数据提取成功 - 净增关注:${fansNumYesterday}, 播放:${playNumYesterday}, 喜欢:${likeNumYesterday}, 评论:${commentNumYesterday}`);
|
|
15600
|
+
}
|
|
15601
|
+
} catch (error) {
|
|
15602
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
15603
|
+
_task.logger.warn(`视频号昨日数据获取失败(降级为null): ${errMsg}`);
|
|
15604
|
+
}
|
|
15561
15605
|
const shipinhaoData = {
|
|
15562
15606
|
fansNum: finderUser?.fansCount || 0,
|
|
15563
15607
|
feedsCount: finderUser?.feedsCount || 0,
|
|
15564
|
-
fansNumYesterday
|
|
15565
|
-
playNumYesterday
|
|
15566
|
-
likeNumYesterday
|
|
15567
|
-
commentNumYesterday
|
|
15608
|
+
fansNumYesterday,
|
|
15609
|
+
playNumYesterday,
|
|
15610
|
+
likeNumYesterday,
|
|
15611
|
+
commentNumYesterday
|
|
15568
15612
|
};
|
|
15569
15613
|
return (0, share_namespaceObject.success)(shipinhaoData, "视频号平台数据获取成功!");
|
|
15570
15614
|
} catch (error) {
|
|
@@ -16021,7 +16065,8 @@ var __webpack_exports__ = {};
|
|
|
16021
16065
|
}
|
|
16022
16066
|
async function handleDouyinData(_task, params) {
|
|
16023
16067
|
try {
|
|
16024
|
-
const { cookies,
|
|
16068
|
+
const { cookies, pageSize = 12, status = 0, showOriginalData = false, onlySuccess = false } = params;
|
|
16069
|
+
const pageNum = params.pageNum || 1;
|
|
16025
16070
|
const headers = {
|
|
16026
16071
|
cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
|
|
16027
16072
|
referer: "https://creator.douyin.com"
|
|
@@ -16116,7 +16161,8 @@ var __webpack_exports__ = {};
|
|
|
16116
16161
|
}
|
|
16117
16162
|
async function handleShipinhaoData(_task, params) {
|
|
16118
16163
|
try {
|
|
16119
|
-
const { cookies, postType = "all",
|
|
16164
|
+
const { cookies, postType = "all", pageSize = 10, showOriginalData = false } = params;
|
|
16165
|
+
const pageNum = params.pageNum || 1;
|
|
16120
16166
|
const aidCookie = cookies.find((it)=>"_aid" === it.name)?.value;
|
|
16121
16167
|
const aid = aidCookie || "9d3e0e9f-b842-498d-a273-4285d58df264";
|
|
16122
16168
|
const uinCookie = cookies.find((it)=>"uin" === it.name || "wxuin" === it.name)?.value || "0000000000";
|
|
@@ -25630,4 +25676,4 @@ if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_targe
|
|
|
25630
25676
|
});
|
|
25631
25677
|
|
|
25632
25678
|
//# sourceMappingURL=index.js.map
|
|
25633
|
-
//# debugId=
|
|
25679
|
+
//# debugId=f29f1122-4d79-5247-a4f3-3314fc4310ad
|