mcp-scraper 0.76.0 → 0.78.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/CHANGELOG.md +23 -0
- package/README.md +1 -1
- package/dist/{analytics-repository-AUTJK4HK.js → analytics-repository-D5LEGQG3.js} +3 -3
- package/dist/bin/api-server.js +4 -4
- package/dist/bin/mcp-scraper-cli.js +3 -3
- package/dist/bin/mcp-scraper-core.js +7 -7
- package/dist/bin/mcp-scraper-install.js +2 -2
- package/dist/bin/mcp-stdio-server.js +7 -7
- package/dist/bin/paa-harvest.js +4 -4
- package/dist/{chunk-BOGRXBH2.js → chunk-2P2ZVRPK.js} +189 -57
- package/dist/{chunk-E6Y3VCOJ.js → chunk-3PUMNEOC.js} +3 -3
- package/dist/{chunk-KIPIBPUB.js → chunk-47ZCUBM5.js} +1 -1
- package/dist/{chunk-IBQNOZ7E.js → chunk-74CCAY6T.js} +1 -1
- package/dist/{chunk-7RQULQF3.js → chunk-B6L73AO4.js} +1 -1
- package/dist/{chunk-WFQ2E4WE.js → chunk-BTQ23KCT.js} +1 -1
- package/dist/{chunk-SDX6TRJ6.js → chunk-FODYEDZK.js} +3 -3
- package/dist/{chunk-PJEEKOUM.js → chunk-FUMG43EN.js} +1 -1
- package/dist/{chunk-XSYEDC25.js → chunk-IYYRSVRQ.js} +1 -1
- package/dist/{chunk-A66DGFOU.js → chunk-KAGHJQFO.js} +1 -1
- package/dist/{chunk-CXY5WV45.js → chunk-NGLZ6UJR.js} +1 -1
- package/dist/{chunk-WEFPBAAG.js → chunk-OU4FV2RP.js} +140 -4
- package/dist/{chunk-F5TK4KMT.js → chunk-OUBH6XMY.js} +1 -1
- package/dist/{chunk-77LQV73B.js → chunk-OWF2JJKN.js} +13 -1
- package/dist/{chunk-F6MUGMRN.js → chunk-UFJJGXVO.js} +702 -165
- package/dist/{chunk-KBTUPRTF.js → chunk-VEQPA65D.js} +1 -1
- package/dist/{chunk-D2O7V2CT.js → chunk-VMWSXKUQ.js} +1 -1
- package/dist/{chunk-JNFOBQVH.js → chunk-ZUCU2A6V.js} +1 -1
- package/dist/{db-566MOHHD.js → db-TA567JLA.js} +17 -1
- package/dist/{extract-bundle-OO74L67T.js → extract-bundle-P2DTUVY3.js} +3 -3
- package/dist/{gmail-service-TIU4V5JA.js → gmail-service-HN57R2GS.js} +4 -4
- package/dist/index.cjs +714 -165
- package/dist/index.d.cts +83 -1
- package/dist/index.d.ts +83 -1
- package/dist/index.js +4 -4
- package/dist/{lead-list-enrichment-repository-WWEMJ7EN.js → lead-list-enrichment-repository-5LEWW4X7.js} +2 -2
- package/dist/{location-data-repository-H4B2BWGY.js → location-data-repository-AHKDXTEQ.js} +2 -2
- package/dist/{server-IAGYCPN6.js → server-6B2OG3NN.js} +1434 -983
- package/dist/{site-extract-repository-B47JB62U.js → site-extract-repository-XKSVXSSY.js} +2 -2
- package/dist/{worker-DR6R7J46.js → worker-2BYACLNF.js} +6 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -126,6 +126,45 @@ interface HarvestInterruptionDiagnostic {
|
|
|
126
126
|
reasonSource: HarvestInterruptionReasonSource;
|
|
127
127
|
message: string | null;
|
|
128
128
|
}
|
|
129
|
+
type PaaDiscoveryStatus = 'in_progress' | 'target_reached' | 'frontier_exhausted' | 'no_paa_observed' | 'interrupted' | 'recovery_exhausted';
|
|
130
|
+
type PaaTargetStatus = 'met' | 'not_met';
|
|
131
|
+
type PaaMaterialStatus = 'complete' | 'partial';
|
|
132
|
+
interface PaaLifecycleDiagnostics {
|
|
133
|
+
requestedQuestions: number;
|
|
134
|
+
questionsFound: number;
|
|
135
|
+
targetStatus: PaaTargetStatus;
|
|
136
|
+
discoveryStatus: PaaDiscoveryStatus;
|
|
137
|
+
materialStatus: PaaMaterialStatus;
|
|
138
|
+
completionReason: string;
|
|
139
|
+
automaticRetries: number;
|
|
140
|
+
knownQuestions: number;
|
|
141
|
+
processedQuestions: number;
|
|
142
|
+
failedInteractions: number;
|
|
143
|
+
noGrowthConfirmations: number;
|
|
144
|
+
}
|
|
145
|
+
type PaaProgressPhase = 'serp_captured' | 'discovered' | 'click_observed' | 'answer_captured' | 'fill_incomplete' | 'expansion_finished' | 'attempt_ending';
|
|
146
|
+
/** Material already observed before PAA expansion completes. It is checkpointed
|
|
147
|
+
* so a worker interruption cannot discard the SERP that led to the PAA graph. */
|
|
148
|
+
interface PaaProgressMaterial {
|
|
149
|
+
surface: GoogleSurface;
|
|
150
|
+
aiOverview: AIOverviewResult;
|
|
151
|
+
aiMode: AIModeResult;
|
|
152
|
+
whatPeopleSaying: WhatPeopleSayingCard[];
|
|
153
|
+
videos: VideoResult[];
|
|
154
|
+
forums: ForumResult[];
|
|
155
|
+
organicResults: OrganicResult[];
|
|
156
|
+
localPack: LocalPackBusiness[];
|
|
157
|
+
entityIds: EntityIds;
|
|
158
|
+
}
|
|
159
|
+
interface PaaProgressSnapshot {
|
|
160
|
+
sequence: number;
|
|
161
|
+
observedAt: string;
|
|
162
|
+
clickedQuestions: string[];
|
|
163
|
+
phase: PaaProgressPhase;
|
|
164
|
+
records: FlatRow[];
|
|
165
|
+
lifecycle?: PaaLifecycleDiagnostics;
|
|
166
|
+
material?: PaaProgressMaterial;
|
|
167
|
+
}
|
|
129
168
|
interface HarvestDiagnostics {
|
|
130
169
|
completionStatus: HarvestCompletionStatus;
|
|
131
170
|
/** Set only when the extractor directly observed a readable SERP without a PAA block. */
|
|
@@ -137,9 +176,23 @@ interface HarvestDiagnostics {
|
|
|
137
176
|
retryRecommended?: boolean;
|
|
138
177
|
interruption?: HarvestInterruptionDiagnostic;
|
|
139
178
|
warnings?: HarvestDiagnosticWarning[];
|
|
179
|
+
links?: HarvestLinkDiagnostics;
|
|
140
180
|
completeness?: HarvestCompleteness;
|
|
181
|
+
paaLifecycle?: PaaLifecycleDiagnostics;
|
|
141
182
|
debug?: HarvestDebugSnapshot;
|
|
142
183
|
}
|
|
184
|
+
interface HarvestLinkDiagnostics {
|
|
185
|
+
linkCandidatesObserved: number;
|
|
186
|
+
plainLinksObserved: number;
|
|
187
|
+
googleUrlRedirectsObserved: number;
|
|
188
|
+
googleGotoRedirectsObserved: number;
|
|
189
|
+
redirectsResolved: number;
|
|
190
|
+
redirectsUnresolved: number;
|
|
191
|
+
redirectsRejected: number;
|
|
192
|
+
resolverNonGoogleRequestsObserved: number;
|
|
193
|
+
paaSourcesPreserved: number;
|
|
194
|
+
aiOverviewLabelValidated: boolean;
|
|
195
|
+
}
|
|
143
196
|
interface BrowserNetworkLocationDebug {
|
|
144
197
|
source: 'ipapi.co' | 'ipwho.is' | 'api64.ipify.org';
|
|
145
198
|
ip: string | null;
|
|
@@ -234,23 +287,44 @@ interface HarvestDebugSnapshot {
|
|
|
234
287
|
browser: BrowserDebugSnapshot;
|
|
235
288
|
locationEvidence?: SerpLocationEvidence;
|
|
236
289
|
}
|
|
290
|
+
type SerpLinkType = 'plain' | 'google_url_redirect' | 'google_goto_redirect';
|
|
291
|
+
type SerpLinkResolutionStatus = 'not_needed' | 'resolved' | 'unresolved' | 'rejected';
|
|
292
|
+
interface SerpOutboundLink {
|
|
293
|
+
url: string;
|
|
294
|
+
rawUrl: string;
|
|
295
|
+
resolvedUrl: string | null;
|
|
296
|
+
linkType: SerpLinkType;
|
|
297
|
+
resolutionStatus: SerpLinkResolutionStatus;
|
|
298
|
+
}
|
|
299
|
+
interface PaaSource extends SerpOutboundLink {
|
|
300
|
+
title: string | null;
|
|
301
|
+
site: string | null;
|
|
302
|
+
}
|
|
237
303
|
interface PAANode {
|
|
304
|
+
questionId: string;
|
|
305
|
+
googleLinkId: string | null;
|
|
306
|
+
googleEvidenceId: string | null;
|
|
238
307
|
question: string;
|
|
239
308
|
answer: string | null;
|
|
240
309
|
sourceTitle: string | null;
|
|
241
310
|
sourceSite: string | null;
|
|
242
311
|
sourceCite: string | null;
|
|
312
|
+
sources: PaaSource[];
|
|
243
313
|
depth: number;
|
|
244
314
|
parentQuestion: string | null;
|
|
245
315
|
children: PAANode[];
|
|
246
316
|
}
|
|
247
317
|
interface FlatRow {
|
|
248
318
|
seed_query: string;
|
|
319
|
+
question_id: string;
|
|
320
|
+
google_link_id: string;
|
|
321
|
+
google_evidence_id: string;
|
|
249
322
|
question: string;
|
|
250
323
|
answer: string;
|
|
251
324
|
source_title: string;
|
|
252
325
|
source_site: string;
|
|
253
326
|
source_cite: string;
|
|
327
|
+
sources: PaaSource[];
|
|
254
328
|
depth: number;
|
|
255
329
|
parent_question: string;
|
|
256
330
|
extracted_at: string;
|
|
@@ -283,6 +357,10 @@ interface WhatPeopleSayingCard {
|
|
|
283
357
|
interface AICitation {
|
|
284
358
|
text: string;
|
|
285
359
|
href: string;
|
|
360
|
+
rawUrl: string;
|
|
361
|
+
resolvedUrl: string | null;
|
|
362
|
+
linkType: SerpLinkType;
|
|
363
|
+
resolutionStatus: SerpLinkResolutionStatus;
|
|
286
364
|
}
|
|
287
365
|
interface AIOverviewResult {
|
|
288
366
|
detected: boolean;
|
|
@@ -303,6 +381,10 @@ interface OrganicResult {
|
|
|
303
381
|
position: number;
|
|
304
382
|
title: string;
|
|
305
383
|
url: string;
|
|
384
|
+
rawUrl: string;
|
|
385
|
+
resolvedUrl: string | null;
|
|
386
|
+
linkType: SerpLinkType;
|
|
387
|
+
resolutionStatus: SerpLinkResolutionStatus;
|
|
306
388
|
domain: string;
|
|
307
389
|
cite: string | null;
|
|
308
390
|
snippet: string | null;
|
|
@@ -404,4 +486,4 @@ interface ClipPromptPair {
|
|
|
404
486
|
}
|
|
405
487
|
declare function buildClipPrompts(question: string, answer: string): Promise<ClipPromptPair>;
|
|
406
488
|
|
|
407
|
-
export { type AICitation, type AIModeResult, type AIOverviewResult, type ClipPairOptions, type ClipPairResult, type FlatRow, type GoogleSurface, type HarvestCompletionStatus, type HarvestDiagnostics, type HarvestOptions, type HarvestResult, type HarvestStats, type PAANode, VideoGenerator, type WhatPeopleSayingCard, buildClipPrompts, harvest };
|
|
489
|
+
export { type AICitation, type AIModeResult, type AIOverviewResult, type ClipPairOptions, type ClipPairResult, type FlatRow, type GoogleSurface, type HarvestCompletionStatus, type HarvestDiagnostics, type HarvestOptions, type HarvestResult, type HarvestStats, type PAANode, type PaaDiscoveryStatus, type PaaLifecycleDiagnostics, type PaaMaterialStatus, type PaaProgressMaterial, type PaaProgressSnapshot, type PaaTargetStatus, VideoGenerator, type WhatPeopleSayingCard, buildClipPrompts, harvest };
|
package/dist/index.d.ts
CHANGED
|
@@ -126,6 +126,45 @@ interface HarvestInterruptionDiagnostic {
|
|
|
126
126
|
reasonSource: HarvestInterruptionReasonSource;
|
|
127
127
|
message: string | null;
|
|
128
128
|
}
|
|
129
|
+
type PaaDiscoveryStatus = 'in_progress' | 'target_reached' | 'frontier_exhausted' | 'no_paa_observed' | 'interrupted' | 'recovery_exhausted';
|
|
130
|
+
type PaaTargetStatus = 'met' | 'not_met';
|
|
131
|
+
type PaaMaterialStatus = 'complete' | 'partial';
|
|
132
|
+
interface PaaLifecycleDiagnostics {
|
|
133
|
+
requestedQuestions: number;
|
|
134
|
+
questionsFound: number;
|
|
135
|
+
targetStatus: PaaTargetStatus;
|
|
136
|
+
discoveryStatus: PaaDiscoveryStatus;
|
|
137
|
+
materialStatus: PaaMaterialStatus;
|
|
138
|
+
completionReason: string;
|
|
139
|
+
automaticRetries: number;
|
|
140
|
+
knownQuestions: number;
|
|
141
|
+
processedQuestions: number;
|
|
142
|
+
failedInteractions: number;
|
|
143
|
+
noGrowthConfirmations: number;
|
|
144
|
+
}
|
|
145
|
+
type PaaProgressPhase = 'serp_captured' | 'discovered' | 'click_observed' | 'answer_captured' | 'fill_incomplete' | 'expansion_finished' | 'attempt_ending';
|
|
146
|
+
/** Material already observed before PAA expansion completes. It is checkpointed
|
|
147
|
+
* so a worker interruption cannot discard the SERP that led to the PAA graph. */
|
|
148
|
+
interface PaaProgressMaterial {
|
|
149
|
+
surface: GoogleSurface;
|
|
150
|
+
aiOverview: AIOverviewResult;
|
|
151
|
+
aiMode: AIModeResult;
|
|
152
|
+
whatPeopleSaying: WhatPeopleSayingCard[];
|
|
153
|
+
videos: VideoResult[];
|
|
154
|
+
forums: ForumResult[];
|
|
155
|
+
organicResults: OrganicResult[];
|
|
156
|
+
localPack: LocalPackBusiness[];
|
|
157
|
+
entityIds: EntityIds;
|
|
158
|
+
}
|
|
159
|
+
interface PaaProgressSnapshot {
|
|
160
|
+
sequence: number;
|
|
161
|
+
observedAt: string;
|
|
162
|
+
clickedQuestions: string[];
|
|
163
|
+
phase: PaaProgressPhase;
|
|
164
|
+
records: FlatRow[];
|
|
165
|
+
lifecycle?: PaaLifecycleDiagnostics;
|
|
166
|
+
material?: PaaProgressMaterial;
|
|
167
|
+
}
|
|
129
168
|
interface HarvestDiagnostics {
|
|
130
169
|
completionStatus: HarvestCompletionStatus;
|
|
131
170
|
/** Set only when the extractor directly observed a readable SERP without a PAA block. */
|
|
@@ -137,9 +176,23 @@ interface HarvestDiagnostics {
|
|
|
137
176
|
retryRecommended?: boolean;
|
|
138
177
|
interruption?: HarvestInterruptionDiagnostic;
|
|
139
178
|
warnings?: HarvestDiagnosticWarning[];
|
|
179
|
+
links?: HarvestLinkDiagnostics;
|
|
140
180
|
completeness?: HarvestCompleteness;
|
|
181
|
+
paaLifecycle?: PaaLifecycleDiagnostics;
|
|
141
182
|
debug?: HarvestDebugSnapshot;
|
|
142
183
|
}
|
|
184
|
+
interface HarvestLinkDiagnostics {
|
|
185
|
+
linkCandidatesObserved: number;
|
|
186
|
+
plainLinksObserved: number;
|
|
187
|
+
googleUrlRedirectsObserved: number;
|
|
188
|
+
googleGotoRedirectsObserved: number;
|
|
189
|
+
redirectsResolved: number;
|
|
190
|
+
redirectsUnresolved: number;
|
|
191
|
+
redirectsRejected: number;
|
|
192
|
+
resolverNonGoogleRequestsObserved: number;
|
|
193
|
+
paaSourcesPreserved: number;
|
|
194
|
+
aiOverviewLabelValidated: boolean;
|
|
195
|
+
}
|
|
143
196
|
interface BrowserNetworkLocationDebug {
|
|
144
197
|
source: 'ipapi.co' | 'ipwho.is' | 'api64.ipify.org';
|
|
145
198
|
ip: string | null;
|
|
@@ -234,23 +287,44 @@ interface HarvestDebugSnapshot {
|
|
|
234
287
|
browser: BrowserDebugSnapshot;
|
|
235
288
|
locationEvidence?: SerpLocationEvidence;
|
|
236
289
|
}
|
|
290
|
+
type SerpLinkType = 'plain' | 'google_url_redirect' | 'google_goto_redirect';
|
|
291
|
+
type SerpLinkResolutionStatus = 'not_needed' | 'resolved' | 'unresolved' | 'rejected';
|
|
292
|
+
interface SerpOutboundLink {
|
|
293
|
+
url: string;
|
|
294
|
+
rawUrl: string;
|
|
295
|
+
resolvedUrl: string | null;
|
|
296
|
+
linkType: SerpLinkType;
|
|
297
|
+
resolutionStatus: SerpLinkResolutionStatus;
|
|
298
|
+
}
|
|
299
|
+
interface PaaSource extends SerpOutboundLink {
|
|
300
|
+
title: string | null;
|
|
301
|
+
site: string | null;
|
|
302
|
+
}
|
|
237
303
|
interface PAANode {
|
|
304
|
+
questionId: string;
|
|
305
|
+
googleLinkId: string | null;
|
|
306
|
+
googleEvidenceId: string | null;
|
|
238
307
|
question: string;
|
|
239
308
|
answer: string | null;
|
|
240
309
|
sourceTitle: string | null;
|
|
241
310
|
sourceSite: string | null;
|
|
242
311
|
sourceCite: string | null;
|
|
312
|
+
sources: PaaSource[];
|
|
243
313
|
depth: number;
|
|
244
314
|
parentQuestion: string | null;
|
|
245
315
|
children: PAANode[];
|
|
246
316
|
}
|
|
247
317
|
interface FlatRow {
|
|
248
318
|
seed_query: string;
|
|
319
|
+
question_id: string;
|
|
320
|
+
google_link_id: string;
|
|
321
|
+
google_evidence_id: string;
|
|
249
322
|
question: string;
|
|
250
323
|
answer: string;
|
|
251
324
|
source_title: string;
|
|
252
325
|
source_site: string;
|
|
253
326
|
source_cite: string;
|
|
327
|
+
sources: PaaSource[];
|
|
254
328
|
depth: number;
|
|
255
329
|
parent_question: string;
|
|
256
330
|
extracted_at: string;
|
|
@@ -283,6 +357,10 @@ interface WhatPeopleSayingCard {
|
|
|
283
357
|
interface AICitation {
|
|
284
358
|
text: string;
|
|
285
359
|
href: string;
|
|
360
|
+
rawUrl: string;
|
|
361
|
+
resolvedUrl: string | null;
|
|
362
|
+
linkType: SerpLinkType;
|
|
363
|
+
resolutionStatus: SerpLinkResolutionStatus;
|
|
286
364
|
}
|
|
287
365
|
interface AIOverviewResult {
|
|
288
366
|
detected: boolean;
|
|
@@ -303,6 +381,10 @@ interface OrganicResult {
|
|
|
303
381
|
position: number;
|
|
304
382
|
title: string;
|
|
305
383
|
url: string;
|
|
384
|
+
rawUrl: string;
|
|
385
|
+
resolvedUrl: string | null;
|
|
386
|
+
linkType: SerpLinkType;
|
|
387
|
+
resolutionStatus: SerpLinkResolutionStatus;
|
|
306
388
|
domain: string;
|
|
307
389
|
cite: string | null;
|
|
308
390
|
snippet: string | null;
|
|
@@ -404,4 +486,4 @@ interface ClipPromptPair {
|
|
|
404
486
|
}
|
|
405
487
|
declare function buildClipPrompts(question: string, answer: string): Promise<ClipPromptPair>;
|
|
406
488
|
|
|
407
|
-
export { type AICitation, type AIModeResult, type AIOverviewResult, type ClipPairOptions, type ClipPairResult, type FlatRow, type GoogleSurface, type HarvestCompletionStatus, type HarvestDiagnostics, type HarvestOptions, type HarvestResult, type HarvestStats, type PAANode, VideoGenerator, type WhatPeopleSayingCard, buildClipPrompts, harvest };
|
|
489
|
+
export { type AICitation, type AIModeResult, type AIOverviewResult, type ClipPairOptions, type ClipPairResult, type FlatRow, type GoogleSurface, type HarvestCompletionStatus, type HarvestDiagnostics, type HarvestOptions, type HarvestResult, type HarvestStats, type PAANode, type PaaDiscoveryStatus, type PaaLifecycleDiagnostics, type PaaMaterialStatus, type PaaProgressMaterial, type PaaProgressSnapshot, type PaaTargetStatus, VideoGenerator, type WhatPeopleSayingCard, buildClipPrompts, harvest };
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
harvest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-UFJJGXVO.js";
|
|
4
4
|
import "./chunk-OM7HVEJ3.js";
|
|
5
5
|
import {
|
|
6
6
|
recordVendorUsage
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-NGLZ6UJR.js";
|
|
8
|
+
import "./chunk-OWF2JJKN.js";
|
|
9
|
+
import "./chunk-OU4FV2RP.js";
|
|
10
10
|
|
|
11
11
|
// src/video/VideoGenerator.ts
|
|
12
12
|
import { execSync as execSync2 } from "child_process";
|
|
@@ -30,8 +30,8 @@ import {
|
|
|
30
30
|
saveLeadListEnrichmentRowResult,
|
|
31
31
|
setInitializingLeadListEnrichmentConcurrencyLock,
|
|
32
32
|
stableCanonicalJson
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-KAGHJQFO.js";
|
|
34
|
+
import "./chunk-OU4FV2RP.js";
|
|
35
35
|
export {
|
|
36
36
|
LEAD_LIST_MAX_DISPATCH_ATTEMPTS,
|
|
37
37
|
LEAD_LIST_RUNNING_STALE_MINUTES,
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
parseHostedCensusPlacesCsv,
|
|
14
14
|
parseHostedZipGroupsCsv,
|
|
15
15
|
queryHostedLocationMarkets
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-OUBH6XMY.js";
|
|
17
17
|
import "./chunk-RJ7JVYKU.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-OU4FV2RP.js";
|
|
19
19
|
export {
|
|
20
20
|
HOSTED_CENSUS_DATASET_PREFIX,
|
|
21
21
|
HOSTED_ZIP_DATASET_KIND,
|