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
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -163,7 +163,7 @@ String, filename for index page. Defaults to `index.html`.
163
163
Boolean, whether urls should be 'prettified', by having the `defaultFilename` removed. Defaults to `false`.
164
164
165
165
#### ignoreErrors
166
-
Boolean, if `true` scraper will continue downloading resources after error occurred, if `false` - scraper will finish process and return error. Defaults to `true`.
166
+
Boolean, if `true` scraper will continue downloading resources after error occurred, if `false` - scraper will finish process and return error. Defaults to `false`.
167
167
168
168
#### urlFilter
169
169
Function which is called for each url to check whether it should be scraped. Defaults to `null` - no url filter will be applied.
@@ -300,16 +300,16 @@ If multiple actions `afterResponse` added - scraper will use result from last on
300
300
// Do not save resources which responded with 404 not found status code
301
301
registerAction('afterResponse', ({response}) => {
302
302
if (response.statusCode===404) {
303
-
returnPromise.reject(newError('status is 404'));
304
-
} else {
305
-
// if you don't need metadata - you can just return Promise.resolve(response.body)
306
-
returnPromise.resolve({
307
-
body:response.body,
308
-
metadata: {
309
-
headers:response.headers,
310
-
someOtherData: [ 1, 2, 3 ]
303
+
returnnull;
304
+
} else {
305
+
// if you don't need metadata - you can just return Promise.resolve(response.body)
0 commit comments