@lobu/connector-sdk 6.1.1 → 7.0.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/dist/browser/acquire.d.ts +7 -0
- package/dist/browser/acquire.d.ts.map +1 -1
- package/dist/browser/acquire.js +68 -16
- package/dist/browser/acquire.js.map +1 -1
- package/dist/browser/cdp-page.d.ts.map +1 -1
- package/dist/browser/cdp-page.js +40 -12
- package/dist/browser/cdp-page.js.map +1 -1
- package/dist/browser/launcher.d.ts +1 -2
- package/dist/browser/launcher.d.ts.map +1 -1
- package/dist/browser/launcher.js +1 -1
- package/dist/browser/launcher.js.map +1 -1
- package/dist/browser-network.d.ts +6 -0
- package/dist/browser-network.d.ts.map +1 -1
- package/dist/browser-network.js +78 -31
- package/dist/browser-network.js.map +1 -1
- package/dist/connector-types.d.ts +32 -0
- package/dist/connector-types.d.ts.map +1 -1
- package/dist/connector-types.js.map +1 -1
- package/dist/index.d.ts +2 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +0 -134
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/api-paginated.d.ts +0 -79
- package/dist/api-paginated.d.ts.map +0 -1
- package/dist/api-paginated.js +0 -120
- package/dist/api-paginated.js.map +0 -1
- package/dist/base.d.ts +0 -65
- package/dist/base.d.ts.map +0 -1
- package/dist/base.js +0 -122
- package/dist/base.js.map +0 -1
- package/dist/browser-paginated.d.ts +0 -141
- package/dist/browser-paginated.d.ts.map +0 -1
- package/dist/browser-paginated.js +0 -269
- package/dist/browser-paginated.js.map +0 -1
- package/dist/http.d.ts +0 -18
- package/dist/http.d.ts.map +0 -1
- package/dist/http.js +0 -74
- package/dist/http.js.map +0 -1
- package/dist/paginated.d.ts +0 -93
- package/dist/paginated.d.ts.map +0 -1
- package/dist/paginated.js +0 -167
- package/dist/paginated.js.map +0 -1
package/dist/base.js
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { Value } from '@sinclair/typebox/value';
|
|
2
|
-
import { sdkLogger } from './logger.js';
|
|
3
|
-
export class RateLimitError extends Error {
|
|
4
|
-
retryAfterMs;
|
|
5
|
-
constructor(message, retryAfterMs) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = 'RateLimitError';
|
|
8
|
-
this.retryAfterMs = retryAfterMs;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Base feed implementation with common functionality
|
|
13
|
-
* All platform-specific feeds should extend this class
|
|
14
|
-
*/
|
|
15
|
-
export class BaseFeed {
|
|
16
|
-
authSchema = { methods: [{ type: 'none' }] };
|
|
17
|
-
getParentFeedDefinitions(_options) {
|
|
18
|
-
return [];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Validate options using TypeBox schema
|
|
22
|
-
* Subclasses can call this for schema validation before adding custom business logic
|
|
23
|
-
*/
|
|
24
|
-
validateWithSchema(options) {
|
|
25
|
-
try {
|
|
26
|
-
const errors = [...Value.Errors(this.optionsSchema, options)];
|
|
27
|
-
if (errors.length > 0) {
|
|
28
|
-
// Format first error for user-friendly message
|
|
29
|
-
const firstError = errors[0];
|
|
30
|
-
const field = firstError.path.replace(/^\//, '');
|
|
31
|
-
return `Invalid option ${field ? `"${field}"` : ''}: ${firstError.message}`;
|
|
32
|
-
}
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
catch (error) {
|
|
36
|
-
sdkLogger.error({ error }, '[BaseFeed] Schema validation error:');
|
|
37
|
-
return 'Invalid feed options format';
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Get rate limit information for this platform
|
|
42
|
-
* Override this method in platform-specific feeds
|
|
43
|
-
* Default is conservative: 10 requests per minute
|
|
44
|
-
*/
|
|
45
|
-
getRateLimit() {
|
|
46
|
-
return {
|
|
47
|
-
requests_per_minute: 10,
|
|
48
|
-
recommended_interval_ms: 6000, // 6 seconds
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Helper to check if content is newer than checkpoint
|
|
53
|
-
*/
|
|
54
|
-
isNewerThan(contentDate, checkpoint) {
|
|
55
|
-
if (!checkpoint || !checkpoint.last_timestamp)
|
|
56
|
-
return true;
|
|
57
|
-
return contentDate > checkpoint.last_timestamp;
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Calculate lookback date from options
|
|
61
|
-
* @param options - Feed options with optional lookback_days
|
|
62
|
-
* @param defaultDays - Default lookback period (default: 365)
|
|
63
|
-
*/
|
|
64
|
-
getLookbackDate(options, defaultDays = 365) {
|
|
65
|
-
const lookbackDays = options.lookback_days || defaultDays;
|
|
66
|
-
return new Date(Date.now() - lookbackDays * 24 * 60 * 60 * 1000);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Sleep for specified milliseconds (for rate limiting)
|
|
70
|
-
*/
|
|
71
|
-
sleep(ms) {
|
|
72
|
-
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Check if feed is in incremental mode
|
|
76
|
-
*/
|
|
77
|
-
isIncrementalMode(checkpoint, paginationToken) {
|
|
78
|
-
return !!checkpoint?.last_timestamp && !paginationToken;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Helper to deduplicate content by origin_id
|
|
82
|
-
*/
|
|
83
|
-
deduplicate(contents, seenIds) {
|
|
84
|
-
return contents.filter((c) => {
|
|
85
|
-
if (!c.origin_id)
|
|
86
|
-
return false;
|
|
87
|
-
if (seenIds.has(c.origin_id))
|
|
88
|
-
return false;
|
|
89
|
-
seenIds.add(c.origin_id);
|
|
90
|
-
return true;
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Handle HTTP errors with structured logging and platform-specific messages
|
|
95
|
-
*/
|
|
96
|
-
handleHTTPError(status, context, platformName) {
|
|
97
|
-
const platform = platformName || this.displayName;
|
|
98
|
-
sdkLogger.error({
|
|
99
|
-
status,
|
|
100
|
-
context,
|
|
101
|
-
platform: this.type,
|
|
102
|
-
timestamp: new Date().toISOString(),
|
|
103
|
-
}, `[${platform}Feed] HTTP ${status} error:`);
|
|
104
|
-
const errorMessages = {
|
|
105
|
-
400: `Bad request to ${platform}: ${context}. Check your feed options.`,
|
|
106
|
-
401: `Authentication failed for ${platform}. Check your API credentials.`,
|
|
107
|
-
403: `Access forbidden to ${platform} resource: ${context}. The resource may be private or require authentication.`,
|
|
108
|
-
404: `Resource not found on ${platform}: ${context}. Verify the resource exists.`,
|
|
109
|
-
422: `Invalid request to ${platform}: ${context}. Check your parameters.`,
|
|
110
|
-
429: `${platform} rate limit exceeded. Please wait before retrying.`,
|
|
111
|
-
500: `${platform} server error (${status}). This is temporary, please retry later.`,
|
|
112
|
-
502: `${platform} bad gateway (${status}). This is temporary, please retry later.`,
|
|
113
|
-
503: `${platform} service unavailable (${status}). This is temporary, please retry later.`,
|
|
114
|
-
};
|
|
115
|
-
const message = errorMessages[status] || `${platform} API error: ${status}`;
|
|
116
|
-
if (status === 429) {
|
|
117
|
-
throw new RateLimitError(message);
|
|
118
|
-
}
|
|
119
|
-
throw new Error(message);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
//# sourceMappingURL=base.js.map
|
package/dist/base.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../src/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAaxC,MAAM,OAAO,cAAe,SAAQ,KAAK;IAC9B,YAAY,CAAU;IAE/B,YAAY,OAAe,EAAE,YAAqB;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;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AW,EAAE;SACpC,EACD,IAAI,QAAQ,cAAc,MAAM,SAAS,CAC1C,CAAC;QAEF,MAAM,aAAa,GAA2B;YAC5C,GAAG,EAAE,kBAAkB,QAAQ,KAAK,OAAO,4BAA4B;YACvE,GAAG,EAAE,6BAA6B,QAAQ,+BAA+B;YACzE,GAAG,EAAE,uBAAuB,QAAQ,cAAc,OAAO,0DAA0D;YACnH,GAAG,EAAE,yBAAyB,QAAQ,KAAK,OAAO,+BAA+B;YACjF,GAAG,EAAE,sBAAsB,QAAQ,KAAK,OAAO,0BAA0B;YACzE,GAAG,EAAE,GAAG,QAAQ,oDAAoD;YACpE,GAAG,EAAE,GAAG,QAAQ,kBAAkB,MAAM,2CAA2C;YACnF,GAAG,EAAE,GAAG,QAAQ,iBAAiB,MAAM,2CAA2C;YAClF,GAAG,EAAE,GAAG,QAAQ,yBAAyB,MAAM,2CAA2C;SAC3F,CAAC;QAEF,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,GAAG,QAAQ,eAAe,MAAM,EAAE,CAAC;QAC5E,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;YACnB,MAAM,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Browser Paginated Feed Base Class
|
|
3
|
-
*
|
|
4
|
-
* Extends PaginatedFeed for browser-based feeds (Playwright).
|
|
5
|
-
*/
|
|
6
|
-
import type { Cookie, Page } from 'playwright';
|
|
7
|
-
import type { PageFetchResult, PaginatedCheckpoint, PaginationConfig } from './paginated.js';
|
|
8
|
-
import { PaginatedFeed } from './paginated.js';
|
|
9
|
-
import type { Checkpoint, Env, FeedOptions, FeedSyncResult, SessionState } from './types.js';
|
|
10
|
-
/**
|
|
11
|
-
* Browser session state - Playwright-compatible format
|
|
12
|
-
*/
|
|
13
|
-
export interface BrowserSessionState extends SessionState {
|
|
14
|
-
/** Playwright-compatible cookies */
|
|
15
|
-
cookies?: Cookie[];
|
|
16
|
-
/** localStorage key-value pairs (applied via page.evaluate) */
|
|
17
|
-
localStorage?: Record<string, string>;
|
|
18
|
-
/** Extra HTTP headers to set */
|
|
19
|
-
headers?: Record<string, string>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Cookie consent configuration for handling cookie banners
|
|
23
|
-
*/
|
|
24
|
-
export interface CookieConsentConfig {
|
|
25
|
-
/** CSS selectors to detect cookie consent banner */
|
|
26
|
-
bannerSelectors: string[];
|
|
27
|
-
/** CSS selectors for accept button */
|
|
28
|
-
acceptSelectors: string[];
|
|
29
|
-
/** Timeout in ms to wait for banner (default: 2000) */
|
|
30
|
-
timeout?: number;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* CAPTCHA detection configuration
|
|
34
|
-
*/
|
|
35
|
-
export interface CaptchaConfig {
|
|
36
|
-
/** Enable CAPTCHA detection (default: false) */
|
|
37
|
-
enabled: boolean;
|
|
38
|
-
/** CSS selectors that indicate CAPTCHA presence */
|
|
39
|
-
selectors?: string[];
|
|
40
|
-
/** Text patterns in page content that indicate CAPTCHA */
|
|
41
|
-
textPatterns?: string[];
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Browser configuration for the feed
|
|
45
|
-
*/
|
|
46
|
-
export interface BrowserFeedConfig {
|
|
47
|
-
/** Enable stealth mode to avoid bot detection (default: true) */
|
|
48
|
-
stealth: boolean;
|
|
49
|
-
/** Custom viewport dimensions (default: browser default) */
|
|
50
|
-
viewport?: {
|
|
51
|
-
width: number;
|
|
52
|
-
height: number;
|
|
53
|
-
};
|
|
54
|
-
/** Custom user agent (default: browser default) */
|
|
55
|
-
userAgent?: string;
|
|
56
|
-
/** Navigation waitUntil option */
|
|
57
|
-
waitUntil: 'load' | 'domcontentloaded' | 'networkidle';
|
|
58
|
-
/** Navigation timeout in ms (default: 60000) */
|
|
59
|
-
navigationTimeout: number;
|
|
60
|
-
/** Cookie consent handling configuration */
|
|
61
|
-
cookieConsent?: CookieConsentConfig;
|
|
62
|
-
/** CAPTCHA detection configuration */
|
|
63
|
-
captcha?: CaptchaConfig;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Browser-specific pagination configuration
|
|
67
|
-
*/
|
|
68
|
-
export interface BrowserPaginationConfig extends PaginationConfig {
|
|
69
|
-
/** Number of pages to fetch per sync run (default: 1, G2 uses 5) */
|
|
70
|
-
pagesPerRun: number;
|
|
71
|
-
/** Delay between page navigations in ms (default: 2000) */
|
|
72
|
-
pageDelayMs: number;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Base class for browser-based feeds with pagination
|
|
76
|
-
*/
|
|
77
|
-
export declare abstract class BrowserPaginatedFeed<TItem, TCheckpoint extends PaginatedCheckpoint = PaginatedCheckpoint> extends PaginatedFeed<TItem, TCheckpoint> {
|
|
78
|
-
readonly apiType: "browser";
|
|
79
|
-
private _browser;
|
|
80
|
-
private _page;
|
|
81
|
-
private _screenshotDir;
|
|
82
|
-
private _isFirstPage;
|
|
83
|
-
private _currentPageNumber;
|
|
84
|
-
/**
|
|
85
|
-
* ABSTRACT: Get browser configuration for this feed
|
|
86
|
-
*/
|
|
87
|
-
protected abstract getBrowserConfig(): BrowserFeedConfig;
|
|
88
|
-
/**
|
|
89
|
-
* ABSTRACT: Get base URL from feed options
|
|
90
|
-
*/
|
|
91
|
-
protected abstract getBaseUrl(options: FeedOptions): string;
|
|
92
|
-
/**
|
|
93
|
-
* ABSTRACT: Build URL for a specific page number
|
|
94
|
-
*/
|
|
95
|
-
protected abstract buildPageUrl(baseUrl: string, pageNumber: number): string;
|
|
96
|
-
/**
|
|
97
|
-
* ABSTRACT: Wait for page content to be ready after navigation
|
|
98
|
-
*/
|
|
99
|
-
protected abstract waitForContent(page: Page): Promise<void>;
|
|
100
|
-
/**
|
|
101
|
-
* ABSTRACT: Extract items from the current page DOM
|
|
102
|
-
*/
|
|
103
|
-
protected abstract extractItems(page: Page): Promise<TItem[]>;
|
|
104
|
-
/**
|
|
105
|
-
* Browser-specific pagination configuration
|
|
106
|
-
*/
|
|
107
|
-
protected getBrowserPaginationConfig(): BrowserPaginationConfig;
|
|
108
|
-
/**
|
|
109
|
-
* Override pull() to manage browser lifecycle
|
|
110
|
-
*/
|
|
111
|
-
pull(options: FeedOptions, checkpoint: TCheckpoint | null, env: Env, sessionState?: SessionState | null, updateCheckpointFn?: (checkpoint: Checkpoint) => Promise<void>): Promise<FeedSyncResult>;
|
|
112
|
-
/**
|
|
113
|
-
* Apply session state to browser page before navigation
|
|
114
|
-
*/
|
|
115
|
-
protected applySessionState(page: Page, sessionState: BrowserSessionState): Promise<void>;
|
|
116
|
-
/**
|
|
117
|
-
* Capture browser session state after sync for persistence
|
|
118
|
-
*/
|
|
119
|
-
protected captureSessionState(page: Page): Promise<BrowserSessionState>;
|
|
120
|
-
/**
|
|
121
|
-
* fetchPage() implementation for browser-based pagination
|
|
122
|
-
*/
|
|
123
|
-
protected fetchPage(cursor: string | null, options: FeedOptions, _env: Env): Promise<PageFetchResult<TItem>>;
|
|
124
|
-
/**
|
|
125
|
-
* Handle cookie consent banner
|
|
126
|
-
*/
|
|
127
|
-
protected handleCookieConsent(page: Page, config: CookieConsentConfig): Promise<void>;
|
|
128
|
-
/**
|
|
129
|
-
* Check for CAPTCHA and throw if detected
|
|
130
|
-
*/
|
|
131
|
-
protected checkForCaptcha(page: Page, config: CaptchaConfig): Promise<void>;
|
|
132
|
-
/**
|
|
133
|
-
* Get current page number
|
|
134
|
-
*/
|
|
135
|
-
protected getCurrentPageNumber(): number;
|
|
136
|
-
/**
|
|
137
|
-
* Get the Playwright page instance
|
|
138
|
-
*/
|
|
139
|
-
protected getPage(): Page | null;
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=browser-paginated.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
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
*/
|
|
7
|
-
import { captureErrorArtifacts, launchBrowser } from './browser/launcher.js';
|
|
8
|
-
import { sdkLogger } from './logger.js';
|
|
9
|
-
import { PaginatedFeed } from './paginated.js';
|
|
10
|
-
/**
|
|
11
|
-
* Base class for browser-based feeds with pagination
|
|
12
|
-
*/
|
|
13
|
-
export class BrowserPaginatedFeed extends PaginatedFeed {
|
|
14
|
-
apiType = 'browser';
|
|
15
|
-
_browser = null;
|
|
16
|
-
_page = null;
|
|
17
|
-
_screenshotDir = '';
|
|
18
|
-
_isFirstPage = true;
|
|
19
|
-
_currentPageNumber = 0;
|
|
20
|
-
/**
|
|
21
|
-
* Browser-specific pagination configuration
|
|
22
|
-
*/
|
|
23
|
-
getBrowserPaginationConfig() {
|
|
24
|
-
return {
|
|
25
|
-
...this.getPaginationConfig(),
|
|
26
|
-
pagesPerRun: 1,
|
|
27
|
-
pageDelayMs: 2000,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Override pull() to manage browser lifecycle
|
|
32
|
-
*/
|
|
33
|
-
async pull(options, checkpoint, env, sessionState, updateCheckpointFn) {
|
|
34
|
-
const config = this.getBrowserConfig();
|
|
35
|
-
const browserSessionState = sessionState;
|
|
36
|
-
const { browser, screenshotDir } = await launchBrowser(env, { stealth: config.stealth });
|
|
37
|
-
this._browser = browser;
|
|
38
|
-
this._page = (await browser.newPage());
|
|
39
|
-
this._screenshotDir = screenshotDir;
|
|
40
|
-
this._isFirstPage = true;
|
|
41
|
-
this._currentPageNumber = 0;
|
|
42
|
-
if (config.viewport) {
|
|
43
|
-
await this._page.setViewportSize(config.viewport);
|
|
44
|
-
}
|
|
45
|
-
if (config.userAgent) {
|
|
46
|
-
await this._page.setExtraHTTPHeaders({
|
|
47
|
-
'User-Agent': config.userAgent,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
if (browserSessionState) {
|
|
51
|
-
await this.applySessionState(this._page, browserSessionState);
|
|
52
|
-
}
|
|
53
|
-
try {
|
|
54
|
-
const result = await this.paginate(options, checkpoint, env, updateCheckpointFn);
|
|
55
|
-
let parentMapRecord;
|
|
56
|
-
if (result.parentMap && result.parentMap.size > 0) {
|
|
57
|
-
parentMapRecord = Object.fromEntries(result.parentMap);
|
|
58
|
-
}
|
|
59
|
-
const capturedSessionState = await this.captureSessionState(this._page);
|
|
60
|
-
return {
|
|
61
|
-
contents: result.contents,
|
|
62
|
-
checkpoint: result.checkpoint,
|
|
63
|
-
metadata: {
|
|
64
|
-
items_found: result.contents.length,
|
|
65
|
-
items_skipped: 0,
|
|
66
|
-
parent_map: parentMapRecord,
|
|
67
|
-
next_sync_recommended_at: result.nextSyncRecommendedAt,
|
|
68
|
-
},
|
|
69
|
-
auth_update: capturedSessionState,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
if (this._page) {
|
|
74
|
-
await captureErrorArtifacts(this._page, error, this.type, this._screenshotDir);
|
|
75
|
-
}
|
|
76
|
-
throw error;
|
|
77
|
-
}
|
|
78
|
-
finally {
|
|
79
|
-
if (this._browser) {
|
|
80
|
-
await this._browser.close();
|
|
81
|
-
this._browser = null;
|
|
82
|
-
this._page = null;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Apply session state to browser page before navigation
|
|
88
|
-
*/
|
|
89
|
-
async applySessionState(page, sessionState) {
|
|
90
|
-
if (sessionState.cookies && sessionState.cookies.length > 0) {
|
|
91
|
-
try {
|
|
92
|
-
await page.context().addCookies(sessionState.cookies);
|
|
93
|
-
sdkLogger.info({ cookieCount: sessionState.cookies.length }, `[${this.type}] Applied session cookies`);
|
|
94
|
-
}
|
|
95
|
-
catch (error) {
|
|
96
|
-
sdkLogger.warn({ error }, `[${this.type}] Failed to apply session cookies`);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (sessionState.headers && Object.keys(sessionState.headers).length > 0) {
|
|
100
|
-
try {
|
|
101
|
-
await page.setExtraHTTPHeaders(sessionState.headers);
|
|
102
|
-
sdkLogger.info({ headerCount: Object.keys(sessionState.headers).length }, `[${this.type}] Applied session headers`);
|
|
103
|
-
}
|
|
104
|
-
catch (error) {
|
|
105
|
-
sdkLogger.warn({ error }, `[${this.type}] Failed to apply session headers`);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
if (sessionState.localStorage && Object.keys(sessionState.localStorage).length > 0) {
|
|
109
|
-
sdkLogger.debug({ keyCount: Object.keys(sessionState.localStorage).length }, `[${this.type}] localStorage will be applied after first navigation`);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Capture browser session state after sync for persistence
|
|
114
|
-
*/
|
|
115
|
-
async captureSessionState(page) {
|
|
116
|
-
const sessionState = {};
|
|
117
|
-
try {
|
|
118
|
-
const cookies = await page.context().cookies();
|
|
119
|
-
if (cookies.length > 0) {
|
|
120
|
-
sessionState.cookies = cookies;
|
|
121
|
-
sdkLogger.debug({ cookieCount: cookies.length }, `[${this.type}] Captured session cookies`);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
sdkLogger.warn({ error }, `[${this.type}] Failed to capture session cookies`);
|
|
126
|
-
}
|
|
127
|
-
try {
|
|
128
|
-
const localStorage = await page.evaluate(() => {
|
|
129
|
-
const storage = {};
|
|
130
|
-
for (let i = 0; i < window.localStorage.length; i++) {
|
|
131
|
-
const key = window.localStorage.key(i);
|
|
132
|
-
if (key) {
|
|
133
|
-
storage[key] = window.localStorage.getItem(key) || '';
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return storage;
|
|
137
|
-
});
|
|
138
|
-
if (Object.keys(localStorage).length > 0) {
|
|
139
|
-
sessionState.localStorage = localStorage;
|
|
140
|
-
sdkLogger.debug({ keyCount: Object.keys(localStorage).length }, `[${this.type}] Captured localStorage`);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
catch (error) {
|
|
144
|
-
sdkLogger.debug({ error }, `[${this.type}] Could not capture localStorage (may be expected)`);
|
|
145
|
-
}
|
|
146
|
-
return sessionState;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* fetchPage() implementation for browser-based pagination
|
|
150
|
-
*/
|
|
151
|
-
async fetchPage(cursor, options, _env) {
|
|
152
|
-
const pageNumber = cursor ? parseInt(cursor, 10) : 1;
|
|
153
|
-
this._currentPageNumber = pageNumber;
|
|
154
|
-
const baseUrl = this.getBaseUrl(options);
|
|
155
|
-
const pageUrl = this.buildPageUrl(baseUrl, pageNumber);
|
|
156
|
-
const config = this.getBrowserConfig();
|
|
157
|
-
const paginationConfig = this.getBrowserPaginationConfig();
|
|
158
|
-
const page = this._page;
|
|
159
|
-
sdkLogger.info({ pageUrl, pageNumber, maxPages: paginationConfig.pagesPerRun }, `[${this.type}] Fetching page`);
|
|
160
|
-
await page.goto(pageUrl, {
|
|
161
|
-
waitUntil: config.waitUntil,
|
|
162
|
-
timeout: config.navigationTimeout,
|
|
163
|
-
});
|
|
164
|
-
if (this._isFirstPage && config.cookieConsent) {
|
|
165
|
-
await this.handleCookieConsent(page, config.cookieConsent);
|
|
166
|
-
this._isFirstPage = false;
|
|
167
|
-
}
|
|
168
|
-
if (config.captcha?.enabled) {
|
|
169
|
-
await this.checkForCaptcha(page, config.captcha);
|
|
170
|
-
}
|
|
171
|
-
await this.waitForContent(page);
|
|
172
|
-
const items = await this.extractItems(page);
|
|
173
|
-
sdkLogger.info({ itemCount: items.length, pageNumber }, `[${this.type}] Extracted items from page`);
|
|
174
|
-
const hasNext = items.length > 0 &&
|
|
175
|
-
items.length >= paginationConfig.pageSize &&
|
|
176
|
-
pageNumber < paginationConfig.pagesPerRun;
|
|
177
|
-
if (hasNext && paginationConfig.pageDelayMs > 0) {
|
|
178
|
-
await this.sleep(paginationConfig.pageDelayMs);
|
|
179
|
-
}
|
|
180
|
-
return {
|
|
181
|
-
items,
|
|
182
|
-
nextToken: hasNext ? String(pageNumber + 1) : null,
|
|
183
|
-
rawCount: items.length,
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Handle cookie consent banner
|
|
188
|
-
*/
|
|
189
|
-
async handleCookieConsent(page, config) {
|
|
190
|
-
try {
|
|
191
|
-
const timeout = config.timeout ?? 2000;
|
|
192
|
-
for (const selector of config.bannerSelectors) {
|
|
193
|
-
try {
|
|
194
|
-
const banner = await page.$(selector);
|
|
195
|
-
if (banner) {
|
|
196
|
-
for (const acceptSelector of config.acceptSelectors) {
|
|
197
|
-
try {
|
|
198
|
-
const acceptButton = await page.$(acceptSelector);
|
|
199
|
-
if (acceptButton) {
|
|
200
|
-
await acceptButton.click();
|
|
201
|
-
await this.sleep(1000);
|
|
202
|
-
sdkLogger.debug(`[${this.type}] Cookie consent accepted`);
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
catch (_e) {
|
|
207
|
-
// Try next accept selector
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
catch (_e) {
|
|
213
|
-
// Try next banner selector
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
const bannerSelector = config.bannerSelectors.join(', ');
|
|
217
|
-
try {
|
|
218
|
-
await page.waitForSelector(bannerSelector, { timeout });
|
|
219
|
-
const acceptSelector = config.acceptSelectors.join(', ');
|
|
220
|
-
await page.click(acceptSelector);
|
|
221
|
-
await this.sleep(1000);
|
|
222
|
-
sdkLogger.debug(`[${this.type}] Cookie consent accepted (waited)`);
|
|
223
|
-
}
|
|
224
|
-
catch (_e) {
|
|
225
|
-
// No cookie banner or already dismissed
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
catch (_e) {
|
|
229
|
-
sdkLogger.debug(`[${this.type}] No cookie banner found or already handled`);
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Check for CAPTCHA and throw if detected
|
|
234
|
-
*/
|
|
235
|
-
async checkForCaptcha(page, config) {
|
|
236
|
-
const hasCaptcha = await page.evaluate((cfg) => {
|
|
237
|
-
if (cfg.selectors) {
|
|
238
|
-
for (const selector of cfg.selectors) {
|
|
239
|
-
if (document.querySelector(selector))
|
|
240
|
-
return true;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
if (cfg.textPatterns) {
|
|
244
|
-
const bodyText = document.body.textContent || '';
|
|
245
|
-
for (const pattern of cfg.textPatterns) {
|
|
246
|
-
if (bodyText.includes(pattern))
|
|
247
|
-
return true;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return false;
|
|
251
|
-
}, { selectors: config.selectors, textPatterns: config.textPatterns });
|
|
252
|
-
if (hasCaptcha) {
|
|
253
|
-
throw new Error(`CAPTCHA detected - ${this.displayName} blocking access`);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* Get current page number
|
|
258
|
-
*/
|
|
259
|
-
getCurrentPageNumber() {
|
|
260
|
-
return this._currentPageNumber;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* Get the Playwright page instance
|
|
264
|
-
*/
|
|
265
|
-
getPage() {
|
|
266
|
-
return this._page;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
//# sourceMappingURL=browser-paginated.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-paginated.js","sourceRoot":"","sources":["../src/browser-paginated.ts"],"names":[],"mappings":"AAAA,2BAA2B;AAC3B;;;;GAIG;AAGH,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAqE/C;;GAEG;AACH,MAAM,OAAgB,oBAGpB,SAAQ,aAAiC;IAChC,OAAO,GAAG,SAAkB,CAAC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AC;IAED;;OAEG;IACO,oBAAoB;QAC5B,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACjC,CAAC;IAED;;OAEG;IACO,OAAO;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF"}
|
package/dist/http.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type KyInstance, type Options } from 'ky';
|
|
2
|
-
/**
|
|
3
|
-
* Create a configured ky instance with custom options
|
|
4
|
-
*/
|
|
5
|
-
export declare function createHttpClient(options?: Options): KyInstance;
|
|
6
|
-
/**
|
|
7
|
-
* Default HTTP client for feeds with standard User-Agent
|
|
8
|
-
*/
|
|
9
|
-
export declare const httpClient: KyInstance;
|
|
10
|
-
/**
|
|
11
|
-
* Create an HTTP client with authentication headers
|
|
12
|
-
*/
|
|
13
|
-
export declare function createAuthenticatedClient(authHeader: string, additionalHeaders?: Record<string, string>): KyInstance;
|
|
14
|
-
/**
|
|
15
|
-
* HTTP client for JSON APIs
|
|
16
|
-
*/
|
|
17
|
-
export declare const jsonHttpClient: KyInstance;
|
|
18
|
-
//# sourceMappingURL=http.d.ts.map
|
package/dist/http.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAW,EAAE,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,IAAI,CAAC;AA8BvD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,CAY9D;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,YAIrB,CAAC;AAEH;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,UAAU,CAQZ;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,YAMzB,CAAC"}
|
package/dist/http.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import ky from 'ky';
|
|
2
|
-
/**
|
|
3
|
-
* Shared HTTP client configuration for all feeds
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Default retry configuration
|
|
7
|
-
* - Max 2 retries (3 total attempts)
|
|
8
|
-
* - Only retry transient errors (429, 5xx)
|
|
9
|
-
* - Exponential backoff up to 5 seconds
|
|
10
|
-
* - 30s timeout per request
|
|
11
|
-
*/
|
|
12
|
-
const defaultRetryConfig = {
|
|
13
|
-
retry: {
|
|
14
|
-
limit: 2, // Max 2 retries (3 total attempts)
|
|
15
|
-
methods: ['get', 'post'],
|
|
16
|
-
statusCodes: [
|
|
17
|
-
408, // Request Timeout
|
|
18
|
-
429, // Too Many Requests (rate limit)
|
|
19
|
-
500, // Internal Server Error
|
|
20
|
-
502, // Bad Gateway
|
|
21
|
-
503, // Service Unavailable
|
|
22
|
-
504, // Gateway Timeout
|
|
23
|
-
],
|
|
24
|
-
backoffLimit: 5000, // Max 5 seconds delay between retries
|
|
25
|
-
},
|
|
26
|
-
timeout: 30000, // 30 second timeout per request
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Create a configured ky instance with custom options
|
|
30
|
-
*/
|
|
31
|
-
export function createHttpClient(options) {
|
|
32
|
-
return ky.create({
|
|
33
|
-
...defaultRetryConfig,
|
|
34
|
-
...options,
|
|
35
|
-
// Merge retry config if provided
|
|
36
|
-
retry: options?.retry
|
|
37
|
-
? {
|
|
38
|
-
...defaultRetryConfig.retry,
|
|
39
|
-
...(typeof options.retry === 'number' ? { limit: options.retry } : options.retry),
|
|
40
|
-
}
|
|
41
|
-
: defaultRetryConfig.retry,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Default HTTP client for feeds with standard User-Agent
|
|
46
|
-
*/
|
|
47
|
-
export const httpClient = createHttpClient({
|
|
48
|
-
headers: {
|
|
49
|
-
'User-Agent': 'UserResearchBot/1.0',
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
/**
|
|
53
|
-
* Create an HTTP client with authentication headers
|
|
54
|
-
*/
|
|
55
|
-
export function createAuthenticatedClient(authHeader, additionalHeaders) {
|
|
56
|
-
return createHttpClient({
|
|
57
|
-
headers: {
|
|
58
|
-
'User-Agent': 'UserResearchBot/1.0',
|
|
59
|
-
Authorization: authHeader,
|
|
60
|
-
...additionalHeaders,
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* HTTP client for JSON APIs
|
|
66
|
-
*/
|
|
67
|
-
export const jsonHttpClient = createHttpClient({
|
|
68
|
-
headers: {
|
|
69
|
-
'User-Agent': 'UserResearchBot/1.0',
|
|
70
|
-
Accept: 'application/json',
|
|
71
|
-
'Content-Type': 'application/json',
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=http.js.map
|
package/dist/http.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,MAAM,IAAI,CAAC;AAEvD;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,kBAAkB,GAAG;IACzB,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,EAAE,mCAAmC;QAC7C,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE;YACX,GAAG,EAAE,kBAAkB;YACvB,GAAG,EAAE,iCAAiC;YACtC,GAAG,EAAE,wBAAwB;YAC7B,GAAG,EAAE,cAAc;YACnB,GAAG,EAAE,sBAAsB;YAC3B,GAAG,EAAE,kBAAkB;SACxB;QACD,YAAY,EAAE,IAAI,EAAE,sCAAsC;KAC3D;IACD,OAAO,EAAE,KAAK,EAAE,gCAAgC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAiB;IACh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