mcp-scraper 0.65.1 → 0.66.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/CHANGELOG.md +31 -1
- package/README.md +11 -6
- package/dist/{analytics-repository-IKE53S3E.js → analytics-repository-RUXBFSFX.js} +1 -2
- package/dist/bin/api-server.cjs +1844 -71
- package/dist/bin/api-server.js +4 -5
- package/dist/bin/mcp-scraper-cli.cjs +1 -2
- package/dist/bin/mcp-scraper-cli.js +6 -7
- package/dist/bin/mcp-scraper-install.cjs +7 -3
- package/dist/bin/mcp-scraper-install.js +2 -3
- package/dist/bin/mcp-stdio-server.cjs +5150 -3467
- package/dist/bin/mcp-stdio-server.js +11 -11
- package/dist/bin/paa-harvest.cjs +8 -3
- package/dist/bin/paa-harvest.js +4 -5
- package/dist/{chunk-5PIO7QBG.js → chunk-3PIXKLGZ.js} +3 -4
- package/dist/{chunk-VIWT35S6.js → chunk-4OT7BAIE.js} +1 -2
- package/dist/{chunk-ORKXE7VX.js → chunk-4P3PHFPQ.js} +11 -6
- package/dist/{chunk-AMLFKPLL.js → chunk-75VW7CWE.js} +4 -7
- package/dist/{chunk-FG6LJGJ7.js → chunk-77LQV73B.js} +0 -1
- package/dist/{chunk-DKIG2TEE.js → chunk-AQKJOSIB.js} +2 -3
- package/dist/{chunk-2XUXVKT4.js → chunk-AYJHI2FK.js} +0 -1
- package/dist/{chunk-5BEPOFKG.js → chunk-CNLLTD5B.js} +0 -1
- package/dist/{chunk-EKJ65E3Z.js → chunk-DNM65UCK.js} +0 -1
- package/dist/{chunk-PDAKCYHZ.js → chunk-E4LMY5OJ.js} +6258 -3747
- package/dist/{chunk-MQGBCWZD.js → chunk-GGZEC22A.js} +64 -1
- package/dist/{chunk-4VG3NUUY.js → chunk-GTGSD4YS.js} +2 -2
- package/dist/{chunk-MQQS7ONH.js → chunk-KBTUPRTF.js} +8 -296
- package/dist/{chunk-XPEN6OG5.js → chunk-NS754CRS.js} +15 -3
- package/dist/{chunk-UN4LZVCB.js → chunk-OZJMVCDK.js} +1 -2
- package/dist/{chunk-342OUCSG.js → chunk-PGJQDMC2.js} +1 -2
- package/dist/{chunk-G3P3ZDB4.js → chunk-RJ7JVYKU.js} +0 -1
- package/dist/{chunk-N54JS5WP.js → chunk-TNJIPV74.js} +1 -2
- package/dist/{chunk-4LINSJNI.js → chunk-TNLGHNLX.js} +1 -2
- package/dist/chunk-VRJ7CO6L.js +6 -0
- package/dist/chunk-VXLU74YZ.js +293 -0
- package/dist/{chunk-DCWXVAQT.js → chunk-WID3MFRS.js} +6 -2
- package/dist/{db-BRI465XQ.js → db-PO7N7ZP3.js} +1 -2
- package/dist/{extract-bundle-UWKJT4MU.js → extract-bundle-SIBFUA6I.js} +8 -10
- package/dist/index.cjs +8 -3
- package/dist/index.js +4 -5
- package/dist/{lead-list-enrichment-repository-ODWGRVCQ.js → lead-list-enrichment-repository-OTAUQONJ.js} +2 -3
- package/dist/{location-data-repository-67MMEVZQ.js → location-data-repository-RM2KJ3H5.js} +3 -4
- package/dist/{server-RSHSZBUZ.js → server-ELEJNRRE.js} +875 -1629
- package/dist/{site-extract-repository-J3RH3MOS.js → site-extract-repository-ASYEJO7Z.js} +4 -5
- package/dist/{worker-YKRIK5LS.js → worker-MAVYYWM7.js} +8 -9
- package/package.json +3 -1
- package/dist/analytics-repository-IKE53S3E.js.map +0 -1
- package/dist/bin/api-server.cjs.map +0 -1
- package/dist/bin/api-server.js.map +0 -1
- package/dist/bin/mcp-scraper-cli.cjs.map +0 -1
- package/dist/bin/mcp-scraper-cli.js.map +0 -1
- package/dist/bin/mcp-scraper-install.cjs.map +0 -1
- package/dist/bin/mcp-scraper-install.js.map +0 -1
- package/dist/bin/mcp-stdio-server.cjs.map +0 -1
- package/dist/bin/mcp-stdio-server.js.map +0 -1
- package/dist/bin/paa-harvest.cjs.map +0 -1
- package/dist/bin/paa-harvest.js.map +0 -1
- package/dist/chunk-2XUXVKT4.js.map +0 -1
- package/dist/chunk-342OUCSG.js.map +0 -1
- package/dist/chunk-4LINSJNI.js.map +0 -1
- package/dist/chunk-4VG3NUUY.js.map +0 -1
- package/dist/chunk-5BEPOFKG.js.map +0 -1
- package/dist/chunk-5PIO7QBG.js.map +0 -1
- package/dist/chunk-AMLFKPLL.js.map +0 -1
- package/dist/chunk-CGKWNXJR.js +0 -7
- package/dist/chunk-CGKWNXJR.js.map +0 -1
- package/dist/chunk-DCWXVAQT.js.map +0 -1
- package/dist/chunk-DKIG2TEE.js.map +0 -1
- package/dist/chunk-EKJ65E3Z.js.map +0 -1
- package/dist/chunk-FG6LJGJ7.js.map +0 -1
- package/dist/chunk-G3P3ZDB4.js.map +0 -1
- package/dist/chunk-MQGBCWZD.js.map +0 -1
- package/dist/chunk-MQQS7ONH.js.map +0 -1
- package/dist/chunk-N54JS5WP.js.map +0 -1
- package/dist/chunk-ORKXE7VX.js.map +0 -1
- package/dist/chunk-PDAKCYHZ.js.map +0 -1
- package/dist/chunk-UN4LZVCB.js.map +0 -1
- package/dist/chunk-UVFB24RZ.js +0 -67
- package/dist/chunk-UVFB24RZ.js.map +0 -1
- package/dist/chunk-VIWT35S6.js.map +0 -1
- package/dist/chunk-XPEN6OG5.js.map +0 -1
- package/dist/db-BRI465XQ.js.map +0 -1
- package/dist/extract-bundle-UWKJT4MU.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lead-list-enrichment-repository-ODWGRVCQ.js.map +0 -1
- package/dist/location-data-repository-67MMEVZQ.js.map +0 -1
- package/dist/server-RSHSZBUZ.js.map +0 -1
- package/dist/site-extract-repository-J3RH3MOS.js.map +0 -1
- package/dist/worker-YKRIK5LS.js.map +0 -1
|
@@ -13,20 +13,21 @@ import {
|
|
|
13
13
|
registerScheduledResultsMcpTools,
|
|
14
14
|
registerSerpIntelligenceCaptureTools,
|
|
15
15
|
resolveDeploymentProfile
|
|
16
|
-
} from "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-E4LMY5OJ.js";
|
|
17
|
+
import "../chunk-PGJQDMC2.js";
|
|
18
|
+
import "../chunk-4OT7BAIE.js";
|
|
19
|
+
import "../chunk-TNLGHNLX.js";
|
|
20
20
|
import {
|
|
21
21
|
renderInstallTerminal
|
|
22
|
-
} from "../chunk-
|
|
23
|
-
import "../chunk-
|
|
22
|
+
} from "../chunk-WID3MFRS.js";
|
|
23
|
+
import "../chunk-VXLU74YZ.js";
|
|
24
|
+
import "../chunk-GGZEC22A.js";
|
|
24
25
|
import {
|
|
25
26
|
PACKAGE_VERSION
|
|
26
|
-
} from "../chunk-
|
|
27
|
-
import "../chunk-
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
27
|
+
} from "../chunk-VRJ7CO6L.js";
|
|
28
|
+
import "../chunk-DNM65UCK.js";
|
|
29
|
+
import "../chunk-AYJHI2FK.js";
|
|
30
|
+
import "../chunk-GTGSD4YS.js";
|
|
30
31
|
|
|
31
32
|
// bin/mcp-stdio-server.ts
|
|
32
33
|
import { readFileSync } from "fs";
|
|
@@ -168,4 +169,3 @@ serveStdio(() => buildStdioServer(), {
|
|
|
168
169
|
`);
|
|
169
170
|
}
|
|
170
171
|
});
|
|
171
|
-
//# sourceMappingURL=mcp-stdio-server.js.map
|
package/dist/bin/paa-harvest.cjs
CHANGED
|
@@ -4018,6 +4018,9 @@ function classifyAttemptError(err) {
|
|
|
4018
4018
|
if (err instanceof RequestAbortedError) return "request_aborted";
|
|
4019
4019
|
if (err instanceof DOMException && (err.name === "TimeoutError" || err.name === "AbortError")) return "timeout";
|
|
4020
4020
|
const message = err instanceof Error ? err.message : String(err);
|
|
4021
|
+
if (/browser (?:has been )?closed|context (?:has been )?closed|target page, context or browser has been closed|session closed|page has been closed/i.test(message)) {
|
|
4022
|
+
return "browser_session_interrupted";
|
|
4023
|
+
}
|
|
4021
4024
|
if (looksLikeProxyTunnelFailure(message)) return "proxy_tunnel_failed";
|
|
4022
4025
|
if (looksLikeProxyUnavailable(message)) return "proxy_unavailable";
|
|
4023
4026
|
return /timeout|timed out|Timeout \d+ms exceeded|deadline/i.test(message) ? "timeout" : "error";
|
|
@@ -4065,6 +4068,9 @@ function looksLikeProxyUnavailable(message) {
|
|
|
4065
4068
|
function retryableLocationProxyError(outcome) {
|
|
4066
4069
|
return outcome === "captcha" || outcome === "proxy_tunnel_failed" || outcome === "proxy_unavailable";
|
|
4067
4070
|
}
|
|
4071
|
+
function retryableFreshBrowserError(outcome) {
|
|
4072
|
+
return outcome === "browser_session_interrupted";
|
|
4073
|
+
}
|
|
4068
4074
|
function locationMismatchMessage(result) {
|
|
4069
4075
|
const evidence = result.diagnostics.debug?.locationEvidence;
|
|
4070
4076
|
const expected = evidence?.expected?.canonicalLocation ?? result.location ?? "requested location";
|
|
@@ -4248,7 +4254,7 @@ async function harvest(rawOptions) {
|
|
|
4248
4254
|
proxyFailures++;
|
|
4249
4255
|
if (proxyFailures >= 2) effectiveProxyMode = "none";
|
|
4250
4256
|
}
|
|
4251
|
-
const willRetry2 = i < maxAttempts - 1 && (outcome2 === "captcha" || proxyMode === "location" && retryableLocationProxyError(outcome2));
|
|
4257
|
+
const willRetry2 = i < maxAttempts - 1 && (outcome2 === "captcha" || retryableFreshBrowserError(outcome2) || proxyMode === "location" && retryableLocationProxyError(outcome2));
|
|
4252
4258
|
if (outcome2 === "captcha") {
|
|
4253
4259
|
console.warn(JSON.stringify({
|
|
4254
4260
|
event: "harvest_attempt_captcha",
|
|
@@ -4366,7 +4372,7 @@ async function harvest(rawOptions) {
|
|
|
4366
4372
|
proxyFailures++;
|
|
4367
4373
|
if (proxyFailures >= 2) effectiveProxyMode = "none";
|
|
4368
4374
|
}
|
|
4369
|
-
const willRetry = i < maxAttempts - 1 && (outcome === "captcha" || proxyMode === "location" && retryableLocationProxyError(outcome));
|
|
4375
|
+
const willRetry = i < maxAttempts - 1 && (outcome === "captcha" || retryableFreshBrowserError(outcome) || proxyMode === "location" && retryableLocationProxyError(outcome));
|
|
4370
4376
|
if (outcome === "captcha") {
|
|
4371
4377
|
console.warn(JSON.stringify({
|
|
4372
4378
|
event: "harvest_attempt_captcha",
|
|
@@ -4451,4 +4457,3 @@ async function runCli() {
|
|
|
4451
4457
|
|
|
4452
4458
|
// bin/paa-harvest.ts
|
|
4453
4459
|
runCli();
|
|
4454
|
-
//# sourceMappingURL=paa-harvest.cjs.map
|
package/dist/bin/paa-harvest.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
harvest
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-4P3PHFPQ.js";
|
|
5
5
|
import {
|
|
6
6
|
browserServiceApiKey
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-TNLGHNLX.js";
|
|
8
|
+
import "../chunk-77LQV73B.js";
|
|
9
|
+
import "../chunk-GTGSD4YS.js";
|
|
10
10
|
|
|
11
11
|
// src/cli.ts
|
|
12
12
|
import { Command } from "commander";
|
|
@@ -39,4 +39,3 @@ async function runCli() {
|
|
|
39
39
|
|
|
40
40
|
// bin/paa-harvest.ts
|
|
41
41
|
runCli();
|
|
42
|
-
//# sourceMappingURL=paa-harvest.js.map
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
privateArtifactOwnerId,
|
|
5
5
|
readPrivateArtifactBuffer,
|
|
6
6
|
renewPrivateArtifactDownload
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-DNM65UCK.js";
|
|
8
8
|
import {
|
|
9
9
|
LedgerOperation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AYJHI2FK.js";
|
|
11
11
|
import {
|
|
12
12
|
CREDIT_LOT_TTL,
|
|
13
13
|
getDb,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
sanitizeVendorName,
|
|
16
16
|
serializePublicErrorEnvelope,
|
|
17
17
|
settleDebitMcIdempotent
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GTGSD4YS.js";
|
|
19
19
|
|
|
20
20
|
// src/api/site-extract-content-store.ts
|
|
21
21
|
import { createHash } from "crypto";
|
|
@@ -797,4 +797,3 @@ export {
|
|
|
797
797
|
setExtractJobPublicError,
|
|
798
798
|
settleExtractJob
|
|
799
799
|
};
|
|
800
|
-
//# sourceMappingURL=chunk-5PIO7QBG.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
publicErrorMessage,
|
|
3
3
|
sanitizeVendorName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GTGSD4YS.js";
|
|
5
5
|
|
|
6
6
|
// src/api/outbound-sanitize.ts
|
|
7
7
|
var KEY_RENAMES = {
|
|
@@ -101,4 +101,3 @@ export {
|
|
|
101
101
|
sanitizeAttempts,
|
|
102
102
|
sanitizeHarvestResult
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=chunk-VIWT35S6.js.map
|
|
@@ -6,14 +6,14 @@ import {
|
|
|
6
6
|
currentCostContext,
|
|
7
7
|
recordKernelSession,
|
|
8
8
|
runWithCostContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TNLGHNLX.js";
|
|
10
10
|
import {
|
|
11
11
|
DEFAULT_PROXY_MODE,
|
|
12
12
|
HarvestOptionsSchema,
|
|
13
13
|
RawPAAItemSchema,
|
|
14
14
|
postToMemoryLibrary,
|
|
15
15
|
recencyToTbs
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-77LQV73B.js";
|
|
17
17
|
import {
|
|
18
18
|
CaptchaError,
|
|
19
19
|
ExtractionError,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
RECAPTCHA_INSTRUCTIONS,
|
|
22
22
|
RequestAbortedError,
|
|
23
23
|
sanitizeVendorName
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GTGSD4YS.js";
|
|
25
25
|
|
|
26
26
|
// src/driver/BrowserDriver.ts
|
|
27
27
|
import { chromium } from "playwright-extra";
|
|
@@ -3578,6 +3578,9 @@ function classifyAttemptError(err) {
|
|
|
3578
3578
|
if (err instanceof RequestAbortedError) return "request_aborted";
|
|
3579
3579
|
if (err instanceof DOMException && (err.name === "TimeoutError" || err.name === "AbortError")) return "timeout";
|
|
3580
3580
|
const message = err instanceof Error ? err.message : String(err);
|
|
3581
|
+
if (/browser (?:has been )?closed|context (?:has been )?closed|target page, context or browser has been closed|session closed|page has been closed/i.test(message)) {
|
|
3582
|
+
return "browser_session_interrupted";
|
|
3583
|
+
}
|
|
3581
3584
|
if (looksLikeProxyTunnelFailure(message)) return "proxy_tunnel_failed";
|
|
3582
3585
|
if (looksLikeProxyUnavailable(message)) return "proxy_unavailable";
|
|
3583
3586
|
return /timeout|timed out|Timeout \d+ms exceeded|deadline/i.test(message) ? "timeout" : "error";
|
|
@@ -3625,6 +3628,9 @@ function looksLikeProxyUnavailable(message) {
|
|
|
3625
3628
|
function retryableLocationProxyError(outcome) {
|
|
3626
3629
|
return outcome === "captcha" || outcome === "proxy_tunnel_failed" || outcome === "proxy_unavailable";
|
|
3627
3630
|
}
|
|
3631
|
+
function retryableFreshBrowserError(outcome) {
|
|
3632
|
+
return outcome === "browser_session_interrupted";
|
|
3633
|
+
}
|
|
3628
3634
|
function locationMismatchMessage(result) {
|
|
3629
3635
|
const evidence = result.diagnostics.debug?.locationEvidence;
|
|
3630
3636
|
const expected = evidence?.expected?.canonicalLocation ?? result.location ?? "requested location";
|
|
@@ -3808,7 +3814,7 @@ async function harvest(rawOptions) {
|
|
|
3808
3814
|
proxyFailures++;
|
|
3809
3815
|
if (proxyFailures >= 2) effectiveProxyMode = "none";
|
|
3810
3816
|
}
|
|
3811
|
-
const willRetry2 = i < maxAttempts - 1 && (outcome2 === "captcha" || proxyMode === "location" && retryableLocationProxyError(outcome2));
|
|
3817
|
+
const willRetry2 = i < maxAttempts - 1 && (outcome2 === "captcha" || retryableFreshBrowserError(outcome2) || proxyMode === "location" && retryableLocationProxyError(outcome2));
|
|
3812
3818
|
if (outcome2 === "captcha") {
|
|
3813
3819
|
console.warn(JSON.stringify({
|
|
3814
3820
|
event: "harvest_attempt_captcha",
|
|
@@ -3926,7 +3932,7 @@ async function harvest(rawOptions) {
|
|
|
3926
3932
|
proxyFailures++;
|
|
3927
3933
|
if (proxyFailures >= 2) effectiveProxyMode = "none";
|
|
3928
3934
|
}
|
|
3929
|
-
const willRetry = i < maxAttempts - 1 && (outcome === "captcha" || proxyMode === "location" && retryableLocationProxyError(outcome));
|
|
3935
|
+
const willRetry = i < maxAttempts - 1 && (outcome === "captcha" || retryableFreshBrowserError(outcome) || proxyMode === "location" && retryableLocationProxyError(outcome));
|
|
3930
3936
|
if (outcome === "captcha") {
|
|
3931
3937
|
console.warn(JSON.stringify({
|
|
3932
3938
|
event: "harvest_attempt_captcha",
|
|
@@ -4009,4 +4015,3 @@ export {
|
|
|
4009
4015
|
resolveKernelProxyId,
|
|
4010
4016
|
harvest
|
|
4011
4017
|
};
|
|
4012
|
-
//# sourceMappingURL=chunk-ORKXE7VX.js.map
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isVendorUnavailableError
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import {
|
|
5
|
-
loadHtmlDocument
|
|
6
|
-
} from "./chunk-MQGBCWZD.js";
|
|
3
|
+
} from "./chunk-OZJMVCDK.js";
|
|
7
4
|
import {
|
|
5
|
+
loadHtmlDocument,
|
|
8
6
|
validatePublicHttpUrl
|
|
9
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GGZEC22A.js";
|
|
10
8
|
import {
|
|
11
9
|
buildPublicErrorEnvelope,
|
|
12
10
|
getDb
|
|
13
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GTGSD4YS.js";
|
|
14
12
|
|
|
15
13
|
// src/lib/media-extractor.ts
|
|
16
14
|
import { createWriteStream, mkdirSync, rmSync } from "fs";
|
|
@@ -732,4 +730,3 @@ export {
|
|
|
732
730
|
queuedCommonsDocumentCount,
|
|
733
731
|
semanticCommonsEntityScores
|
|
734
732
|
};
|
|
735
|
-
//# sourceMappingURL=chunk-AMLFKPLL.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
csvRecords
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RJ7JVYKU.js";
|
|
4
4
|
import {
|
|
5
5
|
getDb
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GTGSD4YS.js";
|
|
7
7
|
|
|
8
8
|
// src/api/location-data-repository.ts
|
|
9
9
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -681,4 +681,3 @@ export {
|
|
|
681
681
|
importHostedCensusPlacesCsv,
|
|
682
682
|
queryHostedLocationMarkets
|
|
683
683
|
};
|
|
684
|
-
//# sourceMappingURL=chunk-DKIG2TEE.js.map
|