As the name implies, an interpreter for running puppeteer functions. Instead of writing any code, this takes a "workflow", in pseudo-JSON.
Puppeteer out of the box requires some other pieces to work efficiently, those other pieces often includes a lot of boiler code or extra libraries that add heft to a project. Pinterpreter aims to be the middle man that consolidates all of them and make puppeteer dead simple to take advantage of.
- The usage of package-able "workflows" to replace writing code.
- Simple headless detection avoidance.
- Cookies saving and loading from '.cookies' file.
- The ability to use the user's browser instead of the internal one (for easier authentication etc).
You'll need "npm" for this:
npm i instagram-private-api
- Import "Pinterpreter":
const pinterpreter = require('pinterpreter');
- Import your workflow(s):
const { EXAMPLE_WORKFLOW } = require('./path/to/workflow/');
- Launch the browser:
const browserController = new pinterpreter.BrowserController();
const browser = await browserController.launch({
foo: bar,
});
Note: The browser will run in headless mode by default, so it's normal if you don't see anything happening.
- Run!
const workflowPerformer = new pinterpreter.WorkflowPerformer();
await workflowPerformer.setBrowserController(browserController);
await workflowPerformer.perform(EXAMPLE_WORKFLOW, {
foo: bar,
});
- Finally, end it:
await browserController.end();
Refer to the API docs for more information, including how to set up your own workflows and other ways you can launch your browser.