-
The timeout for a page to be loaded by Scraper.scrape() is hard-coded at 10 seconds on line 57 of scraper.js. Under some conditions a page loads too slowly and times out, preventing any testing. If I edit that line and change 10000 to 20000, then the page loads and tests are successfully performed. To make alfa adaptable to a wider variety of network conditions and page designs, that timeout could be made configurable by the user. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
This is only a default value for destructuring the
should do the trick ( |
Beta Was this translation helpful? Give feedback.
-
Increasing the page-loading timeout seems like a reasonable solution for slower loading pages. Making the timeout configurable for users would definitely enhance the tool's flexibility. Additionally, if you're open to exploring alternatives, you might find Crawlbase to be a useful option for scraping with customizable timeouts and other advanced features. |
Beta Was this translation helpful? Give feedback.
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
should do the trick (
Timeout
is imported fromalfa-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