Sha256: b68ba39e2677a2a86347c7fb2d661edc51e51afcb6247e086e4aafa926f5d043
Contents?: true
Size: 484 Bytes
Versions: 21
Compression:
Stored size: 484 Bytes
Contents
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'); } else { var ua = page.evaluate(function () { return document.getElementById('myagent').innerText; }); console.log(ua); } phantom.exit(); });
Version data entries
21 entries across 19 versions & 3 rubygems