Skip to content

Instantly share code, notes, and snippets.

View kalmanh's full-sized avatar

Kalman Hazins kalmanh

  • T. Rowe Price
  • Baltimore, MD
View GitHub Profile
@kalmanh
kalmanh / allScrape.js
Last active December 3, 2017 05:54 — forked from bmorelli25/allScrape.js
Scrape all books on the homepage - without a for loop
const puppeteer = require('puppeteer');
let scrape = async () => {
const browser = await puppeteer.launch({headless: true});
const page = await browser.newPage();
await page.goto('http://books.toscrape.com/');
const result = await page.evaluate(() => {
let elements = document.querySelectorAll('.product_pod'); // Select all Products