Skip to content

Commit

Permalink
Test with inject.
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelBone committed Jul 9, 2018
1 parent 13121eb commit 1a1552e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scraper.js
Expand Up @@ -13,9 +13,10 @@ let moment = require("moment");
let selenium = require("selenium-webdriver");
let chrome = require("selenium-webdriver/chrome");
let puppeteer = require("puppeteer");
let https = require("https");
let sslRootCas = require('ssl-root-cas/latest').inject();

require('https').globalAgent.options.ca = sslRootCas;
https.globalAgent.options.ca = sslRootCas;

const DevelopmentApplicationsUrl = "https://www.burnside.sa.gov.au/Planning-Business/Planning-Development/Development-Applications/Development-Applications-on-Public-Notification";
const CommentUrl = "mailto:burnside@burnside.sa.gov.au";
Expand Down Expand Up @@ -87,8 +88,8 @@ function run(database) {
});

puppeteer.launch({ headless: true, args: [ '--no-sandbox', '--disable-setuid-sandbox', '--ignore-certificate-errors', '--ignore-urlfetcher-cert-requests' ], ignoreHTTPSErrors: true }).then(function(browser) {
console.log("Here A0");
require('https').globalAgent.options.ca = sslRootCas;
// console.log("Here A0");
// require('https').globalAgent.options.ca = sslRootCas;
console.log("Here A1");
browser.newPage().then(function(page) {
console.log("Here A2");
Expand Down

0 comments on commit 1a1552e

Please sign in to comment.