scraply 1.0.16 → 1.0.17
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 +1 -1
- package/src/loadConfig.js +0 -6
package/package.json
CHANGED
package/src/loadConfig.js
CHANGED
|
@@ -19,17 +19,11 @@ export function loadConfig(userConfig = {}) {
|
|
|
19
19
|
config.CRAWLER.QUEUE_PATH = path.posix.join(config.MAIN_DIR, 'queue.json');
|
|
20
20
|
config.CRAWLER.CRAWLED_PATH = path.posix.join(config.MAIN_DIR, 'crawled');
|
|
21
21
|
config.DATA_FORMATTER.FORMATTED_PATH = path.posix.join(config.MAIN_DIR, 'formatted');
|
|
22
|
-
config.DATA_FORMATTER.ERROR_REPORT_PATH = path.posix.join(config.MAIN_DIR, 'error-report.json');
|
|
23
22
|
|
|
24
23
|
// If INCLUDE_URLS is not specified, set it to INITIAL_URLS by default
|
|
25
24
|
if (!config.CRAWLER.INCLUDE_URLS || config.CRAWLER.INCLUDE_URLS.length === 0) {
|
|
26
25
|
config.CRAWLER.INCLUDE_URLS = config.CRAWLER.INITIAL_URLS.map(url => `${url}.*`);
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
// If HARD_CODED_LINKS is missing, set to an empty array by default
|
|
30
|
-
if (!config.DATA_FORMATTER.HARD_CODED_LINKS) {
|
|
31
|
-
config.DATA_FORMATTER.HARD_CODED_LINKS = [];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
28
|
return config;
|
|
35
29
|
};
|