x-ray-puppeteer
Chromium Puppeteer driver for x-ray.
Why
XRay is great, but on ajax / JS-heavy pages, it needs to use a more complex driver. The best solution there is x-ray-phantom
(which, incidentally, doesn't use phantom
at all, but nightmarejs
, but nightmare
is limited in certain environments (plus, puppeteer is basically vanilla chromium, which is great).
Installation
This is a really simple function i whipped up ad hoc, so I haven't really set up for wider distribution yet.
For now you can either just clone this repo or copy the code in index.js
into a file in your project
Usage
Driver takes 4 args. See jsdoc in index.js for details.
// set some options for the Puppeteer instanceconst puppeteerOptions = headless: true // In order to persist session info, you need to designate a userDataDir. // Note that this folder can get large, // so consider adding it to .gitignore userDataDir: './USER_SESSION/'; var x = ;