Pause is not enough
This commit is contained in:
@@ -25,7 +25,7 @@ const fetch = async (url, options = {}) => {
|
||||
const urlAdaptedForScraping = USE_SCRAPER_API
|
||||
? `${SCRAPER_API_BASE_URL}?api_key=${SCRAPER_API_KEY}&url=${urlToFetchThroughAPI}`
|
||||
: url;
|
||||
const randomPauseMS = Math.floor(Math.random() * Math.floor(500));
|
||||
const randomPauseMS = Math.floor(Math.random() * Math.floor(1500)) + 500;
|
||||
await timeout(randomPauseMS);
|
||||
return nodeFetch(urlAdaptedForScraping, newOptions);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user