Web Scraping with Node.js

Activity 3: Trying out some Tables

In this activity we will apply the web scraping techniques to scrape data from a few tables using Cheerio.


A Few Tables

Take a look at the following web pages:

Underground from Open Street Map

Underground from Wikipedia

Eurovision from Wikipedia

View the page source for each page (right-click then View Page Source from most browsers).


See if you can use Cheerio to select the data from the tables. What challenges, if any, do you encounter?


Complete code

You can find the completed code in scrape3-tables.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