Skip to content

Instantly share code, notes, and snippets.

@serebano
Created November 13, 2021 03:37
Show Gist options
  • Select an option

  • Save serebano/688f3b894164b069702230ff1e72f120 to your computer and use it in GitHub Desktop.

Select an option

Save serebano/688f3b894164b069702230ff1e72f120 to your computer and use it in GitHub Desktop.
scrapp.page/function
module.exports = async ({ page, context }) => {
//const { url } = context;
const url = 'https://example.com'
await page.goto(url);
const data = await page.content();
return {
data,
// Make sure to match the appropriate content here
// You'll likely want 'application/json'
type: 'application/html',
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment