Challenge: Puppeteer Fundamentals
Evaluate the knowledge of Puppeteer selectors.
In this challenge, we’ll use our knowledge of Puppeteer selectors to complete the below tasks.
Task 1: Scrape book title with ID selector
We must extract the book title (A Light in the Attic) with an ID selector from the HTML page below. Your task is to implement this in Puppeteer using an ID selector.
Press + to interact
Write your code in the following snippet.
{ "name": "puppeteer-learn", "version": "1.0.0", "description": "", "type": "commonjs", "main": "index.js", "scripts": { "start": "node index.js" }, "keywords": [], "author": "", "license": "MIT", "dependencies": { "puppeteer": "19.8.3" } }
Challenge to extract data with id selector
If you’re unsure how to do ...