scraply 1.0.8 → 1.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "scraply",
3
3
  "description": "A simple, configurable and functional content scraper",
4
- "version": "1.0.8",
4
+ "version": "1.0.9",
5
5
  "main": "src/scraply.js",
6
6
  "type": "module",
7
7
  "scripts": {
@@ -52,15 +52,15 @@ export const DEFAULT_CONFIG = {
52
52
  },
53
53
  },
54
54
  HARD_CODED_LINKS: [
55
- {
56
- file_name: 'hc-links.json',
57
- data: [
58
- {
59
- "url": "https://custom-link.com",
60
- "content": "That's a custom link content, you can add as many as you want."
61
- },
62
- ]
63
- }
55
+ // {
56
+ // file_name: 'hc-links.json',
57
+ // data: [
58
+ // {
59
+ // "url": "https://custom-link.com",
60
+ // "content": "That's a custom link content, you can add as many as you want."
61
+ // },
62
+ // ]
63
+ // }
64
64
  ]
65
65
  }
66
66
  };
package/src/loadConfig.js CHANGED
@@ -26,5 +26,10 @@ export function loadConfig(userConfig = {}) {
26
26
  config.CRAWLER.INCLUDE_URLS = config.CRAWLER.INITIAL_URLS.map(url => `${url}.*`);
27
27
  }
28
28
 
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
+
29
34
  return config;
30
35
  };