@adobe/spacecat-shared-scrape-client 2.2.2 → 2.3.1
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/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/clients/scrape-job-supervisor.js +2 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-scrape-client-v2.3.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-scrape-client-v2.3.0...@adobe/spacecat-shared-scrape-client-v2.3.1) (2025-11-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **ScrapeClient:** change baseUrl composing ([#1101](https://github.com/adobe/spacecat-shared/issues/1101)) ([1347bf3](https://github.com/adobe/spacecat-shared/commit/1347bf3e65b04f0ac24701e64eb360a85b7cb4e2))
|
|
7
|
+
|
|
8
|
+
# [@adobe/spacecat-shared-scrape-client-v2.3.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-scrape-client-v2.2.2...@adobe/spacecat-shared-scrape-client-v2.3.0) (2025-11-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **scrapeClient:** change baseUrl composing to match sites ([#1089](https://github.com/adobe/spacecat-shared/issues/1089)) ([0ffe0af](https://github.com/adobe/spacecat-shared/commit/0ffe0af0c0ca7fc2fe537d0fb735743c0079a9c4))
|
|
14
|
+
|
|
1
15
|
# [@adobe/spacecat-shared-scrape-client-v2.2.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-scrape-client-v2.2.1...@adobe/spacecat-shared-scrape-client-v2.2.2) (2025-11-04)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import { ScrapeJob as ScrapeJobModel } from '@adobe/spacecat-shared-data-access';
|
|
14
|
-
import { isValidUrl, isValidUUID } from '@adobe/spacecat-shared-utils';
|
|
14
|
+
import { isValidUrl, isValidUUID, composeBaseURL } from '@adobe/spacecat-shared-utils';
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Scrape Supervisor provides functionality to start and manage scrape jobs.
|
|
@@ -37,12 +37,6 @@ function ScrapeJobSupervisor(services, config) {
|
|
|
37
37
|
maxUrlsPerMessage,
|
|
38
38
|
} = config;
|
|
39
39
|
|
|
40
|
-
function determineBaseURL(urls) {
|
|
41
|
-
// Initially, we will just use the domain of the first URL
|
|
42
|
-
const url = new URL(urls[0]);
|
|
43
|
-
return `${url.protocol}//${url.hostname}`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
40
|
/**
|
|
47
41
|
* Create a new scrape job by claiming one of the free scrape queues, persisting the scrape job
|
|
48
42
|
* metadata, and setting the job status to 'RUNNING'.
|
|
@@ -59,7 +53,7 @@ function ScrapeJobSupervisor(services, config) {
|
|
|
59
53
|
customHeaders = null,
|
|
60
54
|
) {
|
|
61
55
|
const jobData = {
|
|
62
|
-
baseURL:
|
|
56
|
+
baseURL: composeBaseURL(new URL(urls[0]).host),
|
|
63
57
|
processingType,
|
|
64
58
|
options,
|
|
65
59
|
urlCount: urls.length,
|