Answer the question
In order to leave comments, you need to log in
Why can't parse an element from a webpage?
Hello. I'm trying to parse a block, but it returns null. What can be wrong?
const request = require('request');
const cheerio = require('cheerio');
request('https://vk.com/durov', (err, res, html) => {
if (!err && res.statusCode == 200) {
const $ = cheerio.load(html);
const nameElement = $('.page_block');
console.log(nameElement.html());
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question