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
const chromium = require('chrome-aws-lambda'); | |
const puppeteer = require('puppeteer-core'); | |
module.exports.open = async (url) => { | |
let page; | |
let browser; | |
try { | |
let myArgs = chromium.args; | |
//disable caching just in case we decide to reuse browser. | |
myArgs.push('--aggressive-cache-discard','--disable-cache', '--disable-application-cache'); |
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
{ | |
"name": "tagfinder", | |
"version": "3.0.0", | |
"description": "Finds QC tags on sites from an SQS queue", | |
"main": "app.js", | |
"scripts": { | |
"test": "./node_modules/.bin/mocha", | |
"start": "node app.js", | |
"pack": "npm-pack-zip", | |
"preversion": "npm test", |
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
const puppeteer = require('puppeteer'); | |
const browserPromise = puppeteer.launch( | |
{timeout:60000, args:['--aggressive-cache-discard','--disable-cache', '--disable-application-cache']} | |
); | |
browserPromise.then(browser => { | |
return browser.version() | |
}).then(ver => console.log("Browser version " + ver)); |