Skip to content

Instantly share code, notes, and snippets.

@DanNi0130
Created July 19, 2018 02:00
Show Gist options
  • Save DanNi0130/a59cef38cf553555b82d6a44c68bc068 to your computer and use it in GitHub Desktop.
Save DanNi0130/a59cef38cf553555b82d6a44c68bc068 to your computer and use it in GitHub Desktop.
const puppeteer = require('puppeteer');
const url = 'https://www.reddit.com';
puppeteer
.launch()
.then(function(browser) {
return browser.newPage();
})
.then(function(page) {
return page.goto(url).then(function() {
return page.content();
});
})
.then(function(html) {
console.log(html);
})
.catch(function(err) {
//handle error
});
@IgnacioGans
Copy link

This nothing happens, may have to use another library than puppeteer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment