Created
November 23, 2017 11:59
-
-
Save nikosvaggalis/c3879e957625783af7aadd79ad475a67 to your computer and use it in GitHub Desktop.
Puppeteer - Scrape smadeseek.com 1 level deep
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"); | |
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