Try to get names of mathes in "Starting soon" section of this web-site: https://favbet.com/en/bets/
This is my code:
var request = require('request'),
cheerio = require('cheerio');
matches = [];
request('https://favbet.com/en/bets/', function (err, resp, body) {
if (!err && resp.statusCode == 200) {
var $ = cheerio.load(body);
var content = $('#startsoon').find('li.col20').each(function() {
var match = this.text();
matches.push(match);
});
console.log(matches);
}
});
Console.log returns blank array. I'm not quite understand how the deep nesting works in this case.