mcp-scraper 0.54.2 → 0.54.4
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/CHANGELOG.md +15 -1
- package/README.md +1 -1
- package/dist/bin/api-server.cjs +48 -21
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +1 -1
- package/dist/bin/mcp-scraper-cli.cjs +1 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-install.cjs +1 -1
- package/dist/bin/mcp-scraper-install.cjs.map +1 -1
- package/dist/bin/mcp-scraper-install.js +1 -1
- package/dist/bin/mcp-stdio-server.cjs +1 -1
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/chunk-HNP2Z7VL.js +7 -0
- package/dist/chunk-HNP2Z7VL.js.map +1 -0
- package/dist/{chunk-47JKN332.js → chunk-QZY3Z26T.js} +2 -2
- package/dist/{server-SRQRVPHA.js → server-PLOSYQMO.js} +50 -23
- package/dist/{server-SRQRVPHA.js.map → server-PLOSYQMO.js.map} +1 -1
- package/package.json +1 -1
- package/dist/chunk-6JN6DKMY.js +0 -7
- package/dist/chunk-6JN6DKMY.js.map +0 -1
- /package/dist/{chunk-47JKN332.js.map → chunk-QZY3Z26T.js.map} +0 -0
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
registerScheduledResultsMcpTools,
|
|
14
14
|
registerSerpIntelligenceCaptureTools,
|
|
15
15
|
resolveDeploymentProfile
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-QZY3Z26T.js";
|
|
17
17
|
import "../chunk-2K74LVV7.js";
|
|
18
18
|
import "../chunk-BBI7RGOT.js";
|
|
19
19
|
import "../chunk-BXZDBKUE.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "../chunk-HG3ZNOXB.js";
|
|
23
23
|
import {
|
|
24
24
|
PACKAGE_VERSION
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-HNP2Z7VL.js";
|
|
26
26
|
import "../chunk-VEQAPOOD.js";
|
|
27
27
|
import "../chunk-5UN33CGU.js";
|
|
28
28
|
import "../chunk-UXSCCXYY.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/version.ts"],"sourcesContent":["export const PACKAGE_VERSION = '0.54.4'\n"],"mappings":";AAAO,IAAM,kBAAkB;","names":[]}
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-BXZDBKUE.js";
|
|
22
22
|
import {
|
|
23
23
|
PACKAGE_VERSION
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-HNP2Z7VL.js";
|
|
25
25
|
import {
|
|
26
26
|
MC_PER_CREDIT,
|
|
27
27
|
PAA_BASE_CREDITS,
|
|
@@ -15825,4 +15825,4 @@ export {
|
|
|
15825
15825
|
ScheduledResultsMcpExecutor,
|
|
15826
15826
|
registerScheduledResultsMcpTools
|
|
15827
15827
|
};
|
|
15828
|
-
//# sourceMappingURL=chunk-
|
|
15828
|
+
//# sourceMappingURL=chunk-QZY3Z26T.js.map
|
|
@@ -168,7 +168,7 @@ import {
|
|
|
168
168
|
resolveDeploymentProfile,
|
|
169
169
|
resolveLocalSourcebookSchemaType,
|
|
170
170
|
transcribeMediaUrl
|
|
171
|
-
} from "./chunk-
|
|
171
|
+
} from "./chunk-QZY3Z26T.js";
|
|
172
172
|
import {
|
|
173
173
|
auditImageUrls,
|
|
174
174
|
auditImages,
|
|
@@ -224,7 +224,7 @@ import {
|
|
|
224
224
|
} from "./chunk-FG6LJGJ7.js";
|
|
225
225
|
import {
|
|
226
226
|
PACKAGE_VERSION
|
|
227
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-HNP2Z7VL.js";
|
|
228
228
|
import {
|
|
229
229
|
abandonExtractSettlement,
|
|
230
230
|
countSuccessfulPages,
|
|
@@ -21622,26 +21622,53 @@ redditApp.post("/trending", createApiKeyAuth(), async (c) => {
|
|
|
21622
21622
|
let discoverySource = "google_serp";
|
|
21623
21623
|
let primaryDiscoveryDegraded = false;
|
|
21624
21624
|
let primaryDegradationReasons = [];
|
|
21625
|
-
|
|
21626
|
-
|
|
21627
|
-
|
|
21628
|
-
|
|
21629
|
-
|
|
21630
|
-
|
|
21631
|
-
|
|
21632
|
-
|
|
21633
|
-
|
|
21634
|
-
|
|
21635
|
-
|
|
21636
|
-
|
|
21637
|
-
|
|
21638
|
-
|
|
21639
|
-
|
|
21640
|
-
|
|
21641
|
-
|
|
21642
|
-
|
|
21643
|
-
|
|
21644
|
-
|
|
21625
|
+
for (let discoveryAttempt = 1; discoveryAttempt <= 2 && candidates.length === 0; discoveryAttempt++) {
|
|
21626
|
+
try {
|
|
21627
|
+
const serp = await harvest({
|
|
21628
|
+
query: serpQuery,
|
|
21629
|
+
serpOnly: true,
|
|
21630
|
+
proxyMode: "none",
|
|
21631
|
+
pages: 1,
|
|
21632
|
+
maxAttempts: 1,
|
|
21633
|
+
maxQuestions: 1,
|
|
21634
|
+
recency: body.window === "all" ? void 0 : body.window,
|
|
21635
|
+
kernelApiKey: browserServiceApiKey(),
|
|
21636
|
+
format: "json",
|
|
21637
|
+
outputDir: "/tmp/reddit-trending-serp",
|
|
21638
|
+
softDeadlineMs,
|
|
21639
|
+
forceManagedSerp: true
|
|
21640
|
+
});
|
|
21641
|
+
const attemptCandidates = extractRedditThreadUrls(serp.organicResults, body.maxThreads);
|
|
21642
|
+
const attemptDegradationReasons = Array.isArray(serp.diagnostics?.degradationReasons) ? serp.diagnostics.degradationReasons.filter((reason) => typeof reason === "string") : [];
|
|
21643
|
+
if (attemptCandidates.length > 0) {
|
|
21644
|
+
candidates = attemptCandidates;
|
|
21645
|
+
primaryDiscoveryDegraded = serp.diagnostics?.degradedResult === true;
|
|
21646
|
+
primaryDegradationReasons = attemptDegradationReasons;
|
|
21647
|
+
break;
|
|
21648
|
+
}
|
|
21649
|
+
primaryDiscoveryDegraded = true;
|
|
21650
|
+
primaryDegradationReasons = [.../* @__PURE__ */ new Set([
|
|
21651
|
+
...primaryDegradationReasons,
|
|
21652
|
+
...attemptDegradationReasons.length > 0 ? attemptDegradationReasons : ["empty_primary_serp"]
|
|
21653
|
+
])];
|
|
21654
|
+
if (discoveryAttempt < 2) {
|
|
21655
|
+
console.warn(JSON.stringify({
|
|
21656
|
+
event: "reddit_serp_discovery_empty_retry",
|
|
21657
|
+
discovery_attempt: discoveryAttempt,
|
|
21658
|
+
next_attempt: discoveryAttempt + 1
|
|
21659
|
+
}));
|
|
21660
|
+
}
|
|
21661
|
+
} catch (error) {
|
|
21662
|
+
primaryDiscoveryDegraded = true;
|
|
21663
|
+
primaryDegradationReasons = [.../* @__PURE__ */ new Set([...primaryDegradationReasons, "primary_serp_failed"])];
|
|
21664
|
+
console.warn(JSON.stringify({
|
|
21665
|
+
event: "reddit_serp_discovery_failed",
|
|
21666
|
+
discovery_attempt: discoveryAttempt,
|
|
21667
|
+
will_retry: discoveryAttempt < 2,
|
|
21668
|
+
error_name: error instanceof Error ? error.name : "Error",
|
|
21669
|
+
message: error instanceof Error ? error.message : String(error)
|
|
21670
|
+
}));
|
|
21671
|
+
}
|
|
21645
21672
|
}
|
|
21646
21673
|
if (candidates.length === 0) {
|
|
21647
21674
|
const fallback = await discoverOnReddit(body.topic, subreddit, body.window);
|
|
@@ -46779,4 +46806,4 @@ app.get("/blog/:slug/", (c) => {
|
|
|
46779
46806
|
export {
|
|
46780
46807
|
app
|
|
46781
46808
|
};
|
|
46782
|
-
//# sourceMappingURL=server-
|
|
46809
|
+
//# sourceMappingURL=server-PLOSYQMO.js.map
|