Created
September 26, 2016 21:48
-
-
Save hdavidzhu/7596f570d8b8a11fec9eb0da1d670e4c to your computer and use it in GitHub Desktop.
20160926-download.coffee
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
child_process = require 'child_process' | |
# Get the Chrome Extension download path. | |
# A great explanation of how this works can be found here: | |
# http://chrome-extension-downloader.com/how-does-it-work.php | |
chromeExtensionId = 'lpcaedmchfhocbbapmcbpinfpgnhiddi' | |
downloadUrl = "https://clients2.google.com/service/update2/crx?response=redirect&prodversion=49.0&x=id%3D#{chromeExtensionId}%26installsource%3Dondemand%26uc" | |
# Download your extension through curl. | |
# You can choose where you want your extension to be. This path will be used later when building your driver. | |
child_process.exec "curl -L -v -o '/tmp/location/of/extension.crx' '#{downloadUrl}'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment