As a beginner in frontend development, I have a question that may seem simple. Please be patient with me.
var page = require('webpage').create(),
system = require('system');
if (system.args.length === 1) {
console.log('Usage: useragent.js <some URL>');
phantom.exit();
}
url = system.args[1];
page.settings.userAgent = 'Mozilla/5.0 (Linux; U; Android 2.3.5; en-gb; HTC Desire HD A9191 Build/GRJ90) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
page.open(url,function (status) {
if (status !== 'success') {
console.log(url+', Unable to access network');
} else {
var redirectUrl = page.evaluate(function () {
return document.URL;
});
}
phantom.exit();
});
Running the code for works smoothly and redirects to
However, when executed on , it throws the following error : s/seo_link_crypter.js:748