Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pinterpreter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pinterpreter

an interpreter layer for puppeteer, optimized for running browser automation

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 10 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc