0

I'm having issues grabbing an element with cheerio js.

I opened the following website -> https://www.voobly.com/ladder/view/Age-of-Mythology-The-Titans/1v1-Supremacy

and when I do view page source I can see the id -> pagebrowser1, but when I try to grab it using cheerio, it returns null.

enter image description here

enter image description here

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

axios.get('https://www.voobly.com/ladder/view/Age-of-Mythology-The-Titans/1v1-Supremacy').then((res) => {
    const $ = cheerio.load(res.data)    

    console.log($("#pagebrowser1").html());
});
Zahidul Islam
  • 99
  • 1
  • 9
  • They're likely blocking you because you're not sending a user-agent header – pguardiario Dec 14 '19 at 05:11
  • I'm still having no luck, does it work for you? If so, can you show the code. – Zahidul Islam Dec 14 '19 at 14:24
  • I just realized what you said, that page that i'm trying to access, requires me to login, don't think cherrio js has a solution for it, I'm going to use nightmare js proxy for this problem. – Zahidul Islam Dec 15 '19 at 04:22
  • Does this answer your question? [How can I scrape pages with dynamic content using node.js?](https://stackoverflow.com/questions/28739098/how-can-i-scrape-pages-with-dynamic-content-using-node-js) – ggorlen Jan 04 '23 at 19:06

0 Answers0