Skip to content

Instantly share code, notes, and snippets.

@junhan-z
Last active May 19, 2020 06:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junhan-z/fc4c3e5ca71e5361efbcee9282efaeae to your computer and use it in GitHub Desktop.
Save junhan-z/fc4c3e5ca71e5361efbcee9282efaeae to your computer and use it in GitHub Desktop.
Use PhantomJS to Log in to IEEE
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
var ieeeSignInUrl = "https://regauth.standards.ieee.org/standards-ra-web/rest/signin";
page.open(ieeeSignInUrl, function(status) {
if ( status === "success" ) {
page.evaluate(function() {
document.querySelector("input[name='pf.username']").value = "[your email]";
document.querySelector("input[name='pf.pass']").value = "[your password]";
document.querySelector("input[name='submit']").click();
console.log("Login submitted!");
});
window.setTimeout(function () {
page.render('colorwheel.png');
phantom.exit();
}, 15000);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment