Created
May 18, 2015 22:34
-
-
Save stevenyxu/4c513cbcfb520a9c4a57 to your computer and use it in GitHub Desktop.
PhantomJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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