Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
Adding complexity to a webscrapper

How can I further automate my web-scrapper? Currently it can search singular constant urls. How do I add a function that makes it search multiple pages within a constant website.

Here is my code

const PORT = 8000
const axios = require('axios')
const cheerio = require('cheerio')
const express = require('express')

const app = express ()

const url = 'heresurdata'

axios(url)
     .then(response => {
      const html = response.data
      console.log(html)

})

app.listen (PORT, () => console.log('server running on PORT ${PORT}'))





about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

you could make a request to the first page find all the anchor tags get their links make request to them and repeat the process

const {data} = await axios.get(url);

const $ = cheerio.load(data);

const allLinkTags = $('body a').map((index, el) => $(el).attr('href')).get();

// Now look through all the link tags and scrape them

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!