@xiaohhhh1/canvas-agent 0.4.27 → 0.4.28
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.
|
@@ -337,10 +337,13 @@ export class FastMossIntegration {
|
|
|
337
337
|
];
|
|
338
338
|
if (sources.length < requestedTarget) {
|
|
339
339
|
await this.openVideoLearningPage(fastMossAiVideoLearningRankUrl(market), market === "GLOBAL" ? "全球 AI 带货视频榜" : `${market} AI 带货视频榜`);
|
|
340
|
-
for (const entry of aiDimensions) {
|
|
340
|
+
for (const [entryIndex, entry] of aiDimensions.entries()) {
|
|
341
341
|
if (sources.length >= requestedTarget)
|
|
342
342
|
break;
|
|
343
|
-
|
|
343
|
+
// The page opens on High Sales and its response may already have
|
|
344
|
+
// completed. Keep that first payload; clear only before real tab switches.
|
|
345
|
+
if (entryIndex > 0)
|
|
346
|
+
this.resetObservedVideoRecords();
|
|
344
347
|
const clicked = await this.clickVideoLearningTab(entry.labels);
|
|
345
348
|
if (!clicked) {
|
|
346
349
|
rejected.push({ dimension: entry.dimension, reason: `没有找到${entry.labels[0]}标签` });
|
|
@@ -840,8 +843,7 @@ export function isVideoRankingResponse(response) {
|
|
|
840
843
|
const value = typeof response === "string" ? response : response.url();
|
|
841
844
|
try {
|
|
842
845
|
const url = new URL(value);
|
|
843
|
-
return /(?:^|\.)fastmoss\.com$/i.test(url.hostname)
|
|
844
|
-
&& /\/api\/.*(?:video|aweme|media)/i.test(url.pathname);
|
|
846
|
+
return /(?:^|\.)fastmoss\.com$/i.test(url.hostname) && /\/api\//i.test(url.pathname);
|
|
845
847
|
}
|
|
846
848
|
catch {
|
|
847
849
|
return false;
|