@iflyrpa/actions 4.0.4-beta.4 → 4.0.4-beta.6

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/index.mjs 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]="83bb856e-4161-51e9-bcc6-bc0ff84cc5f0")}catch(e){}}();
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]="5b45922a-a009-5f6b-94f9-b400b59b5510")}catch(e){}}();
3
3
  import * as __WEBPACK_EXTERNAL_MODULE_crypto__ from "crypto";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE_fs__ from "fs";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_package_json_58ae5f06__ from "@iflyrpa/share/package.json";
@@ -4352,7 +4352,7 @@ function __webpack_require__(moduleId) {
4352
4352
  return module;
4353
4353
  };
4354
4354
  })();
4355
- var package_namespaceObject = JSON.parse('{"i8":"4.0.4-beta.4"}');
4355
+ var package_namespaceObject = JSON.parse('{"i8":"4.0.4-beta.6"}');
4356
4356
  const PROXY_CREDENTIALS = [
4357
4357
  {
4358
4358
  ip: "47.110.131.129",
@@ -15379,8 +15379,6 @@ async function getDouyinData(_task, params) {
15379
15379
  userProfileP,
15380
15380
  overviewP
15381
15381
  ]);
15382
- _task.logger.info(`抖音用户信息响应: ${JSON.stringify(userProfile)}`);
15383
- _task.logger.info(`抖音近7日数据响应: ${JSON.stringify(overview)}`);
15384
15382
  let fansNum = 0;
15385
15383
  let favedNum = 0;
15386
15384
  let followingNum = 0;
@@ -15464,7 +15462,6 @@ async function getShipinhaoData(_task, params) {
15464
15462
  retryDelay: 100,
15465
15463
  timeout: 5000
15466
15464
  });
15467
- _task.logger.info(`视频号账号数据响应: ${JSON.stringify(authData)}`);
15468
15465
  const AUTH_ERROR_CODES = [
15469
15466
  300333,
15470
15467
  300334,
@@ -15481,13 +15478,60 @@ async function getShipinhaoData(_task, params) {
15481
15478
  return types_errorResponse(`视频号账号信息获取失败:${authData.errMsg || "未知错误"}`, 414);
15482
15479
  }
15483
15480
  const finderUser = authData.data?.finderUser;
15481
+ const now = new Date();
15482
+ const yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 2);
15483
+ const startTs = Math.floor(yesterday.getTime() / 1000);
15484
+ const endTs = startTs + 86400;
15485
+ _task.logger.info(`视频号昨日数据范围 start: ${startTs} ~ end: ${endTs}`);
15486
+ let fansNumYesterday = 0;
15487
+ let playNumYesterday = 0;
15488
+ let likeNumYesterday = 0;
15489
+ let commentNumYesterday = 0;
15490
+ try {
15491
+ const statsData = await http.api({
15492
+ method: "post",
15493
+ url: "https://channels.weixin.qq.com/cgi-bin/mmfinderassistant-bin/statistic/new_post_total_data",
15494
+ params: {
15495
+ _aid: aid,
15496
+ _rid: `${Date.now().toString(16)}-${Math.random().toString(36).substring(2, 9)}`,
15497
+ _pageUrl: encodeURIComponent("https://channels.weixin.qq.com/platform")
15498
+ },
15499
+ data: {
15500
+ startTs: startTs.toString(),
15501
+ endTs: endTs.toString(),
15502
+ interval: 3,
15503
+ timestamp: Date.now().toString(),
15504
+ _log_finder_uin: "",
15505
+ _log_finder_id: finderId,
15506
+ rawKeyBuff: "",
15507
+ pluginSessionId: null,
15508
+ scene: 7,
15509
+ reqScene: 7
15510
+ }
15511
+ }, {
15512
+ retries: 3,
15513
+ retryDelay: 100,
15514
+ timeout: 5000
15515
+ });
15516
+ if (!statsData.errCode && statsData.data?.totalData) {
15517
+ const data = statsData.data.totalData;
15518
+ fansNumYesterday = Number.parseInt(data.follow?.[1] || "0", 10) || 0;
15519
+ playNumYesterday = Number.parseInt(data.browse?.[1] || "0", 10) || 0;
15520
+ likeNumYesterday = Number.parseInt(data.like?.[1] || "0", 10) || 0;
15521
+ commentNumYesterday = Number.parseInt(data.comment?.[1] || "0", 10) || 0;
15522
+ _task.logger.info(`视频号昨日数据提取成功 - 净增关注:${fansNumYesterday}, 播放:${playNumYesterday}, 喜欢:${likeNumYesterday}, 评论:${commentNumYesterday}`);
15523
+ }
15524
+ } catch (error) {
15525
+ const errMsg = error instanceof Error ? error.message : String(error);
15526
+ _task.logger.warn(`视频号昨日数据获取失败(降级为null): ${errMsg}`);
15527
+ }
15484
15528
  const shipinhaoData = {
15485
15529
  fansNum: finderUser?.fansCount || 0,
15486
15530
  feedsCount: finderUser?.feedsCount || 0,
15487
- fansNumYesterday: null,
15488
- playNumYesterday: null,
15489
- likeNumYesterday: null,
15490
- commentNumYesterday: null
15531
+ fansNumYesterday,
15532
+ playNumYesterday,
15533
+ likeNumYesterday,
15534
+ commentNumYesterday
15491
15535
  };
15492
15536
  return (0, __WEBPACK_EXTERNAL_MODULE__iflyrpa_share_f7afdc8c__.success)(shipinhaoData, "视频号平台数据获取成功!");
15493
15537
  } catch (error) {
@@ -15808,7 +15852,8 @@ const ShipinhaoArticleSchema = BaseArticleSchema.extend({
15808
15852
  favNum: schemas_number(),
15809
15853
  objectId: schemas_string(),
15810
15854
  postType: schemas_string(),
15811
- postStatus: schemas_number()
15855
+ postStatus: schemas_number(),
15856
+ effectiveTime: schemas_number().optional()
15812
15857
  });
15813
15858
  const FetchArticlesDataSchema = schemas_object({
15814
15859
  articleCell: schemas_array(union([
@@ -15942,7 +15987,8 @@ async function handleBaijiahaoData(_task, params) {
15942
15987
  }
15943
15988
  async function handleDouyinData(_task, params) {
15944
15989
  try {
15945
- const { cookies, pageNum = 1, pageSize = 12, status = 0, showOriginalData = false, onlySuccess = false } = params;
15990
+ const { cookies, pageSize = 12, status = 0, showOriginalData = false, onlySuccess = false } = params;
15991
+ const pageNum = params.pageNum || 1;
15946
15992
  const headers = {
15947
15993
  cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
15948
15994
  referer: "https://creator.douyin.com"
@@ -16037,7 +16083,8 @@ async function handleDouyinData(_task, params) {
16037
16083
  }
16038
16084
  async function handleShipinhaoData(_task, params) {
16039
16085
  try {
16040
- const { cookies, postType = "all", pageNum = 1, pageSize = 10, showOriginalData = false } = params;
16086
+ const { cookies, postType = "all", pageSize = 10, showOriginalData = false } = params;
16087
+ const pageNum = params.pageNum || 1;
16041
16088
  const aidCookie = cookies.find((it)=>"_aid" === it.name)?.value;
16042
16089
  const aid = aidCookie || "9d3e0e9f-b842-498d-a273-4285d58df264";
16043
16090
  const uinCookie = cookies.find((it)=>"uin" === it.name || "wxuin" === it.name)?.value || "0000000000";
@@ -16142,6 +16189,9 @@ async function handleShipinhaoData(_task, params) {
16142
16189
  objectId: item.exportId || item.objectId || "",
16143
16190
  postType: forcePostType,
16144
16191
  postStatus: item.status || item.post_status || 0,
16192
+ ...item.effectiveTime ? {
16193
+ effectiveTime: item.effectiveTime
16194
+ } : {},
16145
16195
  ...showOriginalData ? {
16146
16196
  originalData: item
16147
16197
  } : {}
@@ -25545,4 +25595,4 @@ var __webpack_exports__version = package_namespaceObject.i8;
25545
25595
  export { Action, ActionCommonParamsSchema, BaijiahaoPublishParamsSchema, BetaFlag, CollectionDetailSchema, ConfigDataSchema, DouyinCheckVerifyQrCodeParamsSchema, DouyinCreateCommentReplyParamsSchema, DouyinGetCollectionParamsSchema, DouyinGetCommentListParamsSchema, DouyinGetCommentReplyListParamsSchema, DouyinGetHotParamsSchema, DouyinGetLocationParamsSchema, DouyinGetMusicByCategoryParamsSchema, DouyinGetMusicCategoryParamsSchema, DouyinGetMusicParamsSchema, DouyinGetTopicsParamsSchema, DouyinGetVerifyQrCodeParamsSchema, DouyinGetWorkListParamsSchema, DouyinPublishParamsSchema, FetchArticlesDataSchema, FetchArticlesParamsSchema, Http, ProxyAgent, SearchAccountInfoParamsSchema, SessionCheckResultSchema, ShipinhaoCheckLinkValidateParamsSchema, ShipinhaoGetLocationParamsSchema, ShipinhaoGetMsgParamsSchema, ShipinhaoPublishParamsSchema, ShipinhaoSendMsgParamsSchema, ToutiaoPublishParamsSchema, UnreadCountSchema, WeixinPublishParamsSchema, WxBjhSessionParamsSchema, XhsWebSearchParamsSchema, XiaohongshuPublishParamsSchema, bjhConfigDataSchema, douyinConfigDataSchema, getFileState, reportLogger, rpaAction_Server_Mock, shipinhaoConfigDataSchema, ttConfigDataSchema, wxConfigDataSchema, xhsConfigDataSchema, __webpack_exports__version as version };
25546
25596
 
25547
25597
  //# sourceMappingURL=index.mjs.map
25548
- //# debugId=83bb856e-4161-51e9-bcc6-bc0ff84cc5f0
25598
+ //# debugId=5b45922a-a009-5f6b-94f9-b400b59b5510