This file contains hidden or 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'); | |
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 |