title: Node js Puppeteer goto array of youtube links to screenshot images
body: <p>I am trying to go to youtube, login then go into video links to take a screen shot. </p>
  
  <p>But I get this error.I have read other similar quesiton and I have done what they suggested: Use a forloop. Please dont duplicate label this. </p>
  
  <pre><code>(node:18337) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 response listeners added.
  </code></pre>
  
  <p>Here is my code. This is what I am tring to do.</p>
  
  <pre><code>var proccessALink = async (link,label)=&gt;{
      if (validUrl.isWebUri(urlToScreenshot)) {
        ;(async () =&gt; {
          await page.goto(link, {
            waitUntil: 'networkidle'
          })
          const video = await page.$('.html5-video-player')
          await page.evaluate(() =&gt; {
            // Hide youtube player controls.
            let dom = document.querySelector('.ytp-chrome-bottom')
            dom.style.display = 'none'
          })
          await video.screenshot({path: downloadPath});
        })()
      } else {
        res.send('Invalid url: ' + urlToScreenshot)
      }
  
    }
    for(let i = 0; i&lt;linksArr.length; i++){
        var link = linksArr[i];
        var label = labelsArr[i];
        await proccessALink(link, label) 
    }
  
  </code></pre>