Skip to content

Commit

Permalink
Update default binary CDN URL
Browse files Browse the repository at this point in the history
  • Loading branch information
alecgibson authored and giggio committed Feb 16, 2024
1 parent fdce816 commit 06656e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ how these urls work.

Npm config:
For metadata use `chromedriver_cdnurl`. The default is `https://googlechromelabs.github.io`.
For binaries use `chromedriver_cdnbinariesurl`. The default is `https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing`.
For binaries use `chromedriver_cdnbinariesurl`. The default is `https://storage.googleapis.com/chrome-for-testing-public`.

```shell
npm install chromedriver --chromedriver_cdnurl=https://npmmirror.com/metadata --chromedriver_cdnbinariesurl=https://npmmirror.com/binaries
Expand Down
2 changes: 1 addition & 1 deletion install.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ if (skipDownload) {
const chromedriverIsAvailable = await verifyIfChromedriverIsAvailableAndHasCorrectVersion(chromedriverVersion, chromedriverBinaryFilePath);
if (!chromedriverIsAvailable) {
console.log('Current existing ChromeDriver binary is unavailable, proceeding with download and extraction.');
const cdnBinariesUrl = (process.env.npm_config_chromedriver_cdnbinariesurl || process.env.CHROMEDRIVER_CDNBINARIESURL || 'https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing').replace(/\/+$/, '');
const cdnBinariesUrl = (process.env.npm_config_chromedriver_cdnbinariesurl || process.env.CHROMEDRIVER_CDNBINARIESURL || 'https://storage.googleapis.com/chrome-for-testing-public').replace(/\/+$/, '');
downloadedFile = await downloadFile(useLegacyMethod ? legacyCdnUrl : cdnBinariesUrl, useLegacyMethod, downloadedFile, chromedriverVersion, platform);
await extractDownload(extractDirectory, chromedriverBinaryFilePath, downloadedFile);
}
Expand Down

0 comments on commit 06656e9

Please sign in to comment.