From node, I'd like to get all image urls (src
attribute from img
tags) from an external web page.
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).
Next, I tried to use the request module and cheerio. This works great, except I have to deal with relative image urls. E.g.
<img src='http//example.com/i.jpg'>
<img src='/i.jpg'>
<img src='i.jpg'>
<img src='../images/i.jpg'>
I can deal with that, but I'm wondering if there's an easier way?