@crawlee/utils 4.0.0-beta.107 → 4.0.0-beta.109
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 +1 -1
- package/package.json +4 -4
package/internals/sitemap.js
CHANGED
|
@@ -3,7 +3,6 @@ import { PassThrough, pipeline, Readable, Transform } from 'node:stream';
|
|
|
3
3
|
import { StringDecoder } from 'node:string_decoder';
|
|
4
4
|
import { createGunzip } from 'node:zlib';
|
|
5
5
|
import { FetchHttpClient } from '@crawlee/http-client';
|
|
6
|
-
import { fileTypeStream } from 'file-type';
|
|
7
6
|
import sax from 'sax';
|
|
8
7
|
import MIMEType from 'whatwg-mimetype';
|
|
9
8
|
import { mergeAsyncIterables } from './iterables.js';
|
|
@@ -181,6 +180,7 @@ export async function* parseSitemap(initialSources, proxyUrl, options) {
|
|
|
181
180
|
if (sitemapResponse.body === null) {
|
|
182
181
|
break;
|
|
183
182
|
}
|
|
183
|
+
const { fileTypeStream } = await import('file-type');
|
|
184
184
|
const streamWithType = await fileTypeStream(Readable.fromWeb(sitemapResponse.body));
|
|
185
185
|
if (streamWithType.fileType !== undefined) {
|
|
186
186
|
contentType = streamWithType.fileType.mime;
|
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.109",
|
|
4
4
|
"description": "A set of shared utilities that can be used by crawlers",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.0.0"
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@apify/ps-tree": "^1.2.0",
|
|
45
|
-
"@crawlee/http-client": "4.0.0-beta.
|
|
46
|
-
"@crawlee/types": "4.0.0-beta.
|
|
45
|
+
"@crawlee/http-client": "4.0.0-beta.109",
|
|
46
|
+
"@crawlee/types": "4.0.0-beta.109",
|
|
47
47
|
"@types/sax": "^1.2.7",
|
|
48
48
|
"cheerio": "^1.0.0",
|
|
49
49
|
"domhandler": "^5.0.3",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "81eaa3cdf1507951583c3b16b6570e7059ca50f8"
|
|
65
65
|
}
|