title: What is the best way to get all image urls from an external web page in node.js
body: <p>From node, I'd like to get all image urls (<code>src</code> attribute from <code>img</code> tags) from an external web page.</p>
  
  <p>I started by considering phantonjs, but didn't like that it's not really integrated into node (i.e. it runs in an external process).</p>
  
  <p>Next, I tried to use the request module and cheerio. This works great, except I have to deal with relative image urls. E.g.</p>
  
  <pre><code>&lt;img src='http//example.com/i.jpg'&gt;
  &lt;img src='/i.jpg'&gt;
  &lt;img src='i.jpg'&gt;
  &lt;img src='../images/i.jpg'&gt;
  </code></pre>
  
  <p>I can deal with that, but I'm wondering if there's an easier way?</p>