title: Scraping images with cheerio
body: <p>I'm trying to scrape images using cheerio with node but I can't seem to be able to select the image, I need to do a for each of all the children of flickity slider and push them to an array but I wanted to start at selecting one:</p>
  
  <pre><code>$('.flickity-slider &gt; figure').attr('src')
  </code></pre>
  
  <p>But for some reason I keep getting null or undefined.</p>
  
  <p><a href="https://i.stack.imgur.com/JiSiw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JiSiw.png" alt="Need to get all those images in an array"></a></p>
  
  <p>EDIT: I was able to access the images with <code>$('#tab-foto-flickity').find('img').length</code>
  how do I run over all of those to push them into an array?</p>