PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, and SVG. var page = require(‘webpage’).create(); console.log(‘The default user agent is ‘ + page.settings.userAgent); page.settings.userAgent = ‘SpecialAgent’; page.open(‘http://www.httpuseragent.org’, function (status) { if (status !== ‘success’) { console.log(‘Unable to access network’); } …
Continue reading “PhantomJS: Headless WebKit with JavaScript API”