This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

pinterpreter

0.0.2 • Public • Published

Pinterpreter

What is this?

As the name implies, an interpreter for running puppeteer functions. Instead of writing any code, this takes a "workflow", in pseudo-JSON.

Why was this created?

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.

What does this add?

  • 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).

Installation

You'll need "npm" for this:

npm i instagram-private-api

Usage

  1. Import "Pinterpreter":
const pinterpreter = require('pinterpreter');
  1. Import your workflow(s):
const { EXAMPLE_WORKFLOW } = require('./path/to/workflow/');
  1. 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.

  1. Run!
const workflowPerformer = new pinterpreter.WorkflowPerformer();

await workflowPerformer.setBrowserController(browserController);
await workflowPerformer.perform(EXAMPLE_WORKFLOW, {
	foo: bar,
});
  1. Finally, end it:
await browserController.end();

More usages

Refer to the API docs for more information, including how to set up your own workflows and other ways you can launch your browser.

Readme

Keywords

none

Package Sidebar

Install

npm i pinterpreter

Weekly Downloads

2

Version

0.0.2

License

ISC

Unpacked Size

2.45 MB

Total Files

401

Last publish

Collaborators

  • sxxov