@iflyrpa/actions 4.0.3 → 4.0.4-beta.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/dist/bundle.js CHANGED
@@ -495,6 +495,433 @@ var __webpack_modules__ = {
495
495
  this.emit('error', err);
496
496
  };
497
497
  },
498
+ "../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/browser.js": function(module, exports1, __webpack_require__) {
499
+ exports1.formatArgs = formatArgs;
500
+ exports1.save = save;
501
+ exports1.load = load;
502
+ exports1.useColors = useColors;
503
+ exports1.storage = localstorage();
504
+ exports1.destroy = (()=>{
505
+ let warned = false;
506
+ return ()=>{
507
+ if (!warned) {
508
+ warned = true;
509
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
510
+ }
511
+ };
512
+ })();
513
+ exports1.colors = [
514
+ '#0000CC',
515
+ '#0000FF',
516
+ '#0033CC',
517
+ '#0033FF',
518
+ '#0066CC',
519
+ '#0066FF',
520
+ '#0099CC',
521
+ '#0099FF',
522
+ '#00CC00',
523
+ '#00CC33',
524
+ '#00CC66',
525
+ '#00CC99',
526
+ '#00CCCC',
527
+ '#00CCFF',
528
+ '#3300CC',
529
+ '#3300FF',
530
+ '#3333CC',
531
+ '#3333FF',
532
+ '#3366CC',
533
+ '#3366FF',
534
+ '#3399CC',
535
+ '#3399FF',
536
+ '#33CC00',
537
+ '#33CC33',
538
+ '#33CC66',
539
+ '#33CC99',
540
+ '#33CCCC',
541
+ '#33CCFF',
542
+ '#6600CC',
543
+ '#6600FF',
544
+ '#6633CC',
545
+ '#6633FF',
546
+ '#66CC00',
547
+ '#66CC33',
548
+ '#9900CC',
549
+ '#9900FF',
550
+ '#9933CC',
551
+ '#9933FF',
552
+ '#99CC00',
553
+ '#99CC33',
554
+ '#CC0000',
555
+ '#CC0033',
556
+ '#CC0066',
557
+ '#CC0099',
558
+ '#CC00CC',
559
+ '#CC00FF',
560
+ '#CC3300',
561
+ '#CC3333',
562
+ '#CC3366',
563
+ '#CC3399',
564
+ '#CC33CC',
565
+ '#CC33FF',
566
+ '#CC6600',
567
+ '#CC6633',
568
+ '#CC9900',
569
+ '#CC9933',
570
+ '#CCCC00',
571
+ '#CCCC33',
572
+ '#FF0000',
573
+ '#FF0033',
574
+ '#FF0066',
575
+ '#FF0099',
576
+ '#FF00CC',
577
+ '#FF00FF',
578
+ '#FF3300',
579
+ '#FF3333',
580
+ '#FF3366',
581
+ '#FF3399',
582
+ '#FF33CC',
583
+ '#FF33FF',
584
+ '#FF6600',
585
+ '#FF6633',
586
+ '#FF9900',
587
+ '#FF9933',
588
+ '#FFCC00',
589
+ '#FFCC33'
590
+ ];
591
+ function useColors() {
592
+ if ('undefined' != typeof window && window.process && ('renderer' === window.process.type || window.process.__nwjs)) return true;
593
+ if ('undefined' != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return false;
594
+ let m;
595
+ return 'undefined' != typeof document && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || 'undefined' != typeof window && window.console && (window.console.firebug || window.console.exception && window.console.table) || 'undefined' != typeof navigator && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || 'undefined' != typeof navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
596
+ }
597
+ function formatArgs(args) {
598
+ args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
599
+ if (!this.useColors) return;
600
+ const c = 'color: ' + this.color;
601
+ args.splice(1, 0, c, 'color: inherit');
602
+ let index = 0;
603
+ let lastC = 0;
604
+ args[0].replace(/%[a-zA-Z%]/g, (match)=>{
605
+ if ('%%' === match) return;
606
+ index++;
607
+ if ('%c' === match) lastC = index;
608
+ });
609
+ args.splice(lastC, 0, c);
610
+ }
611
+ exports1.log = console.debug || console.log || (()=>{});
612
+ function save(namespaces) {
613
+ try {
614
+ if (namespaces) exports1.storage.setItem('debug', namespaces);
615
+ else exports1.storage.removeItem('debug');
616
+ } catch (error) {}
617
+ }
618
+ function load() {
619
+ let r;
620
+ try {
621
+ r = exports1.storage.getItem('debug');
622
+ } catch (error) {}
623
+ if (!r && 'undefined' != typeof process && 'env' in process) r = process.env.DEBUG;
624
+ return r;
625
+ }
626
+ function localstorage() {
627
+ try {
628
+ return localStorage;
629
+ } catch (error) {}
630
+ }
631
+ module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/common.js")(exports1);
632
+ const { formatters } = module.exports;
633
+ formatters.j = function(v) {
634
+ try {
635
+ return JSON.stringify(v);
636
+ } catch (error) {
637
+ return '[UnexpectedJSONParseError]: ' + error.message;
638
+ }
639
+ };
640
+ },
641
+ "../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/common.js": function(module, __unused_webpack_exports, __webpack_require__) {
642
+ function setup(env) {
643
+ createDebug.debug = createDebug;
644
+ createDebug.default = createDebug;
645
+ createDebug.coerce = coerce;
646
+ createDebug.disable = disable;
647
+ createDebug.enable = enable;
648
+ createDebug.enabled = enabled;
649
+ createDebug.humanize = __webpack_require__("../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js");
650
+ createDebug.destroy = destroy;
651
+ Object.keys(env).forEach((key)=>{
652
+ createDebug[key] = env[key];
653
+ });
654
+ createDebug.names = [];
655
+ createDebug.skips = [];
656
+ createDebug.formatters = {};
657
+ function selectColor(namespace) {
658
+ let hash = 0;
659
+ for(let i = 0; i < namespace.length; i++){
660
+ hash = (hash << 5) - hash + namespace.charCodeAt(i);
661
+ hash |= 0;
662
+ }
663
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
664
+ }
665
+ createDebug.selectColor = selectColor;
666
+ function createDebug(namespace) {
667
+ let prevTime;
668
+ let enableOverride = null;
669
+ let namespacesCache;
670
+ let enabledCache;
671
+ function debug(...args) {
672
+ if (!debug.enabled) return;
673
+ const self1 = debug;
674
+ const curr = Number(new Date());
675
+ const ms = curr - (prevTime || curr);
676
+ self1.diff = ms;
677
+ self1.prev = prevTime;
678
+ self1.curr = curr;
679
+ prevTime = curr;
680
+ args[0] = createDebug.coerce(args[0]);
681
+ if ('string' != typeof args[0]) args.unshift('%O');
682
+ let index = 0;
683
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format)=>{
684
+ if ('%%' === match) return '%';
685
+ index++;
686
+ const formatter = createDebug.formatters[format];
687
+ if ('function' == typeof formatter) {
688
+ const val = args[index];
689
+ match = formatter.call(self1, val);
690
+ args.splice(index, 1);
691
+ index--;
692
+ }
693
+ return match;
694
+ });
695
+ createDebug.formatArgs.call(self1, args);
696
+ const logFn = self1.log || createDebug.log;
697
+ logFn.apply(self1, args);
698
+ }
699
+ debug.namespace = namespace;
700
+ debug.useColors = createDebug.useColors();
701
+ debug.color = createDebug.selectColor(namespace);
702
+ debug.extend = extend;
703
+ debug.destroy = createDebug.destroy;
704
+ Object.defineProperty(debug, 'enabled', {
705
+ enumerable: true,
706
+ configurable: false,
707
+ get: ()=>{
708
+ if (null !== enableOverride) return enableOverride;
709
+ if (namespacesCache !== createDebug.namespaces) {
710
+ namespacesCache = createDebug.namespaces;
711
+ enabledCache = createDebug.enabled(namespace);
712
+ }
713
+ return enabledCache;
714
+ },
715
+ set: (v)=>{
716
+ enableOverride = v;
717
+ }
718
+ });
719
+ if ('function' == typeof createDebug.init) createDebug.init(debug);
720
+ return debug;
721
+ }
722
+ function extend(namespace, delimiter) {
723
+ const newDebug = createDebug(this.namespace + (void 0 === delimiter ? ':' : delimiter) + namespace);
724
+ newDebug.log = this.log;
725
+ return newDebug;
726
+ }
727
+ function enable(namespaces) {
728
+ createDebug.save(namespaces);
729
+ createDebug.namespaces = namespaces;
730
+ createDebug.names = [];
731
+ createDebug.skips = [];
732
+ let i;
733
+ const split = ('string' == typeof namespaces ? namespaces : '').split(/[\s,]+/);
734
+ const len = split.length;
735
+ for(i = 0; i < len; i++)if (!!split[i]) {
736
+ namespaces = split[i].replace(/\*/g, '.*?');
737
+ if ('-' === namespaces[0]) createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
738
+ else createDebug.names.push(new RegExp('^' + namespaces + '$'));
739
+ }
740
+ }
741
+ function disable() {
742
+ const namespaces = [
743
+ ...createDebug.names.map(toNamespace),
744
+ ...createDebug.skips.map(toNamespace).map((namespace)=>'-' + namespace)
745
+ ].join(',');
746
+ createDebug.enable('');
747
+ return namespaces;
748
+ }
749
+ function enabled(name) {
750
+ if ('*' === name[name.length - 1]) return true;
751
+ let i;
752
+ let len;
753
+ for(i = 0, len = createDebug.skips.length; i < len; i++)if (createDebug.skips[i].test(name)) return false;
754
+ for(i = 0, len = createDebug.names.length; i < len; i++)if (createDebug.names[i].test(name)) return true;
755
+ return false;
756
+ }
757
+ function toNamespace(regexp) {
758
+ return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, '*');
759
+ }
760
+ function coerce(val) {
761
+ if (val instanceof Error) return val.stack || val.message;
762
+ return val;
763
+ }
764
+ function destroy() {
765
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
766
+ }
767
+ createDebug.enable(createDebug.load());
768
+ return createDebug;
769
+ }
770
+ module.exports = setup;
771
+ },
772
+ "../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/index.js": function(module, __unused_webpack_exports, __webpack_require__) {
773
+ if ('undefined' == typeof process || 'renderer' === process.type || true === process.browser || process.__nwjs) module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/browser.js");
774
+ else module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/node.js");
775
+ },
776
+ "../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/node.js": function(module, exports1, __webpack_require__) {
777
+ const tty = __webpack_require__("tty");
778
+ const util = __webpack_require__("util");
779
+ exports1.init = init;
780
+ exports1.log = log;
781
+ exports1.formatArgs = formatArgs;
782
+ exports1.save = save;
783
+ exports1.load = load;
784
+ exports1.useColors = useColors;
785
+ exports1.destroy = util.deprecate(()=>{}, 'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
786
+ exports1.colors = [
787
+ 6,
788
+ 2,
789
+ 3,
790
+ 4,
791
+ 5,
792
+ 1
793
+ ];
794
+ try {
795
+ const supportsColor = __webpack_require__("../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js");
796
+ if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports1.colors = [
797
+ 20,
798
+ 21,
799
+ 26,
800
+ 27,
801
+ 32,
802
+ 33,
803
+ 38,
804
+ 39,
805
+ 40,
806
+ 41,
807
+ 42,
808
+ 43,
809
+ 44,
810
+ 45,
811
+ 56,
812
+ 57,
813
+ 62,
814
+ 63,
815
+ 68,
816
+ 69,
817
+ 74,
818
+ 75,
819
+ 76,
820
+ 77,
821
+ 78,
822
+ 79,
823
+ 80,
824
+ 81,
825
+ 92,
826
+ 93,
827
+ 98,
828
+ 99,
829
+ 112,
830
+ 113,
831
+ 128,
832
+ 129,
833
+ 134,
834
+ 135,
835
+ 148,
836
+ 149,
837
+ 160,
838
+ 161,
839
+ 162,
840
+ 163,
841
+ 164,
842
+ 165,
843
+ 166,
844
+ 167,
845
+ 168,
846
+ 169,
847
+ 170,
848
+ 171,
849
+ 172,
850
+ 173,
851
+ 178,
852
+ 179,
853
+ 184,
854
+ 185,
855
+ 196,
856
+ 197,
857
+ 198,
858
+ 199,
859
+ 200,
860
+ 201,
861
+ 202,
862
+ 203,
863
+ 204,
864
+ 205,
865
+ 206,
866
+ 207,
867
+ 208,
868
+ 209,
869
+ 214,
870
+ 215,
871
+ 220,
872
+ 221
873
+ ];
874
+ } catch (error) {}
875
+ exports1.inspectOpts = Object.keys(process.env).filter((key)=>/^debug_/i.test(key)).reduce((obj, key)=>{
876
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k)=>k.toUpperCase());
877
+ let val = process.env[key];
878
+ val = /^(yes|on|true|enabled)$/i.test(val) ? true : /^(no|off|false|disabled)$/i.test(val) ? false : 'null' === val ? null : Number(val);
879
+ obj[prop] = val;
880
+ return obj;
881
+ }, {});
882
+ function useColors() {
883
+ return 'colors' in exports1.inspectOpts ? Boolean(exports1.inspectOpts.colors) : tty.isatty(process.stderr.fd);
884
+ }
885
+ function formatArgs(args) {
886
+ const { namespace: name, useColors } = this;
887
+ if (useColors) {
888
+ const c = this.color;
889
+ const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
890
+ const prefix = ` ${colorCode};1m${name} \u001B[0m`;
891
+ args[0] = prefix + args[0].split('\n').join('\n' + prefix);
892
+ args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
893
+ } else args[0] = getDate() + name + ' ' + args[0];
894
+ }
895
+ function getDate() {
896
+ if (exports1.inspectOpts.hideDate) return '';
897
+ return new Date().toISOString() + ' ';
898
+ }
899
+ function log(...args) {
900
+ return process.stderr.write(util.formatWithOptions(exports1.inspectOpts, ...args) + '\n');
901
+ }
902
+ function save(namespaces) {
903
+ if (namespaces) process.env.DEBUG = namespaces;
904
+ else delete process.env.DEBUG;
905
+ }
906
+ function load() {
907
+ return process.env.DEBUG;
908
+ }
909
+ function init(debug) {
910
+ debug.inspectOpts = {};
911
+ const keys = Object.keys(exports1.inspectOpts);
912
+ for(let i = 0; i < keys.length; i++)debug.inspectOpts[keys[i]] = exports1.inspectOpts[keys[i]];
913
+ }
914
+ module.exports = __webpack_require__("../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/common.js")(exports1);
915
+ const { formatters } = module.exports;
916
+ formatters.o = function(v) {
917
+ this.inspectOpts.colors = this.useColors;
918
+ return util.inspect(v, this.inspectOpts).split('\n').map((str)=>str.trim()).join(' ');
919
+ };
920
+ formatters.O = function(v) {
921
+ this.inspectOpts.colors = this.useColors;
922
+ return util.inspect(v, this.inspectOpts);
923
+ };
924
+ },
498
925
  "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js": function(module, exports1, __webpack_require__) {
499
926
  exports1.formatArgs = formatArgs;
500
927
  exports1.save = save;
@@ -1015,7 +1442,7 @@ var __webpack_modules__ = {
1015
1442
  module.exports = function() {
1016
1443
  if (!debug) {
1017
1444
  try {
1018
- debug = __webpack_require__("../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js")("follow-redirects");
1445
+ debug = __webpack_require__("../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/index.js")("follow-redirects");
1019
1446
  } catch (error) {}
1020
1447
  if ("function" != typeof debug) debug = function() {};
1021
1448
  }
@@ -4147,6 +4574,91 @@ var __webpack_modules__ = {
4147
4574
  });
4148
4575
  }
4149
4576
  },
4577
+ "../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js": function(module) {
4578
+ var s = 1000;
4579
+ var m = 60 * s;
4580
+ var h = 60 * m;
4581
+ var d = 24 * h;
4582
+ var w = 7 * d;
4583
+ var y = 365.25 * d;
4584
+ module.exports = function(val, options) {
4585
+ options = options || {};
4586
+ var type = typeof val;
4587
+ if ('string' === type && val.length > 0) return parse(val);
4588
+ if ('number' === type && isFinite(val)) return options.long ? fmtLong(val) : fmtShort(val);
4589
+ throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
4590
+ };
4591
+ function parse(str) {
4592
+ str = String(str);
4593
+ if (str.length > 100) return;
4594
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
4595
+ if (!match) return;
4596
+ var n = parseFloat(match[1]);
4597
+ var type = (match[2] || 'ms').toLowerCase();
4598
+ switch(type){
4599
+ case 'years':
4600
+ case 'year':
4601
+ case 'yrs':
4602
+ case 'yr':
4603
+ case 'y':
4604
+ return n * y;
4605
+ case 'weeks':
4606
+ case 'week':
4607
+ case 'w':
4608
+ return n * w;
4609
+ case 'days':
4610
+ case 'day':
4611
+ case 'd':
4612
+ return n * d;
4613
+ case 'hours':
4614
+ case 'hour':
4615
+ case 'hrs':
4616
+ case 'hr':
4617
+ case 'h':
4618
+ return n * h;
4619
+ case 'minutes':
4620
+ case 'minute':
4621
+ case 'mins':
4622
+ case 'min':
4623
+ case 'm':
4624
+ return n * m;
4625
+ case 'seconds':
4626
+ case 'second':
4627
+ case 'secs':
4628
+ case 'sec':
4629
+ case 's':
4630
+ return n * s;
4631
+ case 'milliseconds':
4632
+ case 'millisecond':
4633
+ case 'msecs':
4634
+ case 'msec':
4635
+ case 'ms':
4636
+ return n;
4637
+ default:
4638
+ return;
4639
+ }
4640
+ }
4641
+ function fmtShort(ms) {
4642
+ var msAbs = Math.abs(ms);
4643
+ if (msAbs >= d) return Math.round(ms / d) + 'd';
4644
+ if (msAbs >= h) return Math.round(ms / h) + 'h';
4645
+ if (msAbs >= m) return Math.round(ms / m) + 'm';
4646
+ if (msAbs >= s) return Math.round(ms / s) + 's';
4647
+ return ms + 'ms';
4648
+ }
4649
+ function fmtLong(ms) {
4650
+ var msAbs = Math.abs(ms);
4651
+ if (msAbs >= d) return plural(ms, msAbs, d, 'day');
4652
+ if (msAbs >= h) return plural(ms, msAbs, h, 'hour');
4653
+ if (msAbs >= m) return plural(ms, msAbs, m, 'minute');
4654
+ if (msAbs >= s) return plural(ms, msAbs, s, 'second');
4655
+ return ms + ' ms';
4656
+ }
4657
+ function plural(ms, msAbs, n, name) {
4658
+ var isPlural = msAbs >= 1.5 * n;
4659
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
4660
+ }
4661
+ },
4150
4662
  "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js": function(module) {
4151
4663
  var s = 1000;
4152
4664
  var m = 60 * s;
@@ -11976,9 +12488,7 @@ var __webpack_exports__ = {};
11976
12488
  var package_namespaceObject = {
11977
12489
  i8: "0.1.2"
11978
12490
  };
11979
- var package_namespaceObject_0 = {
11980
- i8: "4.0.3"
11981
- };
12491
+ var package_namespaceObject_0 = JSON.parse('{"i8":"4.0.4-beta.1"}');
11982
12492
  const external_node_fs_namespaceObject = require("node:fs");
11983
12493
  var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
11984
12494
  const external_node_http_namespaceObject = require("node:http");
@@ -39920,6 +40430,199 @@ var __webpack_exports__ = {};
39920
40430
  };
39921
40431
  return success(bjhData, "百家号平台数据获取成功!");
39922
40432
  }
40433
+ async function getDouyinData(_task, params) {
40434
+ try {
40435
+ const sessionidCookie = params.cookies.find((it)=>"sessionid" === it.name)?.value;
40436
+ if (!sessionidCookie) return types_errorResponse("抖音账号数据异常,请重新绑定账号后重试。", 414);
40437
+ const csrfToken = params.cookies.find((it)=>"passport_csrf_token" === it.name)?.value || "";
40438
+ const headers = {
40439
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
40440
+ referer: "https://creator.douyin.com/creator-micro/home",
40441
+ origin: "https://creator.douyin.com",
40442
+ "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36",
40443
+ ...csrfToken ? {
40444
+ "x-secsdk-csrf-token": csrfToken
40445
+ } : {}
40446
+ };
40447
+ const args = [
40448
+ {
40449
+ headers
40450
+ },
40451
+ _task.logger,
40452
+ params.proxyLoc,
40453
+ params.localIP,
40454
+ params.accountId
40455
+ ];
40456
+ const http = new Http(...args);
40457
+ const toNum = (val)=>{
40458
+ if (null == val) return 0;
40459
+ const n = Number.parseInt(String(val).replace(/[+,]/g, ""), 10);
40460
+ return Number.isNaN(n) ? 0 : n;
40461
+ };
40462
+ const userProfileP = http.api({
40463
+ method: "get",
40464
+ url: "https://www.douyin.com/aweme/v1/web/user/profile/self/",
40465
+ params: {
40466
+ device_platform: "webapp",
40467
+ aid: "6383",
40468
+ channel: "channel_pc_web",
40469
+ pc_client_type: "1",
40470
+ version_code: "170400",
40471
+ version_name: "17.4.0",
40472
+ cookie_enabled: "true",
40473
+ platform: "PC"
40474
+ }
40475
+ }, {
40476
+ retries: 3,
40477
+ retryDelay: 100,
40478
+ timeout: 10000
40479
+ }).catch((e)=>{
40480
+ _task.logger.warn(`抖音用户信息获取失败: ${e instanceof Error ? e.message : String(e)}`);
40481
+ return null;
40482
+ });
40483
+ const overviewP = http.api({
40484
+ method: "get",
40485
+ url: "https://creator.douyin.com/aweme/janus/creator/data/overview/all/",
40486
+ params: {
40487
+ last_days_type: 1,
40488
+ aid: 2906,
40489
+ app_name: "aweme_creator_platform",
40490
+ device_platform: "web"
40491
+ }
40492
+ }, {
40493
+ retries: 3,
40494
+ retryDelay: 100,
40495
+ timeout: 5000
40496
+ }).catch((e)=>{
40497
+ _task.logger.warn(`抖音近7日数据获取失败(可能未开通数据中心或被风控): ${e instanceof Error ? e.message : String(e)}`);
40498
+ return null;
40499
+ });
40500
+ const [userProfile, overview] = await Promise.all([
40501
+ userProfileP,
40502
+ overviewP
40503
+ ]);
40504
+ _task.logger.info(`抖音用户信息响应: ${JSON.stringify(userProfile)}`);
40505
+ _task.logger.info(`抖音近7日数据响应: ${JSON.stringify(overview)}`);
40506
+ let fansNum = 0;
40507
+ let favedNum = 0;
40508
+ let followingNum = 0;
40509
+ if (userProfile?.status_code === 0 && userProfile.user) {
40510
+ const user = userProfile.user;
40511
+ fansNum = toNum(user.follower_count);
40512
+ followingNum = toNum(user.following_count);
40513
+ favedNum = toNum(user.total_favorited);
40514
+ _task.logger.info(`提取用户数据 - 昵称: ${user.nickname}, 粉丝: ${fansNum}, 关注: ${followingNum}, 获赞: ${favedNum}, 作品: ${user.aweme_count}`);
40515
+ } else _task.logger.warn(`用户信息接口返回异常: status_code=${userProfile?.status_code}, msg=${userProfile?.status_msg}`);
40516
+ const ov = overview?.data;
40517
+ const douyinData = {
40518
+ fansNum,
40519
+ favedNum,
40520
+ fansNumLastWeek: toNum(ov?.fans_incr?.current_count),
40521
+ watchNumLastWeek: toNum(ov?.play_count?.current_count),
40522
+ likeNumLastWeek: toNum(ov?.like_count?.current_count),
40523
+ commentNumLastWeek: toNum(ov?.comment_count?.current_count),
40524
+ shareNumLastWeek: toNum(ov?.share_count?.current_count),
40525
+ visitNumLastWeek: toNum(ov?.profile_visit?.current_count)
40526
+ };
40527
+ return success(douyinData, "抖音平台数据获取成功!");
40528
+ } catch (error) {
40529
+ if (error && "object" == typeof error && "code" in error && "message" in error) {
40530
+ const err = error;
40531
+ _task.logger.error(`抖音账号数据获取失败: ${err.message} (${err.code})`);
40532
+ return types_errorResponse(err.message, err.code);
40533
+ }
40534
+ const errMsg = error instanceof Error ? error.message : String(error);
40535
+ _task.logger.error(`抖音账号数据获取失败: ${errMsg}`);
40536
+ return types_errorResponse(errMsg || "抖音账号数据获取失败");
40537
+ }
40538
+ }
40539
+ async function getShipinhaoData(_task, params) {
40540
+ try {
40541
+ const sessionidCookie = params.cookies.find((it)=>"sessionid" === it.name)?.value;
40542
+ if (!sessionidCookie) return types_errorResponse("视频号账号数据异常,请重新绑定账号后重试。", 414);
40543
+ const uinCookie = params.cookies.find((it)=>"uin" === it.name || "wxuin" === it.name)?.value || "0000000000";
40544
+ const deviceIdCookie = params.cookies.find((it)=>"device_id" === it.name || "finger_print_device_id" === it.name)?.value;
40545
+ const aid = params.cookies.find((it)=>"_aid" === it.name)?.value || "9d3e0e9f-b842-498d-a273-4285d58df264";
40546
+ const finderId = params.cookies.find((it)=>"_log_finder_id" === it.name || "finder_id" === it.name)?.value || "";
40547
+ const headers = {
40548
+ cookie: params.cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
40549
+ referer: "https://channels.weixin.qq.com/platform",
40550
+ origin: "https://channels.weixin.qq.com",
40551
+ "content-type": "application/json",
40552
+ "X-WECHAT-UIN": uinCookie,
40553
+ ...deviceIdCookie ? {
40554
+ "finger-print-device-id": deviceIdCookie
40555
+ } : {}
40556
+ };
40557
+ const args = [
40558
+ {
40559
+ headers
40560
+ },
40561
+ _task.logger,
40562
+ params.proxyLoc,
40563
+ params.localIP,
40564
+ params.accountId
40565
+ ];
40566
+ const http = new Http(...args);
40567
+ const authData = await http.api({
40568
+ method: "post",
40569
+ url: "https://channels.weixin.qq.com/cgi-bin/mmfinderassistant-bin/auth/auth_data",
40570
+ params: {
40571
+ _aid: aid,
40572
+ _rid: `${Date.now().toString(16)}-${Math.random().toString(36).substring(2, 9)}`,
40573
+ _pageUrl: encodeURIComponent("https://channels.weixin.qq.com/platform")
40574
+ },
40575
+ data: {
40576
+ timestamp: Date.now().toString(),
40577
+ _log_finder_uin: "",
40578
+ _log_finder_id: finderId,
40579
+ rawKeyBuff: "",
40580
+ pluginSessionId: null,
40581
+ scene: 7,
40582
+ reqScene: 7
40583
+ }
40584
+ }, {
40585
+ retries: 3,
40586
+ retryDelay: 100,
40587
+ timeout: 5000
40588
+ });
40589
+ _task.logger.info(`视频号账号数据响应: ${JSON.stringify(authData)}`);
40590
+ const AUTH_ERROR_CODES = [
40591
+ 300333,
40592
+ 300334,
40593
+ 300330,
40594
+ 300331,
40595
+ 300332
40596
+ ];
40597
+ if (authData.errCode && AUTH_ERROR_CODES.includes(authData.errCode)) {
40598
+ _task.logger.warn(`视频号登录已失效:${authData.errMsg} (${authData.errCode})`);
40599
+ return types_errorResponse("视频号账号信息获取失败,请检查账号状态", 414);
40600
+ }
40601
+ if (authData.errCode) {
40602
+ _task.logger.warn(`视频号账号API错误:${authData.errMsg} (${authData.errCode})`);
40603
+ return types_errorResponse(`视频号账号信息获取失败:${authData.errMsg || "未知错误"}`, 414);
40604
+ }
40605
+ const finderUser = authData.data?.finderUser;
40606
+ const shipinhaoData = {
40607
+ fansNum: finderUser?.fansCount || 0,
40608
+ feedsCount: finderUser?.feedsCount || 0,
40609
+ fansNumYesterday: null,
40610
+ playNumYesterday: null,
40611
+ likeNumYesterday: null,
40612
+ commentNumYesterday: null
40613
+ };
40614
+ return success(shipinhaoData, "视频号平台数据获取成功!");
40615
+ } catch (error) {
40616
+ if (error && "object" == typeof error && "code" in error && "message" in error) {
40617
+ const err = error;
40618
+ _task.logger.error(`视频号账号数据获取失败: ${err.message} (${err.code})`);
40619
+ return types_errorResponse(err.message, err.code);
40620
+ }
40621
+ const errMsg = error instanceof Error ? error.message : String(error);
40622
+ _task.logger.error(`视频号账号数据获取失败: ${errMsg}`);
40623
+ return types_errorResponse(errMsg || "视频号账号数据获取失败");
40624
+ }
40625
+ }
39923
40626
  async function getToutiaoData(_task, params) {
39924
40627
  const http = new Http({
39925
40628
  headers: {
@@ -40018,7 +40721,7 @@ var __webpack_exports__ = {};
40018
40721
  userInfoHtmlPromise,
40019
40722
  userSummaryHtmlPromise
40020
40723
  ]);
40021
- if (userInfoHtml.includes("请重新<a id='jumpUrl' href='/'>登录</a>")) return types_errorResponse("Token已失效,请重新获取", 414);
40724
+ if (userInfoHtml.includes("请重新<a id='jumpUrl' href='/'>登录</a>")) return types_errorResponse("微信公众号数据获取失败,请检查账号状态", 414);
40022
40725
  const userInfoJson = exportWxCgiData(userInfoHtml);
40023
40726
  const userSummaryJson = exportWxCgiData(userSummaryHtml);
40024
40727
  const wxData = {
@@ -40095,7 +40798,9 @@ var __webpack_exports__ = {};
40095
40798
  "toutiao",
40096
40799
  "xiaohongshu",
40097
40800
  "weixin",
40098
- "baijiahao"
40801
+ "baijiahao",
40802
+ "douyin",
40803
+ "shipinhao"
40099
40804
  ])
40100
40805
  });
40101
40806
  const SearchAccountInfo = async (_task, params)=>{
@@ -40109,6 +40814,10 @@ var __webpack_exports__ = {};
40109
40814
  return getWeixinData(_task, params);
40110
40815
  case "baijiahao":
40111
40816
  return getBaijiahaoData(_task, params);
40817
+ case "douyin":
40818
+ return getDouyinData(_task, params);
40819
+ case "shipinhao":
40820
+ return getShipinhaoData(_task, params);
40112
40821
  default:
40113
40822
  return success(null, "暂不支持该平台");
40114
40823
  }
@@ -40203,18 +40912,44 @@ var __webpack_exports__ = {};
40203
40912
  collectNum: classic_schemas_number(),
40204
40913
  shareNum: classic_schemas_number()
40205
40914
  });
40915
+ const DouyinArticleSchema = BaseArticleSchema.extend({
40916
+ playNum: classic_schemas_number(),
40917
+ likeNum: classic_schemas_number(),
40918
+ commentNum: classic_schemas_number(),
40919
+ shareNum: classic_schemas_number(),
40920
+ collectNum: classic_schemas_number(),
40921
+ awemeId: classic_schemas_string(),
40922
+ awemeType: classic_schemas_number(),
40923
+ duration: classic_schemas_number().optional(),
40924
+ status: classic_schemas_string(),
40925
+ publicUrl: classic_schemas_string()
40926
+ });
40927
+ const ShipinhaoArticleSchema = BaseArticleSchema.extend({
40928
+ readNum: classic_schemas_number(),
40929
+ likeNum: classic_schemas_number(),
40930
+ commentNum: classic_schemas_number(),
40931
+ forwardNum: classic_schemas_number(),
40932
+ favNum: classic_schemas_number(),
40933
+ objectId: classic_schemas_string(),
40934
+ postType: classic_schemas_string(),
40935
+ postStatus: classic_schemas_number()
40936
+ });
40206
40937
  const FetchArticlesDataSchema = classic_schemas_object({
40207
40938
  articleCell: classic_schemas_array(schemas_union([
40208
40939
  ToutiaoArticleSchema,
40209
40940
  WeixinArticleSchema,
40210
40941
  BaijiahaoArticleSchema,
40211
- XiaohongshuArticleSchema
40942
+ XiaohongshuArticleSchema,
40943
+ DouyinArticleSchema,
40944
+ ShipinhaoArticleSchema
40212
40945
  ])).optional(),
40213
40946
  timerPublish: classic_schemas_array(schemas_union([
40214
40947
  ToutiaoArticleSchema,
40215
40948
  WeixinArticleSchema,
40216
40949
  BaijiahaoArticleSchema,
40217
- XiaohongshuArticleSchema
40950
+ XiaohongshuArticleSchema,
40951
+ DouyinArticleSchema,
40952
+ ShipinhaoArticleSchema
40218
40953
  ])).optional(),
40219
40954
  pagination: classic_schemas_object({
40220
40955
  total: classic_schemas_number().optional(),
@@ -40329,6 +41064,248 @@ var __webpack_exports__ = {};
40329
41064
  return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "百家号文章数据获取失败");
40330
41065
  }
40331
41066
  }
41067
+ async function handleDouyinData(_task, params) {
41068
+ try {
41069
+ const { cookies, pageNum = 1, pageSize = 12, status = 0, showOriginalData = false, onlySuccess = false } = params;
41070
+ const headers = {
41071
+ cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
41072
+ referer: "https://creator.douyin.com"
41073
+ };
41074
+ const args = [
41075
+ {
41076
+ headers
41077
+ },
41078
+ _task.logger,
41079
+ params.proxyLoc,
41080
+ params.localIP,
41081
+ params.accountId
41082
+ ];
41083
+ const http = new Http(...args);
41084
+ async function fetchWorks(cursor) {
41085
+ return await http.api({
41086
+ method: "get",
41087
+ url: "https://creator.douyin.com/janus/douyin/creator/pc/work_list",
41088
+ params: {
41089
+ scene: "star_atlas",
41090
+ device_platform: "android",
41091
+ aid: 1128,
41092
+ status,
41093
+ count: pageSize,
41094
+ max_cursor: cursor
41095
+ }
41096
+ }, {
41097
+ retries: 3,
41098
+ retryDelay: 100,
41099
+ timeout: 5000
41100
+ });
41101
+ }
41102
+ const isHasMore = (v)=>true === v || 1 === v;
41103
+ const skipCount = (pageNum - 1) * pageSize;
41104
+ const needCount = skipCount + pageSize;
41105
+ const workListResponse = await fetchWorks(0);
41106
+ if (!workListResponse || !Array.isArray(workListResponse.aweme_list)) return searchPublishInfo_types_errorResponse("抖音数据获取失败,请检查账号状态", 414);
41107
+ const allWorks = [
41108
+ ...workListResponse.aweme_list
41109
+ ];
41110
+ let hasMore = isHasMore(workListResponse.has_more);
41111
+ let currentCursor = workListResponse.cursor ?? workListResponse.max_cursor ?? 0;
41112
+ let guard = 0;
41113
+ while(allWorks.length < needCount && hasMore && guard < 20){
41114
+ const nextPageResponse = await fetchWorks(currentCursor);
41115
+ if (!Array.isArray(nextPageResponse.aweme_list) || 0 === nextPageResponse.aweme_list.length) break;
41116
+ allWorks.push(...nextPageResponse.aweme_list);
41117
+ hasMore = isHasMore(nextPageResponse.has_more);
41118
+ currentCursor = nextPageResponse.cursor ?? nextPageResponse.max_cursor ?? currentCursor;
41119
+ guard++;
41120
+ }
41121
+ const finalWorks = allWorks.slice(skipCount, needCount);
41122
+ const articleCell = finalWorks.map((item)=>{
41123
+ const workDetailUrl = `https://creator.douyin.com/creator-micro/work-management/work-detail/${item.aweme_id}`;
41124
+ const workPublicUrl = item.share_url || `https://www.douyin.com/video/${item.aweme_id}`;
41125
+ let statusText;
41126
+ statusText = item.status?.is_delete ? "deleted" : item.status?.is_private ? "private" : item.status?.in_reviewing ? "reviewing" : "public";
41127
+ return {
41128
+ title: item.desc || "无作品描述",
41129
+ imageUrl: item.Cover?.url_list?.[0] || "",
41130
+ createTime: item.create_time,
41131
+ redirectUrl: workDetailUrl,
41132
+ playNum: item.statistics?.play_count || 0,
41133
+ likeNum: item.statistics?.digg_count || 0,
41134
+ commentNum: item.statistics?.comment_count || 0,
41135
+ shareNum: item.statistics?.share_count || 0,
41136
+ collectNum: item.statistics?.collect_count || 0,
41137
+ awemeId: item.aweme_id,
41138
+ awemeType: item.aweme_type ?? 0,
41139
+ duration: item.duration,
41140
+ status: statusText,
41141
+ publicUrl: workPublicUrl,
41142
+ ...showOriginalData ? {
41143
+ originalData: item
41144
+ } : {}
41145
+ };
41146
+ });
41147
+ return success({
41148
+ articleCell,
41149
+ ...onlySuccess ? {
41150
+ pagination: {
41151
+ total: workListResponse.total || allWorks.length,
41152
+ nextPage: hasMore,
41153
+ pageNum,
41154
+ pageSize
41155
+ }
41156
+ } : null
41157
+ }, "抖音数据获取成功");
41158
+ } catch (error) {
41159
+ return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "抖音数据获取失败");
41160
+ }
41161
+ }
41162
+ async function handleShipinhaoData(_task, params) {
41163
+ try {
41164
+ const { cookies, postType = "all", pageNum = 1, pageSize = 20, showOriginalData = false } = params;
41165
+ const aidCookie = cookies.find((it)=>"_aid" === it.name)?.value;
41166
+ const aid = aidCookie || "9d3e0e9f-b842-498d-a273-4285d58df264";
41167
+ const uinCookie = cookies.find((it)=>"uin" === it.name || "wxuin" === it.name)?.value || "0000000000";
41168
+ const deviceIdCookie = cookies.find((it)=>"device_id" === it.name || "finger_print_device_id" === it.name)?.value;
41169
+ const headers = {
41170
+ cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
41171
+ referer: "https://channels.weixin.qq.com",
41172
+ origin: "https://channels.weixin.qq.com",
41173
+ "content-type": "application/json",
41174
+ "X-WECHAT-UIN": uinCookie,
41175
+ ...deviceIdCookie ? {
41176
+ "finger-print-device-id": deviceIdCookie
41177
+ } : {}
41178
+ };
41179
+ const args = [
41180
+ {
41181
+ headers
41182
+ },
41183
+ _task.logger,
41184
+ params.proxyLoc,
41185
+ params.localIP,
41186
+ params.accountId
41187
+ ];
41188
+ const http = new Http(...args);
41189
+ const finderIdCookie = cookies.find((it)=>"_log_finder_id" === it.name || "finder_id" === it.name)?.value || "";
41190
+ async function fetchPosts(currentPage, userpageType, pageUrl) {
41191
+ return await http.api({
41192
+ method: "post",
41193
+ url: "https://channels.weixin.qq.com/micro/content/cgi-bin/mmfinderassistant-bin/post/post_list",
41194
+ params: {
41195
+ _aid: aid,
41196
+ _rid: `${Date.now().toString(16)}-${Math.random().toString(36).substring(2, 9)}`,
41197
+ _pageUrl: encodeURIComponent(pageUrl)
41198
+ },
41199
+ data: {
41200
+ pageSize,
41201
+ currentPage,
41202
+ userpageType,
41203
+ stickyOrder: true,
41204
+ timestamp: Date.now().toString(),
41205
+ _log_finder_uin: "",
41206
+ _log_finder_id: finderIdCookie,
41207
+ rawKeyBuff: "",
41208
+ pluginSessionId: null,
41209
+ scene: 7,
41210
+ reqScene: 7
41211
+ }
41212
+ }, {
41213
+ retries: 3,
41214
+ retryDelay: 100,
41215
+ timeout: 5000
41216
+ });
41217
+ }
41218
+ const mapPost = (item, forcePostType)=>{
41219
+ let imageUrl = "";
41220
+ if (item.desc?.media?.[0]?.thumbUrl) imageUrl = item.desc.media[0].thumbUrl;
41221
+ else if (item.desc?.media?.[0]?.coverUrl) imageUrl = item.desc.media[0].coverUrl;
41222
+ else if (item.cover?.url) imageUrl = item.cover.url;
41223
+ else if (item.media_url) imageUrl = item.media_url;
41224
+ const title = item.desc?.description || item.object_desc || "无标题";
41225
+ return {
41226
+ title,
41227
+ imageUrl,
41228
+ createTime: item.createTime || item.create_time,
41229
+ redirectUrl: "https://channels.weixin.qq.com/platform",
41230
+ readNum: item.readCount || item.read_count || 0,
41231
+ likeNum: item.likeCount || item.like_count || 0,
41232
+ commentNum: item.commentCount || item.comment_count || 0,
41233
+ forwardNum: item.forwardCount || item.forward_count || 0,
41234
+ favNum: item.favCount || item.fav_count || 0,
41235
+ objectId: item.exportId || item.objectId || "",
41236
+ postType: forcePostType,
41237
+ postStatus: item.status || item.post_status || 0,
41238
+ ...showOriginalData ? {
41239
+ originalData: item
41240
+ } : {}
41241
+ };
41242
+ };
41243
+ const allArticles = [];
41244
+ const needVideo = "all" === postType || "video" === postType;
41245
+ const needArticle = "all" === postType || "article" === postType;
41246
+ const AUTH_ERROR_CODES = [
41247
+ 300333,
41248
+ 300334,
41249
+ 300330,
41250
+ 300331,
41251
+ 300332
41252
+ ];
41253
+ if (needVideo) try {
41254
+ const videoPageUrl = "https://channels.weixin.qq.com/micro/content/post/list";
41255
+ const videoResponse = await fetchPosts(pageNum, 11, videoPageUrl);
41256
+ _task.logger.info(`视频号视频获取响应:${JSON.stringify(videoResponse)}`);
41257
+ if (videoResponse.errCode && AUTH_ERROR_CODES.includes(videoResponse.errCode)) throw new Error(`AUTH_ERROR:${videoResponse.errMsg || "登录已失效"}`);
41258
+ if (videoResponse.errCode) {
41259
+ _task.logger.warn(`视频号API错误:${videoResponse.errMsg} (${videoResponse.errCode})`);
41260
+ throw new Error(`视频号API错误:${videoResponse.errMsg} (${videoResponse.errCode})`);
41261
+ }
41262
+ {
41263
+ const posts = videoResponse.data?.list || videoResponse.posts || videoResponse.post_list || [];
41264
+ const videoArticles = posts.filter((item)=>item.createTime || item.create_time).map((item)=>mapPost(item, "video"));
41265
+ allArticles.push(...videoArticles);
41266
+ _task.logger.info(`视频号视频获取成功,共${videoArticles.length}条`);
41267
+ }
41268
+ } catch (error) {
41269
+ const errMsg = error instanceof Error ? error.message : String(error);
41270
+ if (errMsg.startsWith("AUTH_ERROR:")) throw error;
41271
+ _task.logger.warn(`获取视频号视频失败:${errMsg}`);
41272
+ }
41273
+ if (needArticle) try {
41274
+ const articlePageUrl = "https://channels.weixin.qq.com/micro/content/post/finderNewLifePostList";
41275
+ const articleResponse = await fetchPosts(pageNum, 10, articlePageUrl);
41276
+ if (articleResponse.errCode && AUTH_ERROR_CODES.includes(articleResponse.errCode)) throw new Error(`AUTH_ERROR:${articleResponse.errMsg || "登录已失效"}`);
41277
+ if (articleResponse.errCode) {
41278
+ _task.logger.warn(`视频号图文API错误:${articleResponse.errMsg} (${articleResponse.errCode})`);
41279
+ throw new Error(`视频号图文API错误:${articleResponse.errMsg} (${articleResponse.errCode})`);
41280
+ }
41281
+ {
41282
+ const posts = articleResponse.data?.list || articleResponse.posts || articleResponse.post_list || [];
41283
+ const articleArticles = posts.filter((item)=>item.createTime || item.create_time).map((item)=>mapPost(item, "article"));
41284
+ allArticles.push(...articleArticles);
41285
+ _task.logger.info(`视频号图文获取成功,共${articleArticles.length}条`);
41286
+ }
41287
+ } catch (error) {
41288
+ const errMsg = error instanceof Error ? error.message : String(error);
41289
+ if (errMsg.startsWith("AUTH_ERROR:")) throw error;
41290
+ _task.logger.warn(`获取视频号图文失败:${errMsg}`);
41291
+ }
41292
+ allArticles.sort((a, b)=>b.createTime - a.createTime);
41293
+ _task.logger.info(`视频号数据获取成功,${JSON.stringify(allArticles)}`);
41294
+ return success({
41295
+ articleCell: allArticles,
41296
+ pagination: {
41297
+ total: allArticles.length,
41298
+ nextPage: false,
41299
+ pageNum,
41300
+ pageSize
41301
+ }
41302
+ }, "视频号数据获取成功");
41303
+ } catch (error) {
41304
+ const errMsg = error instanceof Error ? error.message : String(error);
41305
+ if (errMsg.startsWith("AUTH_ERROR:")) return searchPublishInfo_types_errorResponse("视频号数据获取失败,请检查账号状态", 414);
41306
+ return searchPublishInfo_types_errorResponse(errMsg || "视频号数据获取失败");
41307
+ }
41308
+ }
40332
41309
  async function handleToutiaoData(_task, params) {
40333
41310
  try {
40334
41311
  const { cookies, pageNum = 1, pageSize = 10, showOriginalData = false, onlySuccess = false, containsArticle = false } = params;
@@ -40361,7 +41338,7 @@ var __webpack_exports__ = {};
40361
41338
  app_id: 1231
40362
41339
  }
40363
41340
  });
40364
- if (0 !== visitedUid.code) return searchPublishInfo_types_errorResponse("头条号账号信息获取失败,请检查账号状态", 414);
41341
+ if (0 !== visitedUid.code) return searchPublishInfo_types_errorResponse("头条号数据获取失败,请检查账号状态", 414);
40365
41342
  const articleInfo = await http.api({
40366
41343
  method: "get",
40367
41344
  url: "https://mp.toutiao.com/api/feed/mp_provider/v1/",
@@ -40470,7 +41447,7 @@ var __webpack_exports__ = {};
40470
41447
  const size = onlySuccess ? 10 : pageSize > 20 ? 20 : pageSize;
40471
41448
  let begin = (lastPage ?? pageNum) - 1;
40472
41449
  const rawArticlesInfo = await fetchArticles(begin * size, size, token);
40473
- if (rawArticlesInfo.includes("请重新<a id='jumpUrl' href='/'>登录</a>")) return searchPublishInfo_types_errorResponse("登陆已失效,请重新登陆!", 414);
41450
+ if (rawArticlesInfo.includes("请重新<a id='jumpUrl' href='/'>登录</a>")) return searchPublishInfo_types_errorResponse("微信公众号数据获取失败,请检查账号状态", 414);
40474
41451
  const articlesInfo = ParsePublishPage(rawArticlesInfo);
40475
41452
  let articleCell = [];
40476
41453
  if (!onlySuccess && pageSize > 20) {
@@ -40632,7 +41609,7 @@ var __webpack_exports__ = {};
40632
41609
  const a1Cookie = cookies.find((it)=>"a1" === it.name)?.value;
40633
41610
  if (!a1Cookie) return {
40634
41611
  code: 414,
40635
- message: "账号数据异常",
41612
+ message: "小红书数据获取失败,请检查账号状态",
40636
41613
  data: {}
40637
41614
  };
40638
41615
  if (onlySuccess && 10 !== pageSize) return {
@@ -40751,7 +41728,7 @@ var __webpack_exports__ = {};
40751
41728
  }, "小红书文章数据获取成功");
40752
41729
  }
40753
41730
  const FetchArticlesParamsSchema = ActionCommonParamsSchema.extend({
40754
- platform: classic_schemas_string().describe("社交平台:weixin, toutiao, baijiahao, xiaohongshu"),
41731
+ platform: classic_schemas_string().describe("社交平台:weixin, toutiao, baijiahao, xiaohongshu, douyin, shipinhao"),
40755
41732
  token: schemas_union([
40756
41733
  classic_schemas_string(),
40757
41734
  classic_schemas_number()
@@ -40763,7 +41740,14 @@ var __webpack_exports__ = {};
40763
41740
  showOriginalData: classic_schemas_boolean().optional().describe("是否展示原始数据,默认false"),
40764
41741
  cursor: classic_schemas_number().optional().describe("仅用于微信分页游标,默认为空"),
40765
41742
  lastPage: classic_schemas_number().optional(),
40766
- containsArticle: classic_schemas_boolean().optional().describe("是否包含文章内容,默认false")
41743
+ containsArticle: classic_schemas_boolean().optional().describe("是否包含文章内容,默认false"),
41744
+ status: classic_schemas_number().optional().describe("抖音作品状态:0=全部"),
41745
+ includeAccount: classic_schemas_boolean().optional().describe("是否包含账号数据,默认true"),
41746
+ postType: classic_schemas_enum([
41747
+ "video",
41748
+ "article",
41749
+ "all"
41750
+ ]).optional().describe("视频号作品类型:video=视频, article=图文, all=全部")
40767
41751
  });
40768
41752
  const FetchArticles = async (_task, params)=>{
40769
41753
  const { platform } = params;
@@ -40776,6 +41760,10 @@ var __webpack_exports__ = {};
40776
41760
  return handleBaijiahaoData(_task, params);
40777
41761
  case "xiaohongshu":
40778
41762
  return handleXiaohongshuData(_task, params);
41763
+ case "douyin":
41764
+ return handleDouyinData(_task, params);
41765
+ case "shipinhao":
41766
+ return handleShipinhaoData(_task, params);
40779
41767
  default:
40780
41768
  return success({}, "暂不支持该平台");
40781
41769
  }
@@ -49341,6 +50329,24 @@ var __webpack_exports__ = {};
49341
50329
  likeNumYesterday: classic_schemas_number().nullable(),
49342
50330
  commentNumYesterday: classic_schemas_number().nullable()
49343
50331
  });
50332
+ classic_schemas_object({
50333
+ fansNum: classic_schemas_number(),
50334
+ favedNum: classic_schemas_number(),
50335
+ fansNumLastWeek: classic_schemas_number(),
50336
+ watchNumLastWeek: classic_schemas_number(),
50337
+ likeNumLastWeek: classic_schemas_number(),
50338
+ commentNumLastWeek: classic_schemas_number(),
50339
+ shareNumLastWeek: classic_schemas_number(),
50340
+ visitNumLastWeek: classic_schemas_number()
50341
+ });
50342
+ classic_schemas_object({
50343
+ fansNum: classic_schemas_number(),
50344
+ feedsCount: classic_schemas_number(),
50345
+ fansNumYesterday: classic_schemas_number().nullable(),
50346
+ playNumYesterday: classic_schemas_number().nullable(),
50347
+ likeNumYesterday: classic_schemas_number().nullable(),
50348
+ commentNumYesterday: classic_schemas_number().nullable()
50349
+ });
49344
50350
  const BetaFlag = "HuiwenCanary";
49345
50351
  class Action {
49346
50352
  constructor(task){