@crawlee/browser 4.0.0-beta.254 → 4.0.0-beta.255
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/internals/browser-crawler.js +2 -12
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BasicCrawler, browserPoolCookieToToughCookie, ContextPipeline, cookieStringToToughCookie, EnqueueStrategy, NavigationSkippedError, OwnedOrInjected, remainingNavigationWindowMillis, RequestState, ContextPipelineInitializationError, RequestHandlerError, RequestThrottledError, resolveBaseUrlForEnqueueLinksFiltering, SessionError, SessionRetiredError, toughCookieToBrowserPoolCookie, validators, } from '@crawlee/basic';
|
|
1
|
+
import { BasicCrawler, browserPoolCookieToToughCookie, ContextPipeline, cookieStringToToughCookie, EnqueueStrategy, NavigationSkippedError, skippedNavigationRequest, OwnedOrInjected, remainingNavigationWindowMillis, RequestState, ContextPipelineInitializationError, RequestHandlerError, RequestThrottledError, resolveBaseUrlForEnqueueLinksFiltering, SessionError, SessionRetiredError, toughCookieToBrowserPoolCookie, validators, } from '@crawlee/basic';
|
|
2
2
|
import { assertBrowserPoolNotConfigured, CLOUDFLARE_RETRY_CSS_SELECTORS, parseArgument, RETRY_CSS_SELECTORS, schemas, tryAbsoluteURL, } from '@crawlee/utils/internal';
|
|
3
3
|
import { sleep } from '@crawlee/utils';
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -235,17 +235,7 @@ export class BrowserCrawler extends BasicCrawler {
|
|
|
235
235
|
async #prepareNavigation(crawlingContext) {
|
|
236
236
|
if (crawlingContext.request.skipNavigation) {
|
|
237
237
|
return {
|
|
238
|
-
request:
|
|
239
|
-
get(target, propertyName) {
|
|
240
|
-
if (propertyName === 'loadedUrl') {
|
|
241
|
-
throw new NavigationSkippedError('The `request.loadedUrl` property is not available - `skipNavigation` was used');
|
|
242
|
-
}
|
|
243
|
-
// `target` as receiver and bound methods, or `#` members throw on the proxy
|
|
244
|
-
const value = Reflect.get(target, propertyName, target);
|
|
245
|
-
return typeof value === 'function' ? value.bind(target) : value;
|
|
246
|
-
},
|
|
247
|
-
set: (target, propertyName, value) => Reflect.set(target, propertyName, value, target),
|
|
248
|
-
}),
|
|
238
|
+
request: skippedNavigationRequest(crawlingContext.request),
|
|
249
239
|
get response() {
|
|
250
240
|
throw new NavigationSkippedError('The `response` property is not available - `skipNavigation` was used');
|
|
251
241
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/browser",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.255",
|
|
4
4
|
"description": "The scalable web crawling and scraping library for JavaScript/Node.js. Enables development of data extraction and web automation jobs (not only) with headless Chrome and Puppeteer.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.13.0"
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@apify/timeout": "^1.0.1",
|
|
51
|
-
"@crawlee/basic": "4.0.0-beta.
|
|
52
|
-
"@crawlee/browser-pool": "4.0.0-beta.
|
|
53
|
-
"@crawlee/types": "4.0.0-beta.
|
|
54
|
-
"@crawlee/utils": "4.0.0-beta.
|
|
51
|
+
"@crawlee/basic": "4.0.0-beta.255",
|
|
52
|
+
"@crawlee/browser-pool": "4.0.0-beta.255",
|
|
53
|
+
"@crawlee/types": "4.0.0-beta.255",
|
|
54
|
+
"@crawlee/utils": "4.0.0-beta.255",
|
|
55
55
|
"tslib": "^2.9.1",
|
|
56
56
|
"zod": "^4.6.7"
|
|
57
57
|
},
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "e1b2f6c415f90b3eca1686a39a8af5272b54046e"
|
|
78
78
|
}
|