title: Parallel scraping with puppeteer
body: <p>Currently I have some code that is getting an array from mongodb. The scraper is looping through the array and is scraping from a website for each value in the array. My problem is that it's currently really slow. How would I be able to parallelize this so it scrapes more data at the same time? </p>
  
  <p>Edit: Here's an example of a function I want to parallelize:</p>
  
  <pre><code>async function scrape(browser, page, i) {
  //Start new Browser session
  await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36');
  await page.goto(dealer);
  
  //Site specific code 
  await page.type('.Search-bar-text-input', arrayOfArticles[i]);
  await page.click('.Embedded-search-button')
  await page.waitFor('.BuyingOptions-total', {timeout: 2000});
  
  
  price = await page.evaluate(() =&gt; {
      price = document.querySelector('.BuyingOptions-total').innerText;
      console.log(price);
      return price;
  });
  </code></pre>