You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,11 +49,13 @@ Makes requests to `urls` and saves all files found with `sources` to `directory`
49
49
-`filenameGenerator`: name of one of the bundled filenameGenerators, or a custom filenameGenerator function *(optional, default: 'byType')*
50
50
-`defaultFilename`: filename for index page *(optional, default: 'index.html')*
51
51
-`prettifyUrls`: whether urls should be 'prettified', by having the `defaultFilename` removed *(optional, default: false)*
52
-
-`sources`: array of objects to load, specifies selectors and attribute values to select files for loading *(optional, see default value in `lib/config/defaults.js`)*
52
+
-`sources`: array of objects to load, specifies selectors and attribute values to select files for loading *(optional, see example below)*
53
53
-`subdirectories`: array of objects, specifies subdirectories for file extensions. If `null` all files will be saved to `directory`*(optional, see example below)*
54
54
-`request`: object, custom options for [request](https://github.com/request/request#requestoptions-callback)*(optional, see example below)*
55
55
-`recursive`: boolean, if `true` scraper will follow anchors in html files. Don't forget to set `maxDepth` to avoid infinite downloading *(optional, see example below)*
56
56
-`maxDepth`: positive number, maximum allowed depth for dependencies *(optional, see example below)*
57
+
58
+
Default options you can find in [lib/config/defaults.js](https://github.com/s0ph1e/node-website-scraper/blob/master/lib/config/defaults.js).
57
59
58
60
59
61
**callback** - callback function *(optional)*, includes following parameters:
0 commit comments