0

When I try to get the html from this web, I can't get the data that is inside of the html element: app-root

I tried using the library axios with Node.js and also Jsoup with Java. When I print all the html, app-root looks empty in the terminal. But, this is not the case in the web.

This is the code that i'm using (Node.js):

const axios = require('axios');
const cheerio = require('cheerio');

const url = 'https://apps.osce.gob.pe/perfilprov-ui/ficha/20508274298';

async function scrapeData() {
    try {
        const { data } = await axios.get(url);
        const $ = cheerio.load(data);
        console.log($.html());
    } catch (err) {
        console.error(err);
    }
}
scrapeData();

UPinar
  • 865
  • 1
  • 13

0 Answers0