mcp-scraper 0.32.3 → 0.33.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/README.md +1 -1
- package/dist/bin/api-server.cjs +20 -19
- package/dist/bin/api-server.cjs.map +1 -1
- package/dist/bin/api-server.js +2 -2
- package/dist/bin/mcp-scraper-cli.cjs +5 -5
- package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
- package/dist/bin/mcp-scraper-cli.js +2 -2
- 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 +6 -6
- package/dist/bin/mcp-stdio-server.cjs.map +1 -1
- package/dist/bin/mcp-stdio-server.js +2 -2
- package/dist/bin/paa-harvest.js +1 -1
- package/dist/{chunk-MKZIL4EA.js → chunk-AT2PFWHW.js} +5 -5
- package/dist/chunk-AT2PFWHW.js.map +1 -0
- package/dist/{chunk-AEMABLEL.js → chunk-ERORC7AP.js} +1 -3
- package/dist/chunk-RHD6Z42L.js +7 -0
- package/dist/chunk-RHD6Z42L.js.map +1 -0
- package/dist/{chunk-GNRHBIYZ.js → chunk-Z3KL7WQ5.js} +7 -7
- package/dist/chunk-Z3KL7WQ5.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/{server-NHLEIKDZ.js → server-M5N6JVZ5.js} +15 -15
- package/dist/server-M5N6JVZ5.js.map +1 -0
- package/dist/{worker-ZZCZNY3R.js → worker-JU5FX3NE.js} +2 -2
- package/docs/adr/0003-waive-unrecoverable-scheduled-model-cost.md +22 -0
- package/docs/adr/README.md +1 -0
- package/docs/mcp-tool-manifest.generated.json +7 -12
- package/package.json +1 -1
- package/dist/chunk-GNRHBIYZ.js.map +0 -1
- package/dist/chunk-MKZIL4EA.js.map +0 -1
- package/dist/chunk-XF46AB5C.js +0 -7
- package/dist/chunk-XF46AB5C.js.map +0 -1
- package/dist/server-NHLEIKDZ.js.map +0 -1
- /package/dist/{chunk-AEMABLEL.js.map → chunk-ERORC7AP.js.map} +0 -0
- /package/dist/{worker-ZZCZNY3R.js.map → worker-JU5FX3NE.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -12,12 +12,10 @@ import {
|
|
|
12
12
|
MapsSelectors,
|
|
13
13
|
buildYouTubeChannelVideosUrl,
|
|
14
14
|
deleteKernelProxyId,
|
|
15
|
-
encodeUule,
|
|
16
15
|
harvest,
|
|
17
|
-
normalizeLocation,
|
|
18
16
|
resolveKernelProxyId,
|
|
19
17
|
serpArrivalUrl
|
|
20
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ERORC7AP.js";
|
|
21
19
|
import {
|
|
22
20
|
HttpMcpToolExecutor,
|
|
23
21
|
assessTranscriptSignal,
|
|
@@ -37,7 +35,7 @@ import {
|
|
|
37
35
|
sanitizeAttempts,
|
|
38
36
|
sanitizeHarvestResult,
|
|
39
37
|
transcribeMediaUrl
|
|
40
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-Z3KL7WQ5.js";
|
|
41
39
|
import {
|
|
42
40
|
auditImages,
|
|
43
41
|
buildLinkReport,
|
|
@@ -66,7 +64,7 @@ import {
|
|
|
66
64
|
workflowOutputBaseDir,
|
|
67
65
|
workflowStepCount,
|
|
68
66
|
workflowSupportsSteps
|
|
69
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-AT2PFWHW.js";
|
|
70
68
|
import "./chunk-K443GQY5.js";
|
|
71
69
|
import {
|
|
72
70
|
DEFAULT_MAPS_PROXY_MODE,
|
|
@@ -78,7 +76,7 @@ import {
|
|
|
78
76
|
RawMapsOverviewSchema,
|
|
79
77
|
RawMapsReviewStatsSchema
|
|
80
78
|
} from "./chunk-V73MPRU6.js";
|
|
81
|
-
import "./chunk-
|
|
79
|
+
import "./chunk-RHD6Z42L.js";
|
|
82
80
|
import {
|
|
83
81
|
completeExtractJob,
|
|
84
82
|
countSuccessfulPages,
|
|
@@ -10029,7 +10027,7 @@ var HarvestBodySchema = z13.object({
|
|
|
10029
10027
|
gl: z13.string().optional(),
|
|
10030
10028
|
hl: z13.string().optional(),
|
|
10031
10029
|
device: z13.enum(["desktop", "mobile"]).optional(),
|
|
10032
|
-
proxyMode: z13.enum(["
|
|
10030
|
+
proxyMode: z13.enum(["configured", "none"]).optional(),
|
|
10033
10031
|
proxyZip: z13.string().regex(/^\d{5}$/).optional(),
|
|
10034
10032
|
debug: z13.boolean().optional(),
|
|
10035
10033
|
serpOnly: z13.boolean().optional(),
|
|
@@ -13088,13 +13086,11 @@ var MAPS_REDIRECT_BASE = "https://serp-redirector.vercel.app";
|
|
|
13088
13086
|
function buildGoogleLocalResultsUrl(input) {
|
|
13089
13087
|
const query = [input.query, input.location].filter(Boolean).join(" ");
|
|
13090
13088
|
const params = new URLSearchParams({ q: query, udm: "1", gl: input.gl, hl: input.hl, pws: "0" });
|
|
13091
|
-
if (input.location) params.set("uule", encodeUule(normalizeLocation(input.location)));
|
|
13092
13089
|
return `https://www.google.com/search?${params.toString()}`;
|
|
13093
13090
|
}
|
|
13094
13091
|
function buildGoogleOrganicSearchUrl(input) {
|
|
13095
13092
|
const query = [input.query, input.location].filter(Boolean).join(" ");
|
|
13096
13093
|
const params = new URLSearchParams({ q: query, gl: input.gl, hl: input.hl, pws: "0" });
|
|
13097
|
-
if (input.location) params.set("uule", encodeUule(normalizeLocation(input.location)));
|
|
13098
13094
|
return `https://www.google.com/search?${params.toString()}`;
|
|
13099
13095
|
}
|
|
13100
13096
|
function mapsIdentifiersFromUrl(url) {
|
|
@@ -13890,6 +13886,7 @@ var MapsExtractor = class {
|
|
|
13890
13886
|
|
|
13891
13887
|
// src/maps-search-rotation.ts
|
|
13892
13888
|
var MAPS_SEARCH_MAX_ATTEMPTS = 3;
|
|
13889
|
+
var MAPS_SEARCH_NONE_MAX_ATTEMPTS = 7;
|
|
13893
13890
|
var MAPS_SEARCH_LOCATION_PROXY_MAX_ATTEMPTS = 5;
|
|
13894
13891
|
var MapsSearchRotationError = class extends Error {
|
|
13895
13892
|
constructor(message, attempts, retryable, errorCode = "maps_search_failed") {
|
|
@@ -13904,7 +13901,9 @@ var MapsSearchRotationError = class extends Error {
|
|
|
13904
13901
|
name = "MapsSearchRotationError";
|
|
13905
13902
|
};
|
|
13906
13903
|
function mapsSearchMaxAttemptsForProxyMode(proxyMode) {
|
|
13907
|
-
|
|
13904
|
+
if (proxyMode === "location") return MAPS_SEARCH_LOCATION_PROXY_MAX_ATTEMPTS;
|
|
13905
|
+
if (proxyMode === "none") return MAPS_SEARCH_NONE_MAX_ATTEMPTS;
|
|
13906
|
+
return MAPS_SEARCH_MAX_ATTEMPTS;
|
|
13908
13907
|
}
|
|
13909
13908
|
function mapsSearchErrorMessage(err) {
|
|
13910
13909
|
return sanitizeVendorName(err instanceof Error ? err.message : String(err));
|
|
@@ -13975,6 +13974,7 @@ async function cleanupDisposableProxy(kernelApiKey, proxyId, eventName) {
|
|
|
13975
13974
|
}
|
|
13976
13975
|
}
|
|
13977
13976
|
async function runMapsSearchWithRotation(options) {
|
|
13977
|
+
if (options.proxyMode === "location") options = { ...options, proxyMode: "none" };
|
|
13978
13978
|
const attempts = [];
|
|
13979
13979
|
const maxAttempts = mapsSearchMaxAttemptsForProxyMode(options.proxyMode) + 1;
|
|
13980
13980
|
const started = Date.now();
|
|
@@ -14003,8 +14003,8 @@ async function runMapsSearchWithRotation(options) {
|
|
|
14003
14003
|
proxyZip,
|
|
14004
14004
|
kernelProxyId: options.proxyMode === "none" ? void 0 : resolution.kernelProxyId,
|
|
14005
14005
|
kernelProxyResolution: resolution.resolution,
|
|
14006
|
-
serpRedirect: options.proxyMode === "none" && attemptIndex >=
|
|
14007
|
-
forceDirectEgress: options.proxyMode === "none" && attemptIndex >=
|
|
14006
|
+
serpRedirect: options.proxyMode === "none" && attemptIndex >= 2 && attemptIndex < 6,
|
|
14007
|
+
forceDirectEgress: options.proxyMode === "none" && attemptIndex >= 4
|
|
14008
14008
|
};
|
|
14009
14009
|
const isHeadfulEscalation = attemptIndex === maxAttempts - 1;
|
|
14010
14010
|
const baseCtx = currentCostContext();
|
|
@@ -14766,7 +14766,7 @@ var DirectoryWorkflowOptionsSchema = z23.object({
|
|
|
14766
14766
|
saveCsv: z23.boolean().default(true),
|
|
14767
14767
|
gl: z23.string().length(2).default("us"),
|
|
14768
14768
|
hl: z23.string().length(2).default("en"),
|
|
14769
|
-
proxyMode: z23.enum(["
|
|
14769
|
+
proxyMode: z23.enum(["configured", "none"]).default(DEFAULT_MAPS_PROXY_MODE),
|
|
14770
14770
|
proxyZip: z23.string().regex(/^\d{5}$/).optional(),
|
|
14771
14771
|
debug: z23.boolean().default(false),
|
|
14772
14772
|
headless: z23.boolean().default(true),
|
|
@@ -27564,7 +27564,7 @@ app.get("/cron/tick", async (c) => {
|
|
|
27564
27564
|
if (!process.env.CRON_SECRET || secret2 !== `Bearer ${process.env.CRON_SECRET}`) {
|
|
27565
27565
|
return c.json({ error: "Unauthorized" }, 401);
|
|
27566
27566
|
}
|
|
27567
|
-
const { drainQueue } = await import("./worker-
|
|
27567
|
+
const { drainQueue } = await import("./worker-JU5FX3NE.js");
|
|
27568
27568
|
const budget = { maxJobs: 10, deadlineMs: Date.now() + 28e4 };
|
|
27569
27569
|
const workflowDispatchResult = await dispatchDueWorkflowSchedules(`${new URL(c.req.url).protocol}//${new URL(c.req.url).host}`);
|
|
27570
27570
|
const [results, sweepResult, reapResult, expiredResult, blobCleanup, connectedDataArtifactCleanup] = await Promise.all([
|
|
@@ -27767,4 +27767,4 @@ app.get("/blog/:slug/", (c) => {
|
|
|
27767
27767
|
export {
|
|
27768
27768
|
app
|
|
27769
27769
|
};
|
|
27770
|
-
//# sourceMappingURL=server-
|
|
27770
|
+
//# sourceMappingURL=server-M5N6JVZ5.js.map
|