Skip to content

Commit

Permalink
feat: log robots.txt disallow to console
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Mar 27, 2020
1 parent 49180b9 commit 4ef6a8e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ module.exports = async (baseUrl, options = {}) => {
crawler.on('requestfailed', error => {
console.error(`Failed: ${error.options.url}`);
});
crawler.on('requestdisallowed', options => {
console.error(`Disallowed in robots.txt: ${options.url}`);
});
crawler.on('maxdepthreached', options => {
console.log(`Max depth reached`);
});
Expand Down

0 comments on commit 4ef6a8e

Please sign in to comment.