Instantly share code, notes, and snippets.

Embed
What would you like to do?
Puppeteer - Scrape smadeseek.com 1 level deep
const puppeteer = require("puppeteer");
const url = "http://smadeseek.com/index.html";
const imgSelector = "#about > div > div.row > div img";
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto(url, { waitUntil: "load" });
const imgAll = await page.$$eval(imgSelector, images => {return images.map((image)=>image.src)});
console.log(imgAll);
await browser.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment