@crawlee/core 3.17.1-beta.67 → 3.17.1-beta.69
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.
|
@@ -194,7 +194,7 @@ export declare function enqueueLinks(options: SetRequired<Omit<EnqueueLinksOptio
|
|
|
194
194
|
* request domain, or a redirected one
|
|
195
195
|
* - In all other cases, we return the domain of the original request as that's the one we need to use for filtering
|
|
196
196
|
*/
|
|
197
|
-
export declare function resolveBaseUrlForEnqueueLinksFiltering({ enqueueStrategy, finalRequestUrl, originalRequestUrl, userProvidedBaseUrl, }: ResolveBaseUrl): string
|
|
197
|
+
export declare function resolveBaseUrlForEnqueueLinksFiltering({ enqueueStrategy, finalRequestUrl, originalRequestUrl, userProvidedBaseUrl, }: ResolveBaseUrl): string;
|
|
198
198
|
/**
|
|
199
199
|
* @internal
|
|
200
200
|
*/
|
|
@@ -203,15 +203,15 @@ function resolveBaseUrlForEnqueueLinksFiltering({ enqueueStrategy, finalRequestU
|
|
|
203
203
|
return finalUrlOrigin;
|
|
204
204
|
}
|
|
205
205
|
// If the user wants to ensure the same domain is accessed, regardless of subdomains, we check to ensure the domains match
|
|
206
|
-
//
|
|
207
|
-
//
|
|
206
|
+
// If they don't (we went off domain via a redirect), we keep filtering against the original domain - returning
|
|
207
|
+
// undefined here would disable the filtering entirely and enqueue every link on the redirected page
|
|
208
208
|
if (enqueueStrategy === utils_1.EnqueueStrategy.SameDomain) {
|
|
209
209
|
const originalHostname = (0, tldts_1.getDomain)(originalUrlOrigin, { mixedInputs: false });
|
|
210
210
|
const finalHostname = (0, tldts_1.getDomain)(finalUrlOrigin, { mixedInputs: false });
|
|
211
211
|
if (originalHostname === finalHostname) {
|
|
212
212
|
return finalUrlOrigin;
|
|
213
213
|
}
|
|
214
|
-
return
|
|
214
|
+
return originalUrlOrigin;
|
|
215
215
|
}
|
|
216
216
|
// Always enqueue urls that are from the same origin in all other cases, as the filtering happens on the original request url, even if there was a redirect
|
|
217
217
|
// before actually finding the urls
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crawlee/core",
|
|
3
|
-
"version": "3.17.1-beta.
|
|
3
|
+
"version": "3.17.1-beta.69",
|
|
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": ">=16.0.0"
|
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"@apify/pseudo_url": "^2.0.30",
|
|
60
60
|
"@apify/timeout": "^0.4.0",
|
|
61
61
|
"@apify/utilities": "^2.7.10",
|
|
62
|
-
"@crawlee/memory-storage": "3.17.1-beta.
|
|
63
|
-
"@crawlee/types": "3.17.1-beta.
|
|
64
|
-
"@crawlee/utils": "3.17.1-beta.
|
|
62
|
+
"@crawlee/memory-storage": "3.17.1-beta.69",
|
|
63
|
+
"@crawlee/types": "3.17.1-beta.69",
|
|
64
|
+
"@crawlee/utils": "3.17.1-beta.69",
|
|
65
65
|
"@sapphire/async-queue": "^1.5.1",
|
|
66
66
|
"@standard-schema/spec": "^1.0.0",
|
|
67
67
|
"@vladfrangu/async_event_emitter": "^2.2.2",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "4cd950f1eb99bca5176ab20c8d88f6c3d6901e24"
|
|
88
88
|
}
|