Web Scraping with Node.js

Activity 5: Books to Scrape

In this activity we will apply the web scraping techniques to a web page designed to stretch your web scraping skills.


The Web Scraping Sandbox

Some kind souls have set up this web site to help developers practice their web scraping skills. It contains some more challenging pages.

Web Scraping Sandbox

Let's first scrape this page:

Books to Scrape

It contains a fictional online bookstore:

Books to scrape 1


Write a node.js web service to extract the names, price, star rating and stock availability of the books on this page.


Complete code

You can find the completed code in scrape5-books-to-scrape.js.

Table of Contents

  1. Scrape data from a web page with Cheerio
  2. Activity 1: Modify the sample code
  3. Cheerio Selectors
  4. Activity 2: Trying out Cheerio Selectors
  5. Activity 3: Trying out some Tables
  6. Activity 4: Reading attributes
  7. Activity 5: Books to Scrape
  8. Clicking and Autoscrolling
  9. Links to Scrape Samples