@iflyrpa/actions 4.0.3 → 4.0.4-beta.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/actions/searchPublishInfo/handleDouyinData.d.ts +17 -0
- package/dist/actions/searchPublishInfo/handleShipinhaoData.d.ts +17 -0
- package/dist/actions/searchPublishInfo/index.d.ts +7 -0
- package/dist/actions/searchPublishInfo/types.d.ts +94 -0
- package/dist/actions/weixinPublish/index.d.ts +2 -2
- package/dist/actions/xiaohongshuPublish/index.d.ts +1 -1
- package/dist/bundle.js +799 -11
- package/dist/bundle.js.map +1 -1
- package/dist/index.d.ts +60 -0
- package/dist/index.js +286 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +286 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.
|
|
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.0"}');
|
|
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");
|
|
@@ -40203,18 +40713,44 @@ var __webpack_exports__ = {};
|
|
|
40203
40713
|
collectNum: classic_schemas_number(),
|
|
40204
40714
|
shareNum: classic_schemas_number()
|
|
40205
40715
|
});
|
|
40716
|
+
const DouyinArticleSchema = BaseArticleSchema.extend({
|
|
40717
|
+
playNum: classic_schemas_number(),
|
|
40718
|
+
likeNum: classic_schemas_number(),
|
|
40719
|
+
commentNum: classic_schemas_number(),
|
|
40720
|
+
shareNum: classic_schemas_number(),
|
|
40721
|
+
collectNum: classic_schemas_number(),
|
|
40722
|
+
awemeId: classic_schemas_string(),
|
|
40723
|
+
awemeType: classic_schemas_number(),
|
|
40724
|
+
duration: classic_schemas_number().optional(),
|
|
40725
|
+
status: classic_schemas_string(),
|
|
40726
|
+
publicUrl: classic_schemas_string()
|
|
40727
|
+
});
|
|
40728
|
+
const ShipinhaoArticleSchema = BaseArticleSchema.extend({
|
|
40729
|
+
readNum: classic_schemas_number(),
|
|
40730
|
+
likeNum: classic_schemas_number(),
|
|
40731
|
+
commentNum: classic_schemas_number(),
|
|
40732
|
+
forwardNum: classic_schemas_number(),
|
|
40733
|
+
favNum: classic_schemas_number(),
|
|
40734
|
+
objectId: classic_schemas_string(),
|
|
40735
|
+
postType: classic_schemas_string(),
|
|
40736
|
+
postStatus: classic_schemas_number()
|
|
40737
|
+
});
|
|
40206
40738
|
const FetchArticlesDataSchema = classic_schemas_object({
|
|
40207
40739
|
articleCell: classic_schemas_array(schemas_union([
|
|
40208
40740
|
ToutiaoArticleSchema,
|
|
40209
40741
|
WeixinArticleSchema,
|
|
40210
40742
|
BaijiahaoArticleSchema,
|
|
40211
|
-
XiaohongshuArticleSchema
|
|
40743
|
+
XiaohongshuArticleSchema,
|
|
40744
|
+
DouyinArticleSchema,
|
|
40745
|
+
ShipinhaoArticleSchema
|
|
40212
40746
|
])).optional(),
|
|
40213
40747
|
timerPublish: classic_schemas_array(schemas_union([
|
|
40214
40748
|
ToutiaoArticleSchema,
|
|
40215
40749
|
WeixinArticleSchema,
|
|
40216
40750
|
BaijiahaoArticleSchema,
|
|
40217
|
-
XiaohongshuArticleSchema
|
|
40751
|
+
XiaohongshuArticleSchema,
|
|
40752
|
+
DouyinArticleSchema,
|
|
40753
|
+
ShipinhaoArticleSchema
|
|
40218
40754
|
])).optional(),
|
|
40219
40755
|
pagination: classic_schemas_object({
|
|
40220
40756
|
total: classic_schemas_number().optional(),
|
|
@@ -40329,6 +40865,247 @@ var __webpack_exports__ = {};
|
|
|
40329
40865
|
return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "百家号文章数据获取失败");
|
|
40330
40866
|
}
|
|
40331
40867
|
}
|
|
40868
|
+
async function handleDouyinData(_task, params) {
|
|
40869
|
+
try {
|
|
40870
|
+
const { cookies, pageNum = 1, pageSize = 12, status = 0, showOriginalData = false, onlySuccess = false } = params;
|
|
40871
|
+
const headers = {
|
|
40872
|
+
cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
|
|
40873
|
+
referer: "https://creator.douyin.com"
|
|
40874
|
+
};
|
|
40875
|
+
const args = [
|
|
40876
|
+
{
|
|
40877
|
+
headers
|
|
40878
|
+
},
|
|
40879
|
+
_task.logger,
|
|
40880
|
+
params.proxyLoc,
|
|
40881
|
+
params.localIP,
|
|
40882
|
+
params.accountId
|
|
40883
|
+
];
|
|
40884
|
+
const http = new Http(...args);
|
|
40885
|
+
let authorUid = "";
|
|
40886
|
+
try {
|
|
40887
|
+
const userInfo = await http.api({
|
|
40888
|
+
method: "get",
|
|
40889
|
+
url: "https://creator.douyin.com/aweme/v1/creator/user/info/"
|
|
40890
|
+
}, {
|
|
40891
|
+
retries: 3,
|
|
40892
|
+
retryDelay: 100,
|
|
40893
|
+
timeout: 5000
|
|
40894
|
+
});
|
|
40895
|
+
authorUid = userInfo.user_profile?.unique_id || "";
|
|
40896
|
+
if (!userInfo.has_data_mgmt_perm) _task.logger.warn("抖音账号未开通数据中心权限,近7日数据不可用");
|
|
40897
|
+
} catch (error) {
|
|
40898
|
+
_task.logger.warn("获取抖音用户信息失败");
|
|
40899
|
+
}
|
|
40900
|
+
async function fetchWorks(cursor) {
|
|
40901
|
+
return await http.api({
|
|
40902
|
+
method: "get",
|
|
40903
|
+
url: "https://creator.douyin.com/janus/douyin/creator/pc/work_list",
|
|
40904
|
+
params: {
|
|
40905
|
+
scene: "star_atlas",
|
|
40906
|
+
device_platform: "android",
|
|
40907
|
+
aid: 1128,
|
|
40908
|
+
status,
|
|
40909
|
+
count: pageSize,
|
|
40910
|
+
max_cursor: cursor
|
|
40911
|
+
}
|
|
40912
|
+
}, {
|
|
40913
|
+
retries: 3,
|
|
40914
|
+
retryDelay: 100,
|
|
40915
|
+
timeout: 5000
|
|
40916
|
+
});
|
|
40917
|
+
}
|
|
40918
|
+
const firstPageCursor = (pageNum - 1) * pageSize;
|
|
40919
|
+
const workListResponse = await fetchWorks(firstPageCursor);
|
|
40920
|
+
if (!workListResponse || !workListResponse.aweme_list) return searchPublishInfo_types_errorResponse("抖音数据获取失败,请检查账号状态", 414);
|
|
40921
|
+
const allWorks = [
|
|
40922
|
+
...workListResponse.aweme_list
|
|
40923
|
+
];
|
|
40924
|
+
let hasMore = workListResponse.has_more;
|
|
40925
|
+
let currentCursor = workListResponse.max_cursor;
|
|
40926
|
+
while(allWorks.length < pageSize && hasMore && !onlySuccess){
|
|
40927
|
+
const nextPageResponse = await fetchWorks(currentCursor);
|
|
40928
|
+
allWorks.push(...nextPageResponse.aweme_list);
|
|
40929
|
+
hasMore = nextPageResponse.has_more;
|
|
40930
|
+
currentCursor = nextPageResponse.max_cursor;
|
|
40931
|
+
if (allWorks.length >= 2 * pageSize) break;
|
|
40932
|
+
}
|
|
40933
|
+
const finalWorks = allWorks.slice(0, pageSize);
|
|
40934
|
+
const articleCell = finalWorks.map((item)=>{
|
|
40935
|
+
const workDetailUrl = `https://creator.douyin.com/creator-micro/work-management/work-detail/${item.aweme_id}`;
|
|
40936
|
+
const workPublicUrl = authorUid ? `https://www.douyin.com/user/${authorUid}?modal_id=${item.aweme_id}` : `https://www.douyin.com/video/${item.aweme_id}`;
|
|
40937
|
+
return {
|
|
40938
|
+
title: item.desc || "无作品描述",
|
|
40939
|
+
imageUrl: item.Cover?.url_list?.[0] || "",
|
|
40940
|
+
createTime: item.create_time,
|
|
40941
|
+
redirectUrl: workDetailUrl,
|
|
40942
|
+
playNum: item.statistics?.play_count || 0,
|
|
40943
|
+
likeNum: item.statistics?.digg_count || 0,
|
|
40944
|
+
commentNum: item.statistics?.comment_count || 0,
|
|
40945
|
+
shareNum: item.statistics?.share_count || 0,
|
|
40946
|
+
collectNum: item.statistics?.collect_count || 0,
|
|
40947
|
+
awemeId: item.aweme_id,
|
|
40948
|
+
awemeType: item.aweme_type,
|
|
40949
|
+
duration: item.duration,
|
|
40950
|
+
status: item.status?.is_private ? "private" : item.status?.in_reviewing ? "reviewing" : "public",
|
|
40951
|
+
publicUrl: workPublicUrl,
|
|
40952
|
+
...showOriginalData ? {
|
|
40953
|
+
originalData: item
|
|
40954
|
+
} : {}
|
|
40955
|
+
};
|
|
40956
|
+
});
|
|
40957
|
+
return success({
|
|
40958
|
+
articleCell,
|
|
40959
|
+
...onlySuccess ? {
|
|
40960
|
+
pagination: {
|
|
40961
|
+
total: workListResponse.total || workListResponse.aweme_list.length,
|
|
40962
|
+
nextPage: workListResponse.has_more,
|
|
40963
|
+
pageNum,
|
|
40964
|
+
pageSize
|
|
40965
|
+
}
|
|
40966
|
+
} : null
|
|
40967
|
+
}, "抖音数据获取成功");
|
|
40968
|
+
} catch (error) {
|
|
40969
|
+
return searchPublishInfo_types_errorResponse(error instanceof Error ? error.message : "抖音数据获取失败");
|
|
40970
|
+
}
|
|
40971
|
+
}
|
|
40972
|
+
async function handleShipinhaoData(_task, params) {
|
|
40973
|
+
try {
|
|
40974
|
+
const { cookies, postType = "all", pageNum = 1, pageSize = 20, showOriginalData = false } = params;
|
|
40975
|
+
const aidCookie = cookies.find((it)=>"_aid" === it.name)?.value;
|
|
40976
|
+
const aid = aidCookie || "9d3e0e9f-b842-498d-a273-4285d58df264";
|
|
40977
|
+
const uinCookie = cookies.find((it)=>"uin" === it.name || "wxuin" === it.name)?.value || "0000000000";
|
|
40978
|
+
const deviceIdCookie = cookies.find((it)=>"device_id" === it.name || "finger_print_device_id" === it.name)?.value;
|
|
40979
|
+
const headers = {
|
|
40980
|
+
cookie: cookies.map((it)=>`${it.name}=${it.value}`).join(";"),
|
|
40981
|
+
referer: "https://channels.weixin.qq.com",
|
|
40982
|
+
origin: "https://channels.weixin.qq.com",
|
|
40983
|
+
"content-type": "application/json",
|
|
40984
|
+
"X-WECHAT-UIN": uinCookie,
|
|
40985
|
+
...deviceIdCookie ? {
|
|
40986
|
+
"finger-print-device-id": deviceIdCookie
|
|
40987
|
+
} : {}
|
|
40988
|
+
};
|
|
40989
|
+
const args = [
|
|
40990
|
+
{
|
|
40991
|
+
headers
|
|
40992
|
+
},
|
|
40993
|
+
_task.logger,
|
|
40994
|
+
params.proxyLoc,
|
|
40995
|
+
params.localIP,
|
|
40996
|
+
params.accountId
|
|
40997
|
+
];
|
|
40998
|
+
const http = new Http(...args);
|
|
40999
|
+
const finderIdCookie = cookies.find((it)=>"_log_finder_id" === it.name || "finder_id" === it.name)?.value || "";
|
|
41000
|
+
async function fetchPosts(currentPage, userpageType, pageUrl) {
|
|
41001
|
+
return await http.api({
|
|
41002
|
+
method: "post",
|
|
41003
|
+
url: "https://channels.weixin.qq.com/micro/content/cgi-bin/mmfinderassistant-bin/post/post_list",
|
|
41004
|
+
params: {
|
|
41005
|
+
_aid: aid,
|
|
41006
|
+
_rid: `${Date.now().toString(16)}-${Math.random().toString(36).substring(2, 9)}`,
|
|
41007
|
+
_pageUrl: encodeURIComponent(pageUrl)
|
|
41008
|
+
},
|
|
41009
|
+
data: {
|
|
41010
|
+
pageSize,
|
|
41011
|
+
currentPage,
|
|
41012
|
+
userpageType,
|
|
41013
|
+
stickyOrder: true,
|
|
41014
|
+
timestamp: Date.now().toString(),
|
|
41015
|
+
_log_finder_uin: "",
|
|
41016
|
+
_log_finder_id: finderIdCookie,
|
|
41017
|
+
rawKeyBuff: "",
|
|
41018
|
+
pluginSessionId: null,
|
|
41019
|
+
scene: 7,
|
|
41020
|
+
reqScene: 7
|
|
41021
|
+
}
|
|
41022
|
+
}, {
|
|
41023
|
+
retries: 3,
|
|
41024
|
+
retryDelay: 100,
|
|
41025
|
+
timeout: 5000
|
|
41026
|
+
});
|
|
41027
|
+
}
|
|
41028
|
+
const mapPost = (item, forcePostType)=>{
|
|
41029
|
+
let imageUrl = "";
|
|
41030
|
+
if (item.desc?.media?.[0]?.thumbUrl) imageUrl = item.desc.media[0].thumbUrl;
|
|
41031
|
+
else if (item.desc?.media?.[0]?.coverUrl) imageUrl = item.desc.media[0].coverUrl;
|
|
41032
|
+
else if (item.cover?.url) imageUrl = item.cover.url;
|
|
41033
|
+
else if (item.media_url) imageUrl = item.media_url;
|
|
41034
|
+
const title = item.desc?.description || item.object_desc || "无标题";
|
|
41035
|
+
return {
|
|
41036
|
+
title,
|
|
41037
|
+
imageUrl,
|
|
41038
|
+
createTime: item.createTime || item.create_time,
|
|
41039
|
+
redirectUrl: "https://channels.weixin.qq.com/platform",
|
|
41040
|
+
readNum: item.readCount || item.read_count || 0,
|
|
41041
|
+
likeNum: item.likeCount || item.like_count || 0,
|
|
41042
|
+
commentNum: item.commentCount || item.comment_count || 0,
|
|
41043
|
+
forwardNum: item.forwardCount || item.forward_count || 0,
|
|
41044
|
+
favNum: item.favCount || item.fav_count || 0,
|
|
41045
|
+
objectId: item.exportId || item.objectId || "",
|
|
41046
|
+
postType: forcePostType,
|
|
41047
|
+
postStatus: item.status || item.post_status || 0,
|
|
41048
|
+
...showOriginalData ? {
|
|
41049
|
+
originalData: item
|
|
41050
|
+
} : {}
|
|
41051
|
+
};
|
|
41052
|
+
};
|
|
41053
|
+
const allArticles = [];
|
|
41054
|
+
const needVideo = "all" === postType || "video" === postType;
|
|
41055
|
+
const needArticle = "all" === postType || "article" === postType;
|
|
41056
|
+
const AUTH_ERROR_CODES = [
|
|
41057
|
+
300333,
|
|
41058
|
+
300334
|
|
41059
|
+
];
|
|
41060
|
+
if (needVideo) try {
|
|
41061
|
+
const videoPageUrl = "https://channels.weixin.qq.com/micro/content/post/list";
|
|
41062
|
+
const videoResponse = await fetchPosts(pageNum, 11, videoPageUrl);
|
|
41063
|
+
if (videoResponse.errCode && AUTH_ERROR_CODES.includes(videoResponse.errCode)) throw new Error(`AUTH_ERROR:${videoResponse.errMsg || "登录已失效"}`);
|
|
41064
|
+
if (videoResponse.errCode) _task.logger.warn(`视频号API错误:${videoResponse.errMsg} (${videoResponse.errCode})`);
|
|
41065
|
+
else {
|
|
41066
|
+
const posts = videoResponse.data?.list || videoResponse.posts || videoResponse.post_list || [];
|
|
41067
|
+
const videoArticles = posts.filter((item)=>item.createTime || item.create_time).map((item)=>mapPost(item, "video"));
|
|
41068
|
+
allArticles.push(...videoArticles);
|
|
41069
|
+
_task.logger.info(`视频号视频获取成功,共${videoArticles.length}条`);
|
|
41070
|
+
}
|
|
41071
|
+
} catch (error) {
|
|
41072
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
41073
|
+
if (errMsg.startsWith("AUTH_ERROR:")) throw error;
|
|
41074
|
+
_task.logger.warn(`获取视频号视频失败:${errMsg}`);
|
|
41075
|
+
}
|
|
41076
|
+
if (needArticle) try {
|
|
41077
|
+
const articlePageUrl = "https://channels.weixin.qq.com/micro/content/post/finderNewLifePostList";
|
|
41078
|
+
const articleResponse = await fetchPosts(pageNum, 10, articlePageUrl);
|
|
41079
|
+
if (articleResponse.errCode && AUTH_ERROR_CODES.includes(articleResponse.errCode)) throw new Error(`AUTH_ERROR:${articleResponse.errMsg || "登录已失效"}`);
|
|
41080
|
+
if (articleResponse.errCode) _task.logger.warn(`视频号图文API错误:${articleResponse.errMsg} (${articleResponse.errCode})`);
|
|
41081
|
+
else {
|
|
41082
|
+
const posts = articleResponse.data?.list || articleResponse.posts || articleResponse.post_list || [];
|
|
41083
|
+
const articleArticles = posts.filter((item)=>item.createTime || item.create_time).map((item)=>mapPost(item, "article"));
|
|
41084
|
+
allArticles.push(...articleArticles);
|
|
41085
|
+
_task.logger.info(`视频号图文获取成功,共${articleArticles.length}条`);
|
|
41086
|
+
}
|
|
41087
|
+
} catch (error) {
|
|
41088
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
41089
|
+
if (errMsg.startsWith("AUTH_ERROR:")) throw error;
|
|
41090
|
+
_task.logger.warn(`获取视频号图文失败:${errMsg}`);
|
|
41091
|
+
}
|
|
41092
|
+
allArticles.sort((a, b)=>b.createTime - a.createTime);
|
|
41093
|
+
_task.logger.info(`视频号数据获取成功,${JSON.stringify(allArticles)}`);
|
|
41094
|
+
return success({
|
|
41095
|
+
articleCell: allArticles,
|
|
41096
|
+
pagination: {
|
|
41097
|
+
total: allArticles.length,
|
|
41098
|
+
nextPage: false,
|
|
41099
|
+
pageNum,
|
|
41100
|
+
pageSize
|
|
41101
|
+
}
|
|
41102
|
+
}, "视频号数据获取成功");
|
|
41103
|
+
} catch (error) {
|
|
41104
|
+
const errMsg = error instanceof Error ? error.message : String(error);
|
|
41105
|
+
if (errMsg.startsWith("AUTH_ERROR:")) return searchPublishInfo_types_errorResponse("视频号数据获取失败,请检查账号状态", 414);
|
|
41106
|
+
return searchPublishInfo_types_errorResponse(errMsg || "视频号数据获取失败");
|
|
41107
|
+
}
|
|
41108
|
+
}
|
|
40332
41109
|
async function handleToutiaoData(_task, params) {
|
|
40333
41110
|
try {
|
|
40334
41111
|
const { cookies, pageNum = 1, pageSize = 10, showOriginalData = false, onlySuccess = false, containsArticle = false } = params;
|
|
@@ -40361,7 +41138,7 @@ var __webpack_exports__ = {};
|
|
|
40361
41138
|
app_id: 1231
|
|
40362
41139
|
}
|
|
40363
41140
|
});
|
|
40364
|
-
if (0 !== visitedUid.code) return searchPublishInfo_types_errorResponse("
|
|
41141
|
+
if (0 !== visitedUid.code) return searchPublishInfo_types_errorResponse("头条号数据获取失败,请检查账号状态", 414);
|
|
40365
41142
|
const articleInfo = await http.api({
|
|
40366
41143
|
method: "get",
|
|
40367
41144
|
url: "https://mp.toutiao.com/api/feed/mp_provider/v1/",
|
|
@@ -40470,7 +41247,7 @@ var __webpack_exports__ = {};
|
|
|
40470
41247
|
const size = onlySuccess ? 10 : pageSize > 20 ? 20 : pageSize;
|
|
40471
41248
|
let begin = (lastPage ?? pageNum) - 1;
|
|
40472
41249
|
const rawArticlesInfo = await fetchArticles(begin * size, size, token);
|
|
40473
|
-
if (rawArticlesInfo.includes("请重新<a id='jumpUrl' href='/'>登录</a>")) return searchPublishInfo_types_errorResponse("
|
|
41250
|
+
if (rawArticlesInfo.includes("请重新<a id='jumpUrl' href='/'>登录</a>")) return searchPublishInfo_types_errorResponse("微信公众号数据获取失败,请检查账号状态", 414);
|
|
40474
41251
|
const articlesInfo = ParsePublishPage(rawArticlesInfo);
|
|
40475
41252
|
let articleCell = [];
|
|
40476
41253
|
if (!onlySuccess && pageSize > 20) {
|
|
@@ -40632,7 +41409,7 @@ var __webpack_exports__ = {};
|
|
|
40632
41409
|
const a1Cookie = cookies.find((it)=>"a1" === it.name)?.value;
|
|
40633
41410
|
if (!a1Cookie) return {
|
|
40634
41411
|
code: 414,
|
|
40635
|
-
message: "
|
|
41412
|
+
message: "小红书数据获取失败,请检查账号状态",
|
|
40636
41413
|
data: {}
|
|
40637
41414
|
};
|
|
40638
41415
|
if (onlySuccess && 10 !== pageSize) return {
|
|
@@ -40751,7 +41528,7 @@ var __webpack_exports__ = {};
|
|
|
40751
41528
|
}, "小红书文章数据获取成功");
|
|
40752
41529
|
}
|
|
40753
41530
|
const FetchArticlesParamsSchema = ActionCommonParamsSchema.extend({
|
|
40754
|
-
platform: classic_schemas_string().describe("社交平台:weixin, toutiao, baijiahao, xiaohongshu"),
|
|
41531
|
+
platform: classic_schemas_string().describe("社交平台:weixin, toutiao, baijiahao, xiaohongshu, douyin, shipinhao"),
|
|
40755
41532
|
token: schemas_union([
|
|
40756
41533
|
classic_schemas_string(),
|
|
40757
41534
|
classic_schemas_number()
|
|
@@ -40763,7 +41540,14 @@ var __webpack_exports__ = {};
|
|
|
40763
41540
|
showOriginalData: classic_schemas_boolean().optional().describe("是否展示原始数据,默认false"),
|
|
40764
41541
|
cursor: classic_schemas_number().optional().describe("仅用于微信分页游标,默认为空"),
|
|
40765
41542
|
lastPage: classic_schemas_number().optional(),
|
|
40766
|
-
containsArticle: classic_schemas_boolean().optional().describe("是否包含文章内容,默认false")
|
|
41543
|
+
containsArticle: classic_schemas_boolean().optional().describe("是否包含文章内容,默认false"),
|
|
41544
|
+
status: classic_schemas_number().optional().describe("抖音作品状态:0=全部"),
|
|
41545
|
+
includeAccount: classic_schemas_boolean().optional().describe("是否包含账号数据,默认true"),
|
|
41546
|
+
postType: classic_schemas_enum([
|
|
41547
|
+
"video",
|
|
41548
|
+
"article",
|
|
41549
|
+
"all"
|
|
41550
|
+
]).optional().describe("视频号作品类型:video=视频, article=图文, all=全部")
|
|
40767
41551
|
});
|
|
40768
41552
|
const FetchArticles = async (_task, params)=>{
|
|
40769
41553
|
const { platform } = params;
|
|
@@ -40776,6 +41560,10 @@ var __webpack_exports__ = {};
|
|
|
40776
41560
|
return handleBaijiahaoData(_task, params);
|
|
40777
41561
|
case "xiaohongshu":
|
|
40778
41562
|
return handleXiaohongshuData(_task, params);
|
|
41563
|
+
case "douyin":
|
|
41564
|
+
return handleDouyinData(_task, params);
|
|
41565
|
+
case "shipinhao":
|
|
41566
|
+
return handleShipinhaoData(_task, params);
|
|
40779
41567
|
default:
|
|
40780
41568
|
return success({}, "暂不支持该平台");
|
|
40781
41569
|
}
|