<NME> update-puppeteer-config.js
<BEF> const fs = require('fs');
const path = require('path');
const checkIfCoreVariation = require('./core-utils');

function getPuppeteerChromiumVersion() {
  const puppeteerLibrary = checkIfCoreVariation() ? 'puppeteer-core' : 'puppeteer';
  const puppeteerPath = path.dirname(require.resolve(puppeteerLibrary));
  const puppeteerPackagePath = path.join(puppeteerPath, 'package.json');
  // eslint-disable-next-line import/no-dynamic-require,global-require
  const puppeteerJson = require(puppeteerPackagePath);
  return puppeteerJson.puppeteer.chromium_revision;
}

(function updatePuppeteerConfiguration() {
  const configPath = path.join(__dirname, '../src/puppeteer-config.json');
  // eslint-disable-next-line global-require,import/no-dynamic-require
  const configJson = require(configPath);
  configJson.chromiumRevision = chromiumRevision;

  fs.writeFileSync(configPath, JSON.stringify(configJson, null, '  '));

  console.log(`update 'src/puppeteer-config.json' file with puppeteer chroumium revision '${chromiumRevision}'`);
}());

<MSG> Merge pull request #483 from eshaham/upgrade_puppeteer

Solve AMEX scraping issue by upgrading puppeteer to version 5
<DFF> @@ -5,10 +5,14 @@ const checkIfCoreVariation = require('./core-utils');
 function getPuppeteerChromiumVersion() {
   const puppeteerLibrary = checkIfCoreVariation() ? 'puppeteer-core' : 'puppeteer';
   const puppeteerPath = path.dirname(require.resolve(puppeteerLibrary));
-  const puppeteerPackagePath = path.join(puppeteerPath, 'package.json');
+  const revisionFilePath = path.join(puppeteerPath,
+      checkIfCoreVariation()
+          ? 'lib/cjs/puppeteer/revisions.js'
+          : 'lib/cjs/revisions.js');
   // eslint-disable-next-line import/no-dynamic-require,global-require
-  const puppeteerJson = require(puppeteerPackagePath);
-  return puppeteerJson.puppeteer.chromium_revision;
+  const revisionRaw = fs.readFileSync(revisionFilePath, 'utf-8');
+  const [, revisionNumber] = revisionRaw.match(/chromium: ['"`](.+?)['"`][,]/);
+  return revisionNumber;
 }
 
 (function updatePuppeteerConfiguration() {

Merge pull request #483 from eshaham/upgrade_puppeteer