@crawlee/cli 4.0.0-beta.327 → 4.0.0-beta.329
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/cli",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.329",
|
|
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"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@crawlee/templates": "4.0.0-beta.
|
|
48
|
+
"@crawlee/templates": "4.0.0-beta.329",
|
|
49
49
|
"@inquirer/prompts": "^8.8.1",
|
|
50
50
|
"ansi-colors": "^4.1.3",
|
|
51
51
|
"semver": "^7.8.5",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "7f1d0bda4520e50564905c9a525fbadd735a9684"
|
|
63
63
|
}
|
|
@@ -140,7 +140,7 @@ import { SitemapRequestLoader } from 'crawlee';
|
|
|
140
140
|
const loader = await SitemapRequestLoader.open({ sitemapUrls: ['https://example.com/sitemap.xml'] });
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
The default `KeyValueStore` key used to persist the loader's state was also renamed from `SITEMAP_REQUEST_LIST_STATE` to `
|
|
143
|
+
The default `KeyValueStore` key used to persist the loader's state was also renamed from `SITEMAP_REQUEST_LIST_STATE` to `CRAWLEE_SITEMAP_REQUEST_LOADER_STATE`. State persisted under the old key by a v3 run will **not** be picked up after upgrading; resuming a v3 crawl on v4 is not supported, so finish or discard in-flight sitemap crawls before upgrading.
|
|
144
144
|
|
|
145
145
|
### Crawler `requestList` / `requestQueue` options deprecated in favor of `requestManager`
|
|
146
146
|
|
|
@@ -80,7 +80,7 @@ The purely mechanical renames, collected in one place. Where a row links to a se
|
|
|
80
80
|
| `statistics.startJob()` / `finishJob()` / `failJob()` | `recordRequestStart()` / `recordRequestSuccess()` / `recordRequestFailure()` ([details](./statistics.md#the-request-recording-methods-are-renamed)) |
|
|
81
81
|
| `browserPoolOptions` | `browserPool` + a `*BrowserPool()` factory ([details](#browserpooloptions-is-removed)) |
|
|
82
82
|
| `gotScraping` (from `@crawlee/utils`) | `GotScrapingHttpClient` (`@crawlee/got-scraping-client`) |
|
|
83
|
-
| `SDK_
|
|
83
|
+
| Internal KVS keys (`SDK_*` and others) | `CRAWLEE_*` keys ([details](#internal-kvs-keys-renamed)) |
|
|
84
84
|
| `ArgumentError` (from `ow`) | `ArgumentValidationError` ([details](#argument-validation-errors-use-zod)) |
|
|
85
85
|
|
|
86
86
|
## Changes most users will hit
|
|
@@ -564,7 +564,7 @@ The `PersistenceOptions` argument of `persistState()` and `resetStore()` and the
|
|
|
564
564
|
|
|
565
565
|
With both `state` and `persistStateKey` set, the record now wins. Previously `state` did. The option is also validated up front: `nextIndex` must be a non-negative integer and `inProgress` an array of unique keys. The `@internal` `isStatePersisted` flag is gone.
|
|
566
566
|
|
|
567
|
-
Both `SessionPool` and `RequestList` now persist through `RecoverableState`, like `Statistics`. Resuming a v3 crawl on v4 is not supported: `RequestList` stores its records under
|
|
567
|
+
Both `SessionPool` and `RequestList` now persist through `RecoverableState`, like `Statistics`. Resuming a v3 crawl on v4 is not supported: `RequestList` stores its records under [new keys](#internal-kvs-keys-renamed), so a v4 run does not find a v3 run's state and starts the list from the beginning. Finish or discard in-flight crawls before upgrading.
|
|
568
568
|
|
|
569
569
|
### `retireOnBlockedStatusCodes` is removed from `Session`
|
|
570
570
|
|
|
@@ -1182,7 +1182,20 @@ With `respectRobotsTxtFile` enabled, a site that answers `/robots.txt` with a `5
|
|
|
1182
1182
|
|
|
1183
1183
|
### Internal KVS keys renamed
|
|
1184
1184
|
|
|
1185
|
-
|
|
1185
|
+
Crawlee keeps its internal state in the default key-value store. These records now use the `CRAWLEE_` prefix and upper snake case, with the dynamic part at the end. Crawlee for Python uses the same keys.
|
|
1186
|
+
|
|
1187
|
+
| Record | v3 key | v4 key |
|
|
1188
|
+
| --- | --- | --- |
|
|
1189
|
+
| Crawler statistics | `SDK_CRAWLER_STATISTICS_{id}` | `CRAWLEE_CRAWLER_STATISTICS_{id}` |
|
|
1190
|
+
| Session pool | `SDK_SESSION_POOL_STATE` | `CRAWLEE_SESSION_POOL_STATE_{id}` |
|
|
1191
|
+
| Request list progress | `SDK_{name}-REQUEST_LIST_STATE` | `CRAWLEE_REQUEST_LIST_STATE_{name}` |
|
|
1192
|
+
| Request list requests | `SDK_{name}-REQUEST_LIST_REQUESTS` | `CRAWLEE_REQUEST_LIST_REQUESTS_{name}` |
|
|
1193
|
+
| Sitemap request loader | `SITEMAP_REQUEST_LIST_STATE` | `CRAWLEE_SITEMAP_REQUEST_LOADER_STATE` |
|
|
1194
|
+
| Rendering type predictor | `rendering-type-predictor-state` | `CRAWLEE_RENDERING_TYPE_PREDICTOR_STATE_{id}` |
|
|
1195
|
+
|
|
1196
|
+
A `persistStateKey` or `persistRequestsKey` you pass to `RequestList` is used as it is, without the `SDK_` prefix v3 added, so a v4 run doesn't find the v3 record under `SDK_{key}`. The `{id}` of the statistics, the session pool, the rendering type predictor and the `ThrottlingRequestManager` comes from their `id` option. Without one, each class numbers its instances in creation order. The ones a crawler creates take the crawler's `id` option when it is set. Adaptive crawlers no longer share one rendering type model. The `ThrottlingRequestManager` stores its domain list under `CRAWLEE_THROTTLED_DOMAINS_{id}` and opens its per-domain queues under the alias `throttled-{id}-{domain}`.
|
|
1197
|
+
|
|
1198
|
+
v4 doesn't read the v3 keys. Resuming a v3 crawl on v4 is not supported, so finish or discard in-flight crawls before upgrading.
|
|
1186
1199
|
|
|
1187
1200
|
## Only if you subclassed crawlers or touched internals
|
|
1188
1201
|
|