Skip to content

Instantly share code, notes, and snippets.

@IronistM
Last active January 18, 2019 11:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IronistM/4ae95ac3e8f58471aaea1022fae997d4 to your computer and use it in GitHub Desktop.
Save IronistM/4ae95ac3e8f58471aaea1022fae997d4 to your computer and use it in GitHub Desktop.
const puppeteer = require('puppeteer')
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('https://e-food.gr/')
const dl = JSON.parse(
await page.evaluate(() => JSON.stringify(window.dataLayer))
)
// normally this will work:
// console.log(performanceTiming)
// but this sandbox doesn't dont console.log extended object in console
console.log(JSON.stringify(dl, null, 4))
await browser.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment