Created
January 14, 2019 06:28
-
-
Save AndrejsAbrickis/58e4f82d5c3cb8b137dc462f47d41933 to your computer and use it in GitHub Desktop.
This file contains 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 puppeteer = require('puppeteer'); | |
(async () => { | |
try { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
await page.goto('https://bvopen.abrickis.me/#/standings'); | |
await page.waitForSelector('.category', { timeout: 1000 }); | |
const body = await page.evaluate(() => { | |
return document.querySelector('body').innerHTML; | |
}); | |
console.log(body); | |
await browser.close(); | |
} catch (error) { | |
console.log(error); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment