Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to add puppeteer-extra flash plugin to site-scan to generate screenshots with flash enabled #19

Closed
world33 opened this issue Oct 31, 2018 · 1 comment

Comments

@world33
Copy link

world33 commented Oct 31, 2018

mpi mk ua
Would anyone be able to point out to a total coding noob how to integrate in the site-scan script (to generate website screenshots) at https://github.com/christopherwk210/site-scan/blob/master/lib/site-scan.js
the flash plugin provided by puppeteer-extra?
I have tried including these lines in the site-scan script but with no much luck:

`#! /usr/bin/env node

// Modules
const argv = require('minimist')(process.argv.slice(2));
const puppeteer = require('puppeteer-extra')
puppeteer.use(require('puppeteer-extra-plugin-flash')())
const chalk = require('chalk');`

I need to create website screenshots in bulk but with site-scan (both headless or not) all the sites with flash are not generated properly and show a placeholder instead.
This site screenshot, for example, http://mpi.mk.ua/ shows a massive gray placeholder requiring to enable flash.
Thanks for any tip

@berstend
Copy link
Owner

Hi there,
keep in mind that you need to configure the puppeteer-extra flash plugin:

puppeteer.use(require('puppeteer-extra-plugin-flash')({
	pluginPath: 'foo',
    pluginVersion" '1.2.3'
}))

The values above are exemplary and depend on your host system.

You can look up the flash path and version by navigating to chrome://version/.

Let me know if there are further issues, closing for now. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants