Skip to content

Commit

Permalink
fix: --timeout default 10 -> 20 sec, reduce retryDelay 10 -> 5 sec, l…
Browse files Browse the repository at this point in the history
…ighthouse maxWaitForLoad 10 -> 30 sec
  • Loading branch information
popstas committed Apr 13, 2024
1 parent 799bdbc commit c7a829f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/program.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ program.option('-u --urls <urls>', 'Comma separated url list for scan', list).
getConfigVal('preset', 'seo')).
option('-t, --timeout <timeout>',
'Timeout for page request, in ms',
getConfigVal('timeout', 10000)).
getConfigVal('timeout', 20000)).
option('-e, --exclude <fields>',
'Comma separated fields to exclude from results', list).
option('-d, --max-depth <depth>', 'Max scan depth',
Expand Down
3 changes: 2 additions & 1 deletion src/scrap-site.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ async function scrapSite ({baseUrl, options = {}}) {
skipRequestedRedirect: true, // all redirects marks as visited
depthPriority: false, // without it find not all pages
retryCount: 1,
retryDelay: 5000,
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'], // puppeteer freezes without it
exporter,

Expand Down Expand Up @@ -546,7 +547,7 @@ async function scrapSite ({baseUrl, options = {}}) {
if (options.lighthouse) {
const opts = {
logLevel: 'info',
maxWaitForLoad: 10000,
maxWaitForLoad: 30000,
// extends: 'lighthouse:default',
/*onlyAudits: [
'first-meaningful-paint',
Expand Down

0 comments on commit c7a829f

Please sign in to comment.