Skip to content

Commit

Permalink
Update scrape.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
berlintay authored Aug 10, 2024
1 parent dec7c9c commit bd408b2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion backend/scrape.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,13 @@ async function fetchAndAppendData() {
}
}

fetchAndAppendData();
const startScraping = async () => {
console.log('Waiting for 1 minute before starting the scraping process...');
await new Promise(resolve => setTimeout(resolve, 1 * 60 * 1000)); // 1 minute in milliseconds
console.log('Starting the scraping process now...');

// Call your scraping function here
fetchAndAppendData();
};

startScraping();

0 comments on commit bd408b2

Please sign in to comment.