christopherwk210 / site-scan

CLI for capturing website screenshots, powered by puppeteer.
MIT License
136 stars 13 forks source link

how to enable flash automatically with puppeteer-extra-plugin-flash #10

Open world33 opened 5 years ago

world33 commented 5 years ago

Hi Chris, I noticed that some of the screenshots taken with your great script do not load flash automatically and show a placeholder instead. I installed both puppeteer extra and the plugin flash to automatically load flash, however I am not sure how to modify your script in order to enable the plugin: https://github.com/berstend/puppeteer-extra/tree/master/packages/puppeteer-extra-plugin-flash I guess first I have to change this line in your site-scan.js to enable puppeteer extra: const puppeteer = require('puppeteer') CHANGE TO const puppeteer = require('puppeteer-extra')

Do i have to add this line puppeteer.use(require('puppeteer-extra-plugin-flash')()) afterwards to enable the flash plugin? My coding knowledge and skills are very limited so I hope you can provide me with some easy steps on how to enable it. Thanks