feat: remove timeout

This commit is contained in:
karishmas6
2024-04-20 00:51:10 +05:30
parent 41ebb3b2aa
commit 497a248163

View File

@@ -1,13 +1,10 @@
import { PlaywrightCrawler, Configuration } from 'crawlee';
async function scrapeData(url, selectors, waitForSeconds = 2) {
async function scrapeData(url, selectors) {
const scrapedData = [];
const crawler = new PlaywrightCrawler({
requestHandler: async ({ page, request }) => {
await page.goto(url);
await page.waitForTimeout(waitForSeconds * 1000);
console.log('Received selectors:', selectors);
for (const selector of selectors) {