Last active
March 7, 2022 14:16
-
-
Save AliMilani/1c3b5c0d26085e2ecdb42536e84551d4 to your computer and use it in GitHub Desktop.
puppeteer_gist
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"); // npm i puppeteer | |
// create extensions folder | |
const extensionPath = __dirname + "/extensions/"; | |
// you can download and install chrome extension from https://chrome.google.com/webstore | |
// go to chrome://extensions/ and find extension ID for example ID: gcicgomacfgljamhdagkgjdomjfepaeh | |
// find it on C:\Users\%username%\AppData\Local\Google\Chrome\User Data\Default\Extensions | |
// copy the extension folder to your /extensions/ Folder | |
const firstExtension = `${extensionPath}/cfohepagpmnodfdmjliccbbigdkfcgia/2.4.0_0`; | |
const secondExtension = `${extensionPath}/chklaanhfefbnpoihckbnefhakgolnmc/0.1.17_0`; | |
(async () => { | |
const browser = await puppeteer.launch({ | |
headless: false, | |
args: [ | |
`--disable-extensions-except=${firstExtension},${secondExtension}`, | |
// `--load-extension=${firstExtension},${secondExtension}`, | |
], | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment