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

192
Views
Web scraping articles to see if new articles are posted

I have an array of news updates coming from this website here. What I am looking to do is console.log the latest news articles as they are published, or very close to when they are posted. With my code, I can send a request to obtain the articles, but I want to know when the array changes with a new entry.

const axios = require('axios')
const cheerio = require('cheerio')
const express = require('express')
const PORT = 3000
const URL = 'https://www.newworld.com/en-us/news'
const splitURL = URL.slice(0, 24)

const app = express()

setInterval(() => {
    axios(URL)
    .then(response => {
        const html = response.data
        const $ = cheerio.load(html)
        const articles = []
        $('.ags-SlotModule', html).each(function(){
            const link = splitURL + $(this).find('a').attr('href')
            articles.push({
                link
            })
        })
        console.log(articles[0])
    }).catch(err => console.log(err))
}, PORT)

app.listen(PORT, () => console.log('server running'))

Additionally, I have not found any API or RSS feed I can use to obtain updates.

about 4 years ago · Juan Pablo Isaza
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!