Skip to content

Instantly share code, notes, and snippets.

@jancurn
Created August 15, 2018 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jancurn/27d83f4fe7eed46139c8cdf93db2bf13 to your computer and use it in GitHub Desktop.
Save jancurn/27d83f4fe7eed46139c8cdf93db2bf13 to your computer and use it in GitHub Desktop.
Apify actor that demonstrates usage of Puppeteer live view
const Apify = require('apify');
Apify.main(async () => {
const browser = await Apify.launchPuppeteer({ liveView: true });
const page = await browser.newPage();
await page.goto('https://news.ycombinator.com/');
const pageTitle = await page.title();
console.log(`Page loaded: ${pageTitle}`);
// Wait before closing the actor
await Apify.utils.sleep(60000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment