Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Node web scraper with axios and cheerio

Node JS Web Scraper

I this is part of the first node web scraper I created with axios and cheerio. I took out all of the logic, since I only wanted to showcase how a basic setup for a nodejs web scraper would look.

const cheerio = require('cheerio'),
      axios = require('axios'),
      url = `<url goes here>`;
    .then((response) => {
        let $ = cheerio.load(;
        $('a').each(function (i, e) {
          let links = $(e).attr('href');      
    }).catch(function (e) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.