Created
November 26, 2016 17:10
-
-
Save jbarber/86a8f09e88a7f530ef55ee690ff75233 to your computer and use it in GitHub Desktop.
PhantomJS 2.1.1 snippet for getting versions of $LATEST chrome installers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = require('webpage').create(); | |
page.open('https://enterprise.google.com/chrome/chrome-browser/', function(status) { | |
console.log("Status: " + status); | |
if(status === "success") { | |
var winVer = page.evaluate(function() { | |
return document.querySelector("#download span[ng-bind='win64Version']").innerHTML; | |
}); | |
var macVer = page.evaluate(function() { | |
return document.querySelector("#download span[ng-bind='macVersion']").innerHTML; | |
}); | |
var button = page.evaluate(function() { | |
return document.querySelector("#download div.button.chrome"); | |
}); | |
console.log("wget -O " + winVer + ".exe https://dl.google.com/chrome/install/googlechromestandaloneenterprise64.msi"); | |
console.log("wget -O " + macVer + ".dmg https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"); | |
} | |
phantom.exit(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment