Browserless

Browserless is a service that allows you to run headless Chrome instances in the cloud.

Integrate the Browserless API with the Python API

Setup the Browserless API trigger to run a workflow which integrates with the Python API. Pipedream's integration platform allows you to integrate Browserless and Python remarkably fast. Free for developers.

Generate PDF from HTML String with the Browserless API
 
Try it
Run Python Code with the Python API

Write Python and use any of the 350k+ PyPi packages available. Refer to the Pipedream Python docs to learn more.

 
Try it
Scrape URL with the Browserless API

Scrape content from a page. See the documentation.

 
Try it
Scrape URL List with the Browserless API

Scrape content from a list of pages. See the documentation.

 
Try it
Take a Screenshot with the Browserless API

Take a screenshot of a page. See the documentation

 
Try it

Overview of Browserless

Browserless allows you to build websites and applications that can be used
without a web browser. This means that you can create apps that can be used
offline, or that can be used on devices that don't have a web browser
installed.

Some examples of things that you can build using Browserless are:

  • A website that can be used without a web browser
  • An app that can be used offline
  • A app that can be used on devices that don't have a web browser installed

Connect Browserless

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import puppeteer from 'puppeteer-core@14.1.0';

export default defineComponent({
  props: {
    browserless: {
      type: "app",
      app: "browserless",
    }
  },
  async run({steps, $}) {
    // See the browserless docs for more info:
    // https://www.browserless.io/docs/
    const browser = await puppeteer.connect({ 
      browserWSEndpoint: `wss://chrome.browserless.io?token=${this.browserless.$auth.api_key}` 
    })
    const page = await browser.newPage()
    
    const url = "https://example.com"
    const type = "png"
  
    await page.goto(url)
    const screenshot = await page.screenshot()
    
    // export the base64-encoded screenshot for use in future steps,
    // along with the image type and filename
    $.export("screenshot", Buffer.from(screenshot, 'binary').toString('base64'))
    $.export("type", type)
    $.export("filename",`${url.replace(/[&\/\\#, +()$~%.'":*?<>{}]/g, '_')}-${+new Date()}.${type}`)
    
    await browser.close()
  },
})

Overview of Python

Python API on Pipedream offers developers to build or automate a variety of
tasks from their web and cloud apps. With the Python API, users are able to
create comprehensive and flexible scripts, compose and manage environment
variables, and configure resources to perform a range of functions.

By using Pipedream, you can easily:

  • Create automated workflows that run on a specific schedule
  • Compose workflows across various apps and services
  • React to events in cloud services or form data
  • Automatically create content and notifications
  • Construct classifications and predictions
  • Analyze and react to sentiment, sentiment analysis and sentiment score
  • Connect backends to the frontend with serverless functions
  • Work with files and databases
  • Perform web requests and fetch data
  • Integrate third-party APIs into your apps
  • Orchestrate data processing tasks and pipelines
  • Create powerful application APIs with authentication and authorization
  • Design CI/CD pipelines and Continuous Delivery services
  • Connect databases like MongoDB and MySQL
  • Monitor connections and events
  • Generate alerts and notifications for corresponding events

Connect Python

1
2
3
4
5
def handler(pd: "pipedream"):
  # Reference data from previous steps
  print(pd.steps["trigger"]["context"]["id"])
  # Return data for use in future steps
  return {"foo": {"test":True}}