Skip to content

How to configure Page-loading timeout when scraping a page? #1423

Closed Answered by Jym77
jrpool asked this question in Questions
Discussion options

You must be logged in to vote

This is only a default value for destructuring the options object if no timeout has been provided.
I'm not super fluent with that code, but something like

scraper.scrape(url, { timeout: Timeout.of(20000) })

should do the trick (Timeout is imported from alfa-time, I think the number has to be in milliseconds since this is JS default time unit).
This is how we do it for the commnand line call to the scraper

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@jrpool
Comment options

Answer selected by jrpool
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of unexpected or faulty behaviour in Alfa
3 participants
Converted from issue

This discussion was converted from issue #1422 on May 23, 2023 06:54.