Created
August 15, 2018 09:09
-
-
Save jancurn/27d83f4fe7eed46139c8cdf93db2bf13 to your computer and use it in GitHub Desktop.
Apify actor that demonstrates usage of Puppeteer live view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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