npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pipedream/puppeteer

v1.0.2

Published

Pipedream Puppeteer Components

Downloads

82

Readme

Overview

Puppeteer is a Node.js library which provides a high-level API to control Chrome/Chromium over the DevTools Protocol. Puppeteer runs in headless mode on Chromium on Pipedream.

Using Puppeteer you can perform tasks including:

  • Capture Screenshots: Convert webpages into images.
  • Processing PDFs: parse and scan PDFs.
  • Web Scraping: Extract data from websites.
  • UI/UX Testing: Verify user interface and experience.
  • Integration with Test Frameworks: Combine with testing frameworks.
  • Task Automation: Automate web-related tasks like form filling.
  • Functional Testing: Automate user interactions to test web application functionality.
  • Regression Testing: Ensure new code changes don't introduce bugs.

Getting Started

No authentication is required to use Puppeteer in your Pipedream workflows. Pipedream publishes a specific NPM package that is compatible with the Pipedream Execution Environment. This package includes the headless Chromium binary needed to run a browser headlessly within your Pipedream workflows.

Simply import this package, launch a browser and navigate using a Puppeteer Page instance.

Usage in Node.js Code Steps

To get started, import the @pipedream/browsers package into your Node.js code step. Pipedream will automatically install this specialized package that bundles the dependencies needed to run puppeteer in your code step.

This package exports a puppeteer module that exposes these methods:

  • browser(opts?) - method to instantiate a new browser (returns a Puppeteer Browser instance)
  • launch(opts?) - an alias to browser()
  • newPage() - creates a new Puppeteer Page instance and returns both the page & browser

Note: After awaiting the browser instance, make sure to close the browser at the end of your Node.js code step.

import { puppeteer } from '@pipedream/browsers';

export default defineComponent({
  async run({steps, $}) {
    const browser = await puppeteer.browser();
    
    console.log(browser)
    // get page, perform actions, etc.

    await browser.close();
  },
})

Usage in Sources or Actions

The same @pipedream/browsers package can be used in actions as well as sources.

The steps are the same as usage in Node.js code. Open a browser, create a page, and close the browser at the end of the code step.

Please note: At this time Source's memory are not configurable and are fixed to 256 mb. This is below the recommened 2 gbs for usage in workflows.

Troubleshooting

Workflow exited before step finished execution

Remember to close the browser instance before the step finishes. Otherwise, the browser will keep the step "open" and not transfer control to the next step.

Out of memory errors or slow starts

For best results, we recommend increasing the amount of memory available to your workflow to 2 gigabytes. You can adjust the available memory in the workflow settings.