@crawlee/utils 4.0.0-beta.280 → 4.0.0-beta.281
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/sitemap.js +5 -3
- package/package.json +4 -4
package/internals/sitemap.js
CHANGED
|
@@ -239,6 +239,10 @@ export async function* parseSitemap(initialSources, proxyUrl, options) {
|
|
|
239
239
|
// URL entries dropped by the enqueue strategy filter, reported in one warning per sitemap after
|
|
240
240
|
// the loop (per-entry warnings could flood the log; individual drops are logged at debug level).
|
|
241
241
|
let droppedUrlEntries = 0;
|
|
242
|
+
// The same for every entry of this source, so compute it once.
|
|
243
|
+
const originSitemapUrl = source.type === 'url'
|
|
244
|
+
? source.url
|
|
245
|
+
: `raw://${createHash('sha256').update(source.content).digest('base64')}`;
|
|
242
246
|
const iterator = items[Symbol.asyncIterator]();
|
|
243
247
|
try {
|
|
244
248
|
while (true) {
|
|
@@ -288,9 +292,7 @@ export async function* parseSitemap(initialSources, proxyUrl, options) {
|
|
|
288
292
|
}
|
|
289
293
|
yield {
|
|
290
294
|
...item,
|
|
291
|
-
originSitemapUrl
|
|
292
|
-
? source.url
|
|
293
|
-
: `raw://${createHash('sha256').update(source.content).digest('base64')}`,
|
|
295
|
+
originSitemapUrl,
|
|
294
296
|
};
|
|
295
297
|
}
|
|
296
298
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/utils",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.281",
|
|
4
4
|
"description": "A set of shared utilities that can be used by crawlers",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.13.0"
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@apify/validations": "^1.1.4",
|
|
46
|
-
"@crawlee/http-client": "4.0.0-beta.
|
|
47
|
-
"@crawlee/types": "4.0.0-beta.
|
|
46
|
+
"@crawlee/http-client": "4.0.0-beta.281",
|
|
47
|
+
"@crawlee/types": "4.0.0-beta.281",
|
|
48
48
|
"@types/sax": "^1.2.7",
|
|
49
49
|
"cheerio": "^1.2.0",
|
|
50
50
|
"domhandler": "^6.0.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "33097a119abbfb05f40cd188a290aafc2cfa9f53"
|
|
67
67
|
}
|