Skip to content

Instantly share code, notes, and snippets.

@stevenyxu
Created May 18, 2015 22:34
Show Gist options
  • Save stevenyxu/4c513cbcfb520a9c4a57 to your computer and use it in GitHub Desktop.
Save stevenyxu/4c513cbcfb520a9c4a57 to your computer and use it in GitHub Desktop.
PhantomJS
var page = require('webpage').create();
page.open('http://myfigurecollection.net/', function(status) {
var srcs = page.evaluate(function() {
var imgs = document.querySelectorAll('img');
var l = imgs.length;
var res = [];
for (var i = 0; i < l; i++) {
res.push(imgs[i].src);
}
return res;
});
console.log(srcs);
phantom.exit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment