How to scrape javascript injected image src and alt with phantom.js?
问题 I'm using the following script to scrape images using phantom.js: var page = require('webpage').create(); url = 'https://www.everlane.com/collections/mens-luxury-tees/products/mens-crew-antique' page.open(url, function(status) { if (status !== 'success') { console.log('error'); phantom.exit(); return; } var a = page.evaluate(function() { return document.getElementsByTagName('img'); }); SrcAlt = []; for (var i=0; i<a.length; i++){ var src = a[i].getAttribute('src'); var alt = a[i].getAttribute