with Puppeteer and Turso?
Get the HTML of a webpage using Puppeteer. See the documentation for details.
Creates a new database in a group for the organization or user. See the documentation
Get the title of a webpage using Puppeteer. See the documentation
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:
import { puppeteer } from '@pipedream/browsers';
export default defineComponent({
async run({steps, $}) {
const browser = await puppeteer.browser();
// Interact with the web page programmatically
// See Puppeeter's Page documentation for available methods:
// https://pptr.dev/api/puppeteer.page
const page = await browser.newPage();
await page.goto('https://pipedream.com/');
const title = await page.title();
const content = await page.content();
// The browser needs to be closed, otherwise the step will hang
await browser.close();
return { title, content }
},
})
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
turso: {
type: "app",
app: "turso",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.turso.tech/v1/organizations`,
headers: {
Authorization: `Bearer ${this.turso.$auth.api_token}`,
},
})
},
})