Skip to content

Instantly share code, notes, and snippets.

@phil-monroe
Last active August 6, 2019 18:40
Show Gist options
  • Save phil-monroe/df630b3fda8fa18d3dcfdaf1aa2c56e1 to your computer and use it in GitHub Desktop.
Save phil-monroe/df630b3fda8fa18d3dcfdaf1aa2c56e1 to your computer and use it in GitHub Desktop.
const crawler = new Apify.PuppeteerCrawler({
launchPuppeteerFunction: () => {
return Apify.launchPuppeteer({
// puppeteer config options
}).then((browser) => {
browser.on('disconnected', console.log)
browser.on('targetchanged', console.log)
browser.on('targetcreated ', console.log)
browser.on('targetdestroyed', console.log)
return browser
})
},
handlePageFunction: async ({ page, request }) => {
// run scrape...
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment