Skip to content

Commit

Permalink
fix: move basic options to index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Mar 6, 2020
1 parent d562b48 commit f7e1d6b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ const sites = [
await scrap_site(site, {
fields_preset: 'seo', // варианты: default, seo, headers, minimal
maxConcurrency: 2, // параллельно открываемые вкладки
maxDepth: 10, // глубина сканирования
followSitemapXml: false // берёт адреса из /sitemap.xml
});
maxDepth: 10 // глубина сканирования
// ,followSitemapXml: true // чтобы найти больше страниц
// ,maxRequest: 10 // для тестов
// ,headless: false // на десктопе открывает браузер визуально
});
}
})();
3 changes: 0 additions & 3 deletions src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,8 @@ module.exports = async (baseUrl, options = {}) => {
maxDepth: 10, // макс. глубина
maxConcurrency: 2, // параллельные потоки
skipRequestedRedirect: true, // все редиректы помечаются как посещённые
// maxRequest: 10, // для тестов
depthPriority: false, // без этой опции сканирует криво, многое не видит
// followSitemapXml: true, // чтобы найти больше страниц
args: ['--no-sandbox'], // без этого puppeteer зависает
// headless: false, // для тестов
exporter,

// сюда дописывать правила игнора url
Expand Down

0 comments on commit f7e1d6b

Please sign in to comment.