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

98
Views
how to get all media url link like all image or video or else using cheerio in node js also backlinks of page

I am using cheerio for web crawling, I want to get all media link URLs like images or videos or else. Is there any function, object, method which is used to get media links also want to fetch all backlinks of the page

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

0

const cherio = require('cherio');
const request = require('request');

const url = "https://www.sdpgroups.com/";

request(url, (err, res, html) => {
    try {
        if (!err && res.statusCode === 200) {
            const $ = cherio.load(html);

            // scrapping Images
           $("img").each((index, imageElement) => {
                const imgUrl = $(imageElement).attr("src");
                console.log(imgUrl);
            });
        } else {
            console.log(err)
        }
    } catch (err) {
        console.log(`unhandled error: ${err}`);
    }
});
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!